| 28 | namespace { |
| 29 | |
| 30 | TEST(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 |
nothing calls this directly
no test coverage detected