| 63 | //------------------------------------------------------------------------------ |
| 64 | |
| 65 | TEST_F(OptionsTest, shouldReportErrorIfNoOptionsGiven) |
| 66 | { |
| 67 | const char* const argv[] = { "appname" }; |
| 68 | |
| 69 | bool result = options_.parseCommandLine(static_cast<int>(ARRAY_LENGTH(argv)), argv); |
| 70 | ASSERT_FALSE(result); |
| 71 | |
| 72 | std::string str = error.str(); |
| 73 | ASSERT_THAT(str, StartsWith("Error: Must specify either input filename or input format")); |
| 74 | ASSERT_THAT(str, HasSubstr("appname")); |
| 75 | ASSERT_THAT(str, EndsWith("\n")); |
| 76 | } |
| 77 | |
| 78 | //------------------------------------------------------------------------------ |
| 79 |
nothing calls this directly
no test coverage detected