| 14 | using TNameValuePair = std::pair<TStringBuf, TMaybe<TStringBuf>>; |
| 15 | |
| 16 | void CompareNameValueItems(TConstArrayRef<TNameValuePair> ref, const TEnum& e) { |
| 17 | const TItems& it = e.Items; |
| 18 | for (size_t i = 0; i < Min(ref.size(), it.size()); ++i) { |
| 19 | const auto& [refCppName, refValue] = ref[i]; |
| 20 | UNIT_ASSERT_VALUES_EQUAL_C(it[i].CppName, refCppName, e.CppName); |
| 21 | UNIT_ASSERT_EQUAL_C(it[i].Value.Defined(), refValue.Defined(), e.CppName); |
| 22 | if (refValue.Defined() && it[i].Value.Defined()) { |
| 23 | UNIT_ASSERT_VALUES_EQUAL_C(*it[i].Value, *refValue, e.CppName); |
| 24 | } |
| 25 | } |
| 26 | UNIT_ASSERT_VALUES_EQUAL_C(it.size(), ref.size(), e.CppName); |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | Y_UNIT_TEST_SUITE(TEnumParserTest) { |
no test coverage detected