webrtc_m130/test/field_trial.cc
Mirko Bonadei 190244bb59 Remove all #include <assert.h>/<cassert> and usage in Obj-C code.
This CL completes the removal of assert() and relative headers from
the codebase (excluded
//examples/objc/AppRTCMobile/third_party/SocketRocket which is in a
third_party sub-directory).

Bug: webrtc:6779
Change-Id: I93ed57168d2c0e011626873d66529488c5f484f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/225546
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34528}
2021-07-22 14:00:26 +00:00

37 lines
1.1 KiB
C++

/*
* Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "test/field_trial.h"
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <map>
#include <string>
#include "system_wrappers/include/field_trial.h"
namespace webrtc {
namespace test {
void ValidateFieldTrialsStringOrDie(const std::string&) {}
ScopedFieldTrials::ScopedFieldTrials(const std::string& config)
: previous_field_trials_(webrtc::field_trial::GetFieldTrialString()) {
current_field_trials_ = config;
webrtc::field_trial::InitFieldTrialsFromString(current_field_trials_.c_str());
}
ScopedFieldTrials::~ScopedFieldTrials() {
webrtc::field_trial::InitFieldTrialsFromString(previous_field_trials_);
}
} // namespace test
} // namespace webrtc