OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2008 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2008 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include <memory> | 11 #include <memory> |
12 | 12 |
13 #include "webrtc/base/checks.h" | 13 #include "webrtc/rtc_base/checks.h" |
14 #include "webrtc/base/fileutils.h" | 14 #include "webrtc/rtc_base/fileutils.h" |
15 #include "webrtc/base/gunit.h" | 15 #include "webrtc/rtc_base/gunit.h" |
16 #include "webrtc/base/optionsfile.h" | 16 #include "webrtc/rtc_base/optionsfile.h" |
17 #include "webrtc/base/pathutils.h" | 17 #include "webrtc/rtc_base/pathutils.h" |
18 | 18 |
19 namespace rtc { | 19 namespace rtc { |
20 | 20 |
21 static const std::string kTestOptionA = "test-option-a"; | 21 static const std::string kTestOptionA = "test-option-a"; |
22 static const std::string kTestOptionB = "test-option-b"; | 22 static const std::string kTestOptionB = "test-option-b"; |
23 static const std::string kTestString1 = "a string"; | 23 static const std::string kTestString1 = "a string"; |
24 static const std::string kTestString2 = "different string"; | 24 static const std::string kTestString2 = "different string"; |
25 static const std::string kOptionWithEquals = "foo=bar"; | 25 static const std::string kOptionWithEquals = "foo=bar"; |
26 static const std::string kOptionWithNewline = "foo\nbar"; | 26 static const std::string kOptionWithNewline = "foo\nbar"; |
27 static const std::string kValueWithEquals = "baz=quux"; | 27 static const std::string kValueWithEquals = "baz=quux"; |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 EXPECT_TRUE(store_->GetStringValue(kEmptyString, &out)); | 173 EXPECT_TRUE(store_->GetStringValue(kEmptyString, &out)); |
174 EXPECT_EQ(kTestString2, out); | 174 EXPECT_EQ(kTestString2, out); |
175 EXPECT_TRUE(store_->SetStringValue(kTestOptionB, kEmptyString)); | 175 EXPECT_TRUE(store_->SetStringValue(kTestOptionB, kEmptyString)); |
176 EXPECT_TRUE(store_->Save()); | 176 EXPECT_TRUE(store_->Save()); |
177 EXPECT_TRUE(store_->Load()); | 177 EXPECT_TRUE(store_->Load()); |
178 EXPECT_TRUE(store_->GetStringValue(kTestOptionB, &out)); | 178 EXPECT_TRUE(store_->GetStringValue(kTestOptionB, &out)); |
179 EXPECT_EQ(kEmptyString, out); | 179 EXPECT_EQ(kEmptyString, out); |
180 } | 180 } |
181 | 181 |
182 } // namespace rtc | 182 } // namespace rtc |
OLD | NEW |