OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
| 5 #include <stddef.h> |
| 6 |
5 #include <string> | 7 #include <string> |
6 #include <vector> | 8 #include <vector> |
7 | 9 |
8 #include "chrome/common/ini_parser.h" | 10 #include "chrome/common/ini_parser.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
10 | 12 |
11 namespace { | 13 namespace { |
12 | 14 |
13 struct TestTriplet { | 15 struct TestTriplet { |
14 TestTriplet(const std::string& section, | 16 TestTriplet(const std::string& section, |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 EXPECT_TRUE(root.GetString("section1.key1", &value)); | 121 EXPECT_TRUE(root.GetString("section1.key1", &value)); |
120 EXPECT_EQ("value1", value); | 122 EXPECT_EQ("value1", value); |
121 EXPECT_FALSE(root.GetString("section1.key.2", &value)); | 123 EXPECT_FALSE(root.GetString("section1.key.2", &value)); |
122 EXPECT_TRUE(root.GetString("section1.key3", &value)); | 124 EXPECT_TRUE(root.GetString("section1.key3", &value)); |
123 EXPECT_EQ("va.lue3", value); | 125 EXPECT_EQ("va.lue3", value); |
124 EXPECT_FALSE(root.GetString("se.ction2.key.4", &value)); | 126 EXPECT_FALSE(root.GetString("se.ction2.key.4", &value)); |
125 EXPECT_FALSE(root.GetString("se.ction2.key5", &value)); | 127 EXPECT_FALSE(root.GetString("se.ction2.key5", &value)); |
126 } | 128 } |
127 | 129 |
128 } // namespace | 130 } // namespace |
OLD | NEW |