]> git.localhorst.tv Git - blank.git/blob - tst/integration/StandaloneTest.cpp
make stderr visible in standalone test
[blank.git] / tst / integration / StandaloneTest.cpp
1 #include "StandaloneTest.hpp"
2
3 #include "TestInstance.hpp"
4
5 CPPUNIT_TEST_SUITE_REGISTRATION(blank::test::StandaloneTest);
6
7
8 namespace blank {
9 namespace test {
10
11 void StandaloneTest::setUp() {
12
13 }
14
15 void StandaloneTest::tearDown() {
16
17 }
18
19
20 void StandaloneTest::testStartup() {
21         TestInstance standalone({ "--no-vsync" });
22         standalone.AssertRunning();
23         try {
24                 standalone.AssertOutputLine("chunk preloading complete");
25                 standalone.Terminate();
26         } catch (...) {
27                 try {
28                         standalone.Terminate();
29                 } catch (...) { }
30                 std::string output;
31                 standalone.ExhaustError(output);
32                 CPPUNIT_ASSERT_EQUAL_MESSAGE(
33                         "process stderr",
34                         std::string(""), output);
35                 CPPUNIT_FAIL("exception in runtime");
36         }
37         standalone.AssertExitStatus(0);
38         standalone.AssertNoError();
39 }
40
41 }
42 }