MCPcopy Create free account
hub / github.com/brofield/simpleini / TEST_F

Function TEST_F

tests/ts-boolean.cpp:15–33  ·  view source on GitHub ↗

Test GetBoolValue with all recognized TRUE values

Source from the content-addressed store, hash-verified

13
14// Test GetBoolValue with all recognized TRUE values
15TEST_F(TestBoolean, TestGetBoolValueTrue) {
16 std::string input = "[bools]\n"
17 "true1 = true\n"
18 "true2 = t\n"
19 "true3 = yes\n"
20 "true4 = y\n"
21 "true5 = 1\n"
22 "true6 = on\n";
23
24 SI_Error rc = ini.LoadData(input);
25 ASSERT_EQ(rc, SI_OK);
26
27 ASSERT_TRUE(ini.GetBoolValue("bools", "true1", false));
28 ASSERT_TRUE(ini.GetBoolValue("bools", "true2", false));
29 ASSERT_TRUE(ini.GetBoolValue("bools", "true3", false));
30 ASSERT_TRUE(ini.GetBoolValue("bools", "true4", false));
31 ASSERT_TRUE(ini.GetBoolValue("bools", "true5", false));
32 ASSERT_TRUE(ini.GetBoolValue("bools", "true6", false));
33}
34
35// Test GetBoolValue with all recognized FALSE values
36TEST_F(TestBoolean, TestGetBoolValueFalse) {

Callers

nothing calls this directly

Calls 7

GetBoolValueMethod · 0.80
SetBoolValueMethod · 0.80
SetMultiKeyMethod · 0.80
GetAllValuesMethod · 0.80
SetUnicodeMethod · 0.80
LoadDataMethod · 0.45
SaveMethod · 0.45

Tested by

no test coverage detected