X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;ds=sidebyside;f=tst%2Fintegration%2FStandaloneTest.cpp;fp=tst%2Fintegration%2FStandaloneTest.cpp;h=240777509a739d58931acf21c5600a9197412545;hb=7f829070c9a5e4e036b483863e5ee75a3a824c38;hp=40930a7c39687799d0ff50e9951e2ea74d4e1c72;hpb=985dff25f7fde96308a66e5b01bc226589fd0825;p=blank.git diff --git a/tst/integration/StandaloneTest.cpp b/tst/integration/StandaloneTest.cpp index 40930a7..2407775 100644 --- a/tst/integration/StandaloneTest.cpp +++ b/tst/integration/StandaloneTest.cpp @@ -2,6 +2,7 @@ #include "TestInstance.hpp" + CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(blank::test::StandaloneTest, "integration"); @@ -9,33 +10,20 @@ 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)); + inst->Terminate(); + inst->AssertExitStatus(0); + inst->AssertNoError(); } 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"); } }