| 61 | } |
| 62 | |
| 63 | BOOST_AUTO_TEST_CASE(check_string_table_fill) |
| 64 | { |
| 65 | std::vector<std::string> expected_names = { |
| 66 | "", "A", "check_name", "ccc", "dDDd", "E", "ff", "ggg", "hhhh", "I", "jj", "", "kkk", |
| 67 | "llll", "M", "nn", "ooo", "pppp", "q", "r", "S", "T", "", "u", "V", "W", |
| 68 | "X", "Y", "Z", "", "", "", "", "", "", "", "0", ""}; |
| 69 | |
| 70 | auto data = PrepareStringTableData(expected_names, true); |
| 71 | StringTable string_table{data}; |
| 72 | |
| 73 | for (std::size_t index = 0; index < expected_names.size(); ++index) |
| 74 | { |
| 75 | const StringViewID id = 5 * index; |
| 76 | BOOST_CHECK_EQUAL(string_table.GetNameForID(id), expected_names[index]); |
| 77 | BOOST_CHECK_EQUAL(string_table.GetRefForID(id), expected_names[index] + "_ref"); |
| 78 | BOOST_CHECK_EQUAL(string_table.GetDestinationsForID(id), expected_names[index] + "_des"); |
| 79 | BOOST_CHECK_EQUAL(string_table.GetPronunciationForID(id), expected_names[index] + "_pro"); |
| 80 | BOOST_CHECK_EQUAL(string_table.GetExitsForID(id), expected_names[index] + "_ext"); |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | BOOST_AUTO_TEST_CASE(check_string_table_nofill) |
| 85 | { |
nothing calls this directly
no test coverage detected