X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=tst%2Fintegration%2FStandaloneTest.cpp;h=95dfc3a2568592607b313f9e6ee3398062a605b1;hb=5408130b6267448d0fddf4e3001fdc4b915e6496;hp=d008ec806ac1a99321463c02a015a851762ba6f3;hpb=7bd3601fafbecae415bd96fc24404b21338cd7a4;p=blank.git diff --git a/tst/integration/StandaloneTest.cpp b/tst/integration/StandaloneTest.cpp index d008ec8..95dfc3a 100644 --- a/tst/integration/StandaloneTest.cpp +++ b/tst/integration/StandaloneTest.cpp @@ -2,40 +2,31 @@ #include "TestInstance.hpp" -CPPUNIT_TEST_SUITE_REGISTRATION(blank::test::StandaloneTest); + +CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(blank::test::StandaloneTest, "headed"); namespace blank { namespace test { void StandaloneTest::setUp() { - + instance.reset(new TestInstance({ "--no-vsync" })); + instance->AssertRunning(); } void StandaloneTest::tearDown() { - + std::unique_ptr inst(std::move(instance)); + if (inst) { + inst->Terminate(); + inst->AssertNoOutput(); + inst->AssertNoError(); + inst->AssertExitStatus(0); + } } void StandaloneTest::testStartup() { - TestInstance standalone({ "--no-vsync" }); - standalone.AssertRunning(); - try { - standalone.AssertOutputLine("chunk preloading complete"); - standalone.Terminate(); - } catch (...) { - try { - standalone.Terminate(); - } catch (...) { } - std::string output; - standalone.ExhaustError(output); - CPPUNIT_ASSERT_EQUAL_MESSAGE( - "process stderr", - std::string(""), output); - CPPUNIT_FAIL("exception in runtime"); - } - standalone.AssertExitStatus(0); - standalone.AssertNoError(); + instance->AssertOutputLine("chunk preloading complete"); } }