Test GetLongValue with valid integers
| 16 | |
| 17 | // Test GetLongValue with valid integers |
| 18 | TEST_F(TestNumeric, TestGetLongValuePositive) { |
| 19 | std::string input = "[numbers]\n" |
| 20 | "positive = 42\n" |
| 21 | "zero = 0\n" |
| 22 | "negative = -123\n"; |
| 23 | |
| 24 | SI_Error rc = ini.LoadData(input); |
| 25 | ASSERT_EQ(rc, SI_OK); |
| 26 | |
| 27 | long result = ini.GetLongValue("numbers", "positive", 0); |
| 28 | ASSERT_EQ(result, 42); |
| 29 | |
| 30 | result = ini.GetLongValue("numbers", "zero", -1); |
| 31 | ASSERT_EQ(result, 0); |
| 32 | |
| 33 | result = ini.GetLongValue("numbers", "negative", 0); |
| 34 | ASSERT_EQ(result, -123); |
| 35 | } |
| 36 | |
| 37 | // Test GetLongValue with hex values |
| 38 | TEST_F(TestNumeric, TestGetLongValueHex) { |
nothing calls this directly
no test coverage detected