diff options
author | Tor Egge <Tor.Egge@broadpark.no> | 2018-06-01 13:36:28 +0000 |
---|---|---|
committer | Tor Egge <Tor.Egge@oath.com> | 2018-06-01 14:05:28 +0000 |
commit | 695381e25c7c35f7558cacb802f781c3bc957051 (patch) | |
tree | 35cfe6760fe4ac3040ad92bef73c326d9abc1361 /vespalib/src/tests/testapp-state | |
parent | fe3d564ddf26df3e72bf4244d1edbef2237044d3 (diff) |
Check return values in vespalib.
Diffstat (limited to 'vespalib/src/tests/testapp-state')
-rw-r--r-- | vespalib/src/tests/testapp-state/testapp-state.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/vespalib/src/tests/testapp-state/testapp-state.cpp b/vespalib/src/tests/testapp-state/testapp-state.cpp index eda67a15d60..683476a5525 100644 --- a/vespalib/src/tests/testapp-state/testapp-state.cpp +++ b/vespalib/src/tests/testapp-state/testapp-state.cpp @@ -4,8 +4,12 @@ using namespace vespalib; TEST_MAIN() { - system("./vespalib_state_test_app > out.txt 2>&1 out.txt"); - system("cat out.txt | grep STATE | sed 's/([^)].*\\//(/' > actual.txt"); + int status = system("./vespalib_state_test_app > out.txt 2>&1 out.txt"); + ASSERT_FALSE(WIFSIGNALED(status)); + EXPECT_NOT_EQUAL(0, WEXITSTATUS(status)); + status = system("cat out.txt | grep STATE | sed 's/([^)].*\\//(/' > actual.txt"); + ASSERT_FALSE(WIFSIGNALED(status)); + EXPECT_EQUAL(0, WEXITSTATUS(status)); std::string diff_cmd("diff -u actual.txt "); diff_cmd += TEST_PATH("expect.txt"); |