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

Function TEST

tensorflow/lite/testing/kernel_test/util_test.cc:30–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28namespace {
29
30TEST(UtilTest, SimpleE2ETest) {
31 TestOptions options;
32 options.tflite_model = "tensorflow/lite/testdata/add.bin";
33 options.read_input_from_file =
34 "tensorflow/lite/testdata/test_input.csv";
35 options.dump_output_to_file = FLAGS_test_tmpdir + "/test_out.csv";
36 options.kernel_type = "REFERENCE";
37 std::unique_ptr<TestRunner> runner(new TfLiteDriver(
38 TfLiteDriver::DelegateType::kNone, /*reference_kernel=*/true));
39 RunKernelTest(options, runner.get());
40 std::string expected = "3";
41 for (int i = 0; i < 1 * 8 * 8 * 3 - 1; i++) {
42 expected.append(",3");
43 }
44 std::string content;
45 std::ifstream file(options.dump_output_to_file);
46 std::getline(file, content);
47 EXPECT_EQ(content, expected);
48}
49
50} // namespace
51} // namespace kernel_test

Callers

nothing calls this directly

Calls 3

RunKernelTestFunction · 0.85
getMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected