| 35 | // |
| 36 | |
| 37 | TEST(OptionMapEntry, stringstream_string) |
| 38 | { |
| 39 | OptionMapEntry t1_str{"cmdline", |
| 40 | "command_line", |
| 41 | "Simple Description", |
| 42 | OptionValueType::String}; |
| 43 | std::stringstream t1_test; |
| 44 | t1_test << t1_str; |
| 45 | std::string t1_expect{""}; |
| 46 | ASSERT_EQ(t1_test.str(), t1_expect) << "Unset value failed"; |
| 47 | |
| 48 | t1_str.value = "Test Value"; |
| 49 | ASSERT_EQ(t1_test.str(), t1_expect) << "Value set, incorrect present value failed"; |
| 50 | |
| 51 | t1_str.present = true; |
| 52 | std::string t1_test2{"Simple Description: Test Value\n"}; |
| 53 | ASSERT_EQ(t1_test.str(), t1_expect) << "Incorrect value rendering"; |
| 54 | } |
| 55 | |
| 56 | |
| 57 | TEST(OptionMapEntry, stringstream_integer) |