Criterion/test/cram/crashes.t

114 lines
8.5 KiB
Perl
Raw Permalink Normal View History

2016-01-14 00:38:37 +01:00
Simple crashes & signal testing
$ signal.c.bin
[\x1b[0;34m----\x1b[0m] \x1b[0;1msignal.c\x1b[0m:\x1b[0;31m14\x1b[0m: Unexpected signal caught below this line! (esc)
2016-01-14 00:38:37 +01:00
[\x1b[0;31mFAIL\x1b[0m] simple::uncaught: CRASH! (esc)
2016-09-04 12:19:56 +02:00
\[\\x1b\[0;31mFAIL\\x1b\[0m\] simple::wrong_signal: \(\d\.\d\ds\) \(esc\) (re)
2016-01-14 00:38:37 +01:00
[\x1b[0;34m====\x1b[0m] \x1b[0;1mSynthesis: Tested: \x1b[0;34m3\x1b[0;1m | Passing: \x1b[0;32m1\x1b[0;1m | Failing: \x1b[0;31m2\x1b[0;1m | Crashing: \x1b[0;31m1\x1b[0;1m \x1b[0m (esc)
$ signal.cc.bin
[\x1b[0;34m----\x1b[0m] \x1b[0;1msignal.cc\x1b[0m:\x1b[0;31m14\x1b[0m: Unexpected signal caught below this line! (esc)
2016-01-14 00:38:37 +01:00
[\x1b[0;31mFAIL\x1b[0m] simple::uncaught: CRASH! (esc)
2016-09-04 12:19:56 +02:00
\[\\x1b\[0;31mFAIL\\x1b\[0m\] simple::wrong_signal: \(\d\.\d\ds\) \(esc\) (re)
2016-01-14 00:38:37 +01:00
[\x1b[0;34m====\x1b[0m] \x1b[0;1mSynthesis: Tested: \x1b[0;34m3\x1b[0;1m | Passing: \x1b[0;32m1\x1b[0;1m | Failing: \x1b[0;31m2\x1b[0;1m | Crashing: \x1b[0;31m1\x1b[0;1m \x1b[0m (esc)
2016-01-14 11:12:24 +01:00
Simple crashes & signal testing (verbose)
$ signal.c.bin --verbose
[\x1b[0;34m----\x1b[0m] Criterion v2.3.0-rc1 (esc)
2016-01-14 11:12:24 +01:00
[\x1b[0;34m====\x1b[0m] Running \x1b[0;34m3\x1b[0m tests from \x1b[0;33msimple\x1b[0m: (esc)
[\x1b[0;34mRUN \x1b[0m] simple::caught (esc)
2016-09-04 12:19:56 +02:00
\[\\x1b\[0;32mPASS\\x1b\[0m\] simple::caught: \(\d\.\d\ds\) \(esc\) (re)
2016-01-14 11:12:24 +01:00
[\x1b[0;34mRUN \x1b[0m] simple::uncaught (esc)
[\x1b[0;34m----\x1b[0m] \x1b[0;1msignal.c\x1b[0m:\x1b[0;31m14\x1b[0m: Unexpected signal caught below this line! (esc)
2016-01-14 11:12:24 +01:00
[\x1b[0;31mFAIL\x1b[0m] simple::uncaught: CRASH! (esc)
[\x1b[0;34mRUN \x1b[0m] simple::wrong_signal (esc)
2016-09-04 12:19:56 +02:00
\[\\x1b\[0;31mFAIL\\x1b\[0m\] simple::wrong_signal: \(\d\.\d\ds\) \(esc\) (re)
2016-01-14 11:12:24 +01:00
[\x1b[0;34m====\x1b[0m] \x1b[0;1mSynthesis: Tested: \x1b[0;34m3\x1b[0;1m | Passing: \x1b[0;32m1\x1b[0;1m | Failing: \x1b[0;31m2\x1b[0;1m | Crashing: \x1b[0;31m1\x1b[0;1m \x1b[0m (esc)
$ signal.cc.bin --verbose
[\x1b[0;34m----\x1b[0m] Criterion v2.3.0-rc1 (esc)
2016-01-14 11:12:24 +01:00
[\x1b[0;34m====\x1b[0m] Running \x1b[0;34m3\x1b[0m tests from \x1b[0;33msimple\x1b[0m: (esc)
[\x1b[0;34mRUN \x1b[0m] simple::caught (esc)
2016-09-04 12:19:56 +02:00
\[\\x1b\[0;32mPASS\\x1b\[0m\] simple::caught: \(\d\.\d\ds\) \(esc\) (re)
2016-01-14 11:12:24 +01:00
[\x1b[0;34mRUN \x1b[0m] simple::uncaught (esc)
[\x1b[0;34m----\x1b[0m] \x1b[0;1msignal.cc\x1b[0m:\x1b[0;31m14\x1b[0m: Unexpected signal caught below this line! (esc)
2016-01-14 11:12:24 +01:00
[\x1b[0;31mFAIL\x1b[0m] simple::uncaught: CRASH! (esc)
[\x1b[0;34mRUN \x1b[0m] simple::wrong_signal (esc)
2016-09-04 12:19:56 +02:00
\[\\x1b\[0;31mFAIL\\x1b\[0m\] simple::wrong_signal: \(\d\.\d\ds\) \(esc\) (re)
2016-01-14 11:12:24 +01:00
[\x1b[0;34m====\x1b[0m] \x1b[0;1mSynthesis: Tested: \x1b[0;34m3\x1b[0;1m | Passing: \x1b[0;32m1\x1b[0;1m | Failing: \x1b[0;31m2\x1b[0;1m | Crashing: \x1b[0;31m1\x1b[0;1m \x1b[0m (esc)
2016-01-14 00:38:37 +01:00
Crashes outside of the test
$ other-crashes.c.bin
[\x1b[0;34m----\x1b[0m] \x1b[0;1mWarning! The test `misc::setup_crash` crashed during its setup or teardown.\x1b[0m (esc)
[\x1b[0;34m----\x1b[0m] \x1b[0;1mWarning! The test `misc::teardown_crash` crashed during its setup or teardown.\x1b[0m (esc)
[\x1b[0;34m====\x1b[0m] \x1b[0;1mSynthesis: Tested: \x1b[0;34m2\x1b[0;1m | Passing: \x1b[0;32m1\x1b[0;1m | Failing: \x1b[0;31m1\x1b[0;1m | Crashing: \x1b[0;31m1\x1b[0;1m \x1b[0m (esc)
$ other-crashes.cc.bin
[\x1b[0;34m----\x1b[0m] \x1b[0;1mWarning! The test `misc::setup_crash` crashed during its setup or teardown.\x1b[0m (esc)
[\x1b[0;34m----\x1b[0m] \x1b[0;1mWarning! The test `misc::teardown_crash` crashed during its setup or teardown.\x1b[0m (esc)
[\x1b[0;34m====\x1b[0m] \x1b[0;1mSynthesis: Tested: \x1b[0;34m2\x1b[0;1m | Passing: \x1b[0;32m1\x1b[0;1m | Failing: \x1b[0;31m1\x1b[0;1m | Crashing: \x1b[0;31m1\x1b[0;1m \x1b[0m (esc)
2016-01-14 11:12:24 +01:00
Crashes outside of the test (verbose)
$ other-crashes.c.bin --verbose
[\x1b[0;34m----\x1b[0m] Criterion v2.3.0-rc1 (esc)
2016-01-14 11:12:24 +01:00
[\x1b[0;34m====\x1b[0m] Running \x1b[0;34m2\x1b[0m tests from \x1b[0;33mmisc\x1b[0m: (esc)
[\x1b[0;34mRUN \x1b[0m] misc::setup_crash (esc)
[\x1b[0;34m----\x1b[0m] \x1b[0;1mWarning! The test `misc::setup_crash` crashed during its setup or teardown.\x1b[0m (esc)
[\x1b[0;34mRUN \x1b[0m] misc::teardown_crash (esc)
2016-09-04 12:19:56 +02:00
\[\\x1b\[0;32mPASS\\x1b\[0m\] misc::teardown_crash: \(\d\.\d\ds\) \(esc\) (re)
2016-01-14 11:12:24 +01:00
[\x1b[0;34m----\x1b[0m] \x1b[0;1mWarning! The test `misc::teardown_crash` crashed during its setup or teardown.\x1b[0m (esc)
[\x1b[0;34m====\x1b[0m] \x1b[0;1mSynthesis: Tested: \x1b[0;34m2\x1b[0;1m | Passing: \x1b[0;32m1\x1b[0;1m | Failing: \x1b[0;31m1\x1b[0;1m | Crashing: \x1b[0;31m1\x1b[0;1m \x1b[0m (esc)
$ other-crashes.cc.bin --verbose
[\x1b[0;34m----\x1b[0m] Criterion v2.3.0-rc1 (esc)
2016-01-14 11:12:24 +01:00
[\x1b[0;34m====\x1b[0m] Running \x1b[0;34m2\x1b[0m tests from \x1b[0;33mmisc\x1b[0m: (esc)
[\x1b[0;34mRUN \x1b[0m] misc::setup_crash (esc)
[\x1b[0;34m----\x1b[0m] \x1b[0;1mWarning! The test `misc::setup_crash` crashed during its setup or teardown.\x1b[0m (esc)
[\x1b[0;34mRUN \x1b[0m] misc::teardown_crash (esc)
2016-09-04 12:19:56 +02:00
\[\\x1b\[0;32mPASS\\x1b\[0m\] misc::teardown_crash: \(\d\.\d\ds\) \(esc\) (re)
2016-01-14 11:12:24 +01:00
[\x1b[0;34m----\x1b[0m] \x1b[0;1mWarning! The test `misc::teardown_crash` crashed during its setup or teardown.\x1b[0m (esc)
[\x1b[0;34m====\x1b[0m] \x1b[0;1mSynthesis: Tested: \x1b[0;34m2\x1b[0;1m | Passing: \x1b[0;32m1\x1b[0;1m | Failing: \x1b[0;31m1\x1b[0;1m | Crashing: \x1b[0;31m1\x1b[0;1m \x1b[0m (esc)
C++ Exceptions should be handled
$ exception.cc.bin
[\x1b[0;34m----\x1b[0m] exception::raise_any: Caught some unexpected exception during the test execution. (esc)
2016-09-04 12:19:56 +02:00
\[\\x1b\[0;31mFAIL\\x1b\[0m\] exception::raise_any: \(\d\.\d\ds\) \(esc\) (re)
2016-01-14 11:12:24 +01:00
[\x1b[0;34m----\x1b[0m] exception::raise_any_fini: Caught some unexpected exception during the test finalization. (esc)
[\x1b[0;34m----\x1b[0m] exception::raise_any_init: Caught some unexpected exception during the test initialization. (esc)
2016-09-04 12:19:56 +02:00
\[\\x1b\[0;31mFAIL\\x1b\[0m\] exception::raise_any_init: \(\d\.\d\ds\) \(esc\) (re)
2016-01-14 11:12:24 +01:00
[\x1b[0;34m----\x1b[0m] exception::raise_std: Caught an unexpected exception during the test execution: Some exception message. (esc)
2016-09-04 12:19:56 +02:00
\[\\x1b\[0;31mFAIL\\x1b\[0m\] exception::raise_std: \(\d\.\d\ds\) \(esc\) (re)
2016-01-14 11:12:24 +01:00
[\x1b[0;34m----\x1b[0m] exception::raise_std_fini: Caught an unexpected exception during the test finalization: Some exception message. (esc)
[\x1b[0;34m----\x1b[0m] exception::raise_std_init: Caught an unexpected exception during the test initialization: Some exception message. (esc)
2016-09-04 12:19:56 +02:00
\[\\x1b\[0;31mFAIL\\x1b\[0m\] exception::raise_std_init: \(\d\.\d\ds\) \(esc\) (re)
[\x1b[0;34m====\x1b[0m] \x1b[0;1mSynthesis: Tested: \x1b[0;34m6\x1b[0;1m | Passing: \x1b[0;32m2\x1b[0;1m | Failing: \x1b[0;31m4\x1b[0;1m | Crashing: \x1b[0m0\x1b[0;1m \x1b[0m (esc)
2016-01-14 11:12:24 +01:00
C++ Exceptions should be handled (verbose)
$ exception.cc.bin --verbose
[\x1b[0;34m----\x1b[0m] Criterion v2.3.0-rc1 (esc)
2016-01-14 11:12:24 +01:00
[\x1b[0;34m====\x1b[0m] Running \x1b[0;34m6\x1b[0m tests from \x1b[0;33mexception\x1b[0m: (esc)
[\x1b[0;34mRUN \x1b[0m] exception::raise_any (esc)
[\x1b[0;34m----\x1b[0m] exception::raise_any: Caught some unexpected exception during the test execution. (esc)
2016-09-04 12:19:56 +02:00
\[\\x1b\[0;31mFAIL\\x1b\[0m\] exception::raise_any: \(\d\.\d\ds\) \(esc\) (re)
2016-01-14 11:12:24 +01:00
[\x1b[0;34mRUN \x1b[0m] exception::raise_any_fini (esc)
2016-09-04 12:19:56 +02:00
\[\\x1b\[0;32mPASS\\x1b\[0m\] exception::raise_any_fini: \(\d\.\d\ds\) \(esc\) (re)
2016-01-14 11:12:24 +01:00
[\x1b[0;34m----\x1b[0m] exception::raise_any_fini: Caught some unexpected exception during the test finalization. (esc)
[\x1b[0;34mRUN \x1b[0m] exception::raise_any_init (esc)
[\x1b[0;34m----\x1b[0m] exception::raise_any_init: Caught some unexpected exception during the test initialization. (esc)
2016-09-04 12:19:56 +02:00
\[\\x1b\[0;31mFAIL\\x1b\[0m\] exception::raise_any_init: \(\d\.\d\ds\) \(esc\) (re)
2016-01-14 11:12:24 +01:00
[\x1b[0;34mRUN \x1b[0m] exception::raise_std (esc)
[\x1b[0;34m----\x1b[0m] exception::raise_std: Caught an unexpected exception during the test execution: Some exception message. (esc)
2016-09-04 12:19:56 +02:00
\[\\x1b\[0;31mFAIL\\x1b\[0m\] exception::raise_std: \(\d\.\d\ds\) \(esc\) (re)
2016-01-14 11:12:24 +01:00
[\x1b[0;34mRUN \x1b[0m] exception::raise_std_fini (esc)
2016-09-04 12:19:56 +02:00
\[\\x1b\[0;32mPASS\\x1b\[0m\] exception::raise_std_fini: \(\d\.\d\ds\) \(esc\) (re)
2016-01-14 11:12:24 +01:00
[\x1b[0;34m----\x1b[0m] exception::raise_std_fini: Caught an unexpected exception during the test finalization: Some exception message. (esc)
[\x1b[0;34mRUN \x1b[0m] exception::raise_std_init (esc)
[\x1b[0;34m----\x1b[0m] exception::raise_std_init: Caught an unexpected exception during the test initialization: Some exception message. (esc)
2016-09-04 12:19:56 +02:00
\[\\x1b\[0;31mFAIL\\x1b\[0m\] exception::raise_std_init: \(\d\.\d\ds\) \(esc\) (re)
[\x1b[0;34m====\x1b[0m] \x1b[0;1mSynthesis: Tested: \x1b[0;34m6\x1b[0;1m | Passing: \x1b[0;32m2\x1b[0;1m | Failing: \x1b[0;31m4\x1b[0;1m | Crashing: \x1b[0m0\x1b[0;1m \x1b[0m (esc)