fix bug in field lookup (#700)

This commit is contained in:
water111
2021-07-12 19:29:56 -04:00
committed by GitHub
parent 079f623099
commit 73330302ba
4 changed files with 37 additions and 73 deletions
+12
View File
@@ -390,3 +390,15 @@ TEST_F(DataDecompTest, KernelContext) {
" :relocating-process #f\n"
" :low-memory-message #t)\n");
}
TEST_F(DataDecompTest, ReverseArtExt) {
FieldReverseLookupInput input;
input.base_type = TypeSpec("external-art-control");
input.offset = 124;
auto result = dts->ts.reverse_field_multi_lookup(input);
EXPECT_EQ(result.results.at(0).tokens.at(2).print(), "name");
input.offset = 108;
result = dts->ts.reverse_field_multi_lookup(input);
EXPECT_EQ(result.results.at(0).tokens.at(2).print(), "type");
}