mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-27 22:58:07 +00:00
add key_field to compiled tests
This commit is contained in:
@@ -526,6 +526,7 @@ if(FLATBUFFERS_BUILD_TESTS)
|
|||||||
compile_schema_for_test(tests/alignment_test.fbs "${FLATC_OPT_COMP}")
|
compile_schema_for_test(tests/alignment_test.fbs "${FLATC_OPT_COMP}")
|
||||||
compile_schema_for_test(tests/native_inline_table_test.fbs "${FLATC_OPT_COMP}")
|
compile_schema_for_test(tests/native_inline_table_test.fbs "${FLATC_OPT_COMP}")
|
||||||
compile_schema_for_test(tests/native_type_test.fbs "${FLATC_OPT}")
|
compile_schema_for_test(tests/native_type_test.fbs "${FLATC_OPT}")
|
||||||
|
compile_schema_for_test(tests/key_field/key_field_sample.fbs "${FLATC_OPT_COMP}")
|
||||||
|
|
||||||
if(FLATBUFFERS_CODE_SANITIZE)
|
if(FLATBUFFERS_CODE_SANITIZE)
|
||||||
add_fsanitize_to_target(flattests ${FLATBUFFERS_CODE_SANITIZE})
|
add_fsanitize_to_target(flattests ${FLATBUFFERS_CODE_SANITIZE})
|
||||||
|
|||||||
@@ -1006,16 +1006,16 @@ inline void FinishSizePrefixedFooTableBuffer(
|
|||||||
fbb.FinishSizePrefixed(root);
|
fbb.FinishSizePrefixed(root);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline flatbuffers::unique_ptr<keyfield::sample::FooTableT> UnPackFooTable(
|
inline std::unique_ptr<keyfield::sample::FooTableT> UnPackFooTable(
|
||||||
const void *buf,
|
const void *buf,
|
||||||
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
||||||
return flatbuffers::unique_ptr<keyfield::sample::FooTableT>(GetFooTable(buf)->UnPack(res));
|
return std::unique_ptr<keyfield::sample::FooTableT>(GetFooTable(buf)->UnPack(res));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline flatbuffers::unique_ptr<keyfield::sample::FooTableT> UnPackSizePrefixedFooTable(
|
inline std::unique_ptr<keyfield::sample::FooTableT> UnPackSizePrefixedFooTable(
|
||||||
const void *buf,
|
const void *buf,
|
||||||
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
||||||
return flatbuffers::unique_ptr<keyfield::sample::FooTableT>(GetSizePrefixedFooTable(buf)->UnPack(res));
|
return std::unique_ptr<keyfield::sample::FooTableT>(GetSizePrefixedFooTable(buf)->UnPack(res));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace sample
|
} // namespace sample
|
||||||
|
|||||||
Reference in New Issue
Block a user