summaryrefslogtreecommitdiff
path: root/src/test.cpp
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2015-02-19 09:38:01 +0100
committerLoic Blot <loic.blot@unix-experience.fr>2015-02-21 11:04:19 +0100
commitb3aeba684b4e27e9fdf2c07949750bb567e40d6b (patch)
tree73a97bc7d155174523cac1999274348c5e3d1b30 /src/test.cpp
parent38e62805527b774e478617d9781bde72ce2bdcb9 (diff)
downloadminetest-b3aeba684b4e27e9fdf2c07949750bb567e40d6b.tar.gz
minetest-b3aeba684b4e27e9fdf2c07949750bb567e40d6b.tar.bz2
minetest-b3aeba684b4e27e9fdf2c07949750bb567e40d6b.zip
Unit tests must be done at integration process.
* Remove --enable-unittests and --disable-unittests and add --do-unittests function * --do-unittests function will exit 0 on success. * minetest and minetestserver binaries are launched with --do-unittests in travis build.
Diffstat (limited to 'src/test.cpp')
-rw-r--r--src/test.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/test.cpp b/src/test.cpp
index d8ab6336f..40943035d 100644
--- a/src/test.cpp
+++ b/src/test.cpp
@@ -2132,9 +2132,9 @@ void run_tests()
TEST(TestCollision);
if(INTERNET_SIMULATOR == false){
TEST(TestSocket);
- dout_con<<"=== BEGIN RUNNING UNIT TESTS FOR CONNECTION ==="<<std::endl;
+ dout_con << "=== BEGIN RUNNING UNIT TESTS FOR CONNECTION ===" << std::endl;
TEST(TestConnection);
- dout_con<<"=== END RUNNING UNIT TESTS FOR CONNECTION ==="<<std::endl;
+ dout_con << "=== END RUNNING UNIT TESTS FOR CONNECTION ===" << std::endl;
}
log_set_lev_silence(LMT_ERROR, false);
@@ -2142,13 +2142,13 @@ void run_tests()
delete idef;
delete ndef;
- if(tests_failed == 0){
- infostream<<"run_tests(): "<<tests_failed<<" / "<<tests_run<<" tests failed."<<std::endl;
- infostream<<"run_tests() passed."<<std::endl;
+ if(tests_failed == 0) {
+ actionstream << "run_tests(): " << tests_failed << " / " << tests_run << " tests failed." << std::endl;
+ actionstream << "run_tests() passed." << std::endl;
return;
} else {
- errorstream<<"run_tests(): "<<tests_failed<<" / "<<tests_run<<" tests failed."<<std::endl;
- errorstream<<"run_tests() aborting."<<std::endl;
+ errorstream << "run_tests(): " << tests_failed << " / " << tests_run << " tests failed." << std::endl;
+ errorstream << "run_tests() aborting." << std::endl;
abort();
}
}