]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/testsuite.cpp
fix LoopCalls to not send param count thus avoiding a crash in command parser
[user/henk/code/inspircd.git] / src / testsuite.cpp
index 719da031319c21455ea8ff360cd4a316c21b0bd2..02d806480781e99d3e93cac1c8b0926b43ce1d80 100644 (file)
@@ -108,19 +108,33 @@ bool TestSuite::DoThreadTests()
                cout << "Creation failed, test failure.\n";
                return false;
        }
-       cout << "Creation success!\n";
+       cout << "Creation success, type " << te->GetName() << "\n";
 
-       cout << "Creating new thread of type TestSuiteThread...\n";
+       cout << "Allocate: new TestSuiteThread...\n";
        TestSuiteThread* tst = new TestSuiteThread();
 
-       cout << "Create new thread based on TestSuiteThread...\n";
-       te->Create(tst);
+       cout << "ThreadEngine::Create on TestSuiteThread...\n";
+       try
+       {
+               try
+               {
+                       te->Create(tst);
+               }
+               catch (CoreException &ce)
+               {
+                       cout << "Failure: " << ce.GetReason() << endl;
+               }
+       }
+       catch (...)
+       {
+               cout << "Failure, unhandled exception\n";
+       }
 
-       cout << "Press any key to end test.\n";
-       getchar();
+       cout << "Type any line and press enter to end test.\n";
+       cin >> anything;
 
        /* Thread engine auto frees thread on delete */
-       cout << "Waiting for thread to exit...";
+       cout << "Waiting for thread to exit... " << flush;
        delete tst;
        cout << "Done!\n";