| 24 | namespace { |
| 25 | |
| 26 | TEST(TocoCmdlineFlagsTest, DefaultValue) { |
| 27 | int argc = 1; |
| 28 | // Invariant in ANSI C, len(argv) == argc +1 also argv[argc] == nullptr |
| 29 | // TF flag parsing lib is relaying on this invariant. |
| 30 | const char* args[] = {"toco", nullptr}; |
| 31 | |
| 32 | string message; |
| 33 | ParsedTocoFlags result_flags; |
| 34 | |
| 35 | EXPECT_TRUE(ParseTocoFlagsFromCommandLineFlags( |
| 36 | &argc, const_cast<char**>(args), &message, &result_flags)); |
| 37 | EXPECT_EQ(result_flags.allow_dynamic_tensors.value(), true); |
| 38 | } |
| 39 | |
| 40 | TEST(TocoCmdlineFlagsTest, ParseFlags) { |
| 41 | int argc = 2; |
nothing calls this directly
no test coverage detected