feat(core): ldml use action struct in tests 🌱

- clarify warnings in ldml.cpp for assertions we are skipping for now
- remove unused parameter

For: #10410
This commit is contained in:
Steven R. Loomis 2024-01-18 08:48:50 -06:00
parent 8095977bec
commit 973cf5d044

View file

@ -136,9 +136,10 @@ apply_action(
}
}
if (act.backspace.expected_type == KM_CORE_BT_CHAR) {
std::cerr << "Note: TODO-LDML: not validating backspace.expected_value nor ch - no information available." << std::endl;
// assert(ch == act.backspace.expected_value);
assert(context.back().type == KM_CORE_CT_CHAR);
// assert(context.back().character == ch);
assert(context.back().type == KM_CORE_CT_CHAR);
context.pop_back();
} else {
// assume it's otherwise KM_CORE_BT_UNKNOWN
@ -209,11 +210,11 @@ verify_context(std::u16string& text_store, km_core_state* &test_state, std::vect
}
std::cout << std::endl;
#if 0
// Verify that both our local test_context and the core's test_state.context have
// not diverged
auto ci = citems;
// TODO-LDML: How to validate this with the new struct?
#if 0
for (auto test_ci = test_context.begin(); ci->type != KM_CORE_CT_END || test_ci != test_context.end(); ci++, test_ci++) {
assert(ci->type != KM_CORE_CT_END && test_ci != test_context.end()); // Verify that both lists are same length
assert(test_ci->type == ci->type && test_ci->marker == ci->marker);
@ -229,7 +230,7 @@ verify_context(std::u16string& text_store, km_core_state* &test_state, std::vect
#if 0
assert(false);
#else
std::cerr << "TODO-LDML: need to validate text store" << std::endl;
std::cerr << "TODO-LDML: need to validate text store" << std::endl;
#endif
}
delete [] buf;