diff options
author | Nao Pross <naopross@thearcway.org> | 2019-01-23 17:02:24 +0100 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2019-01-23 17:02:24 +0100 |
commit | d48d9f51970bd90ef9f1a8cbcf6207041e79a104 (patch) | |
tree | 0fcfa52b6f84722dc6119378106269cec025ed3b /test | |
parent | Update .gitignore, delete makefile add -g flag to build (diff) | |
download | flatland-d48d9f51970bd90ef9f1a8cbcf6207041e79a104.tar.gz flatland-d48d9f51970bd90ef9f1a8cbcf6207041e79a104.zip |
Fix bug in RAII jobs, debug session on ts3
Diffstat (limited to 'test')
-rw-r--r-- | test/task_test.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/task_test.cpp b/test/task_test.cpp index 199d510..85a1754 100644 --- a/test/task_test.cpp +++ b/test/task_test.cpp @@ -39,28 +39,28 @@ int main(int argc, char *argv[]) { job f_job; // test a function - auto ciao_fn_task = f_job.make_task(hello); + auto hello_fn_task = f_job.make_task(hello); // test a function ad make the pointer go out of scope { - auto hello_fn_task = f_job.make_task(ciao); + auto ciao_fn_task = f_job.make_task(ciao); } - f_job.invoke_tasks(); + f_job(); std::cout << std::endl; std::cout << "Testing methods" << std::endl; - std::cout << " should print once: today we have no motd!" << std::endl; + std::cout << "should print once: today we have no motd!" << std::endl; job m_job; // test a method message m; - m_job.make_task(std::bind(&message::print_motd, m)); + auto msg = m_job.make_task(std::bind(&message::print_motd, m)); // test a method of an object that goes out of scope { message out; - m_job.make_task(std::bind(&message::print_date, out)); + auto date = m_job.make_task(std::bind(&message::print_date, out)); } // invoke tasks @@ -68,7 +68,7 @@ int main(int argc, char *argv[]) { // // hello! // hello world! - m_job.invoke_tasks(); + m_job(); return 0; } |