MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST

Function TEST

tensorflow/lite/schema/builtin_ops_header/consistency_test.cc:29–40  ·  view source on GitHub ↗

The test ensures that `builtin_ops.h` is consistent with the FlatBuffer schema definition. When the schema is modified, it's required to run the generator to re-generate the header. Please see README.md for more details.

Source from the content-addressed store, hash-verified

27// generator to re-generate the header.
28// Please see README.md for more details.
29TEST(BuiltinOpsHeaderTest, TestConsistency) {
30 std::ifstream input_stream(kHeaderFileName, std::ios::binary);
31 ASSERT_TRUE(input_stream);
32 std::string file_content((std::istreambuf_iterator<char>(input_stream)),
33 std::istreambuf_iterator<char>());
34
35 std::ostringstream output_stream;
36 tflite::builtin_ops_header::GenerateHeader(output_stream);
37 std::string generated_content = output_stream.str();
38
39 EXPECT_EQ(file_content, generated_content);
40}
41
42} // anonymous namespace
43

Callers

nothing calls this directly

Calls 1

GenerateHeaderFunction · 0.70

Tested by

no test coverage detected