From 99917b647131e5cbaf151d5e2849a6886d661b26 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Mon, 19 Jan 2015 11:20:33 +0100 Subject: [PATCH] mtapi_cpp: checked for memory leaks in tests --- mtapi_cpp/test/mtapi_cpp_test_group.cc | 3 +++ mtapi_cpp/test/mtapi_cpp_test_queue.cc | 3 +++ mtapi_cpp/test/mtapi_cpp_test_task.cc | 3 +++ 3 files changed, 9 insertions(+) diff --git a/mtapi_cpp/test/mtapi_cpp_test_group.cc b/mtapi_cpp/test/mtapi_cpp_test_group.cc index 3de33f8..665c7f4 100644 --- a/mtapi_cpp/test/mtapi_cpp_test_group.cc +++ b/mtapi_cpp/test/mtapi_cpp_test_group.cc @@ -29,6 +29,8 @@ #include #include +#include + struct result_example_struct { mtapi_uint_t value1; mtapi_uint_t value2; @@ -81,5 +83,6 @@ void GroupTest::TestBasic() { embb::mtapi::Node::Finalize(); + PT_EXPECT(embb_get_bytes_allocated() == 0); //std::cout << "...done" << std::endl << std::endl; } diff --git a/mtapi_cpp/test/mtapi_cpp_test_queue.cc b/mtapi_cpp/test/mtapi_cpp_test_queue.cc index 1476068..7948580 100644 --- a/mtapi_cpp/test/mtapi_cpp_test_queue.cc +++ b/mtapi_cpp/test/mtapi_cpp_test_queue.cc @@ -29,6 +29,8 @@ #include #include +#include + #define JOB_TEST_TASK 42 #define TASK_TEST_ID 23 #define QUEUE_TEST_ID 17 @@ -63,5 +65,6 @@ void QueueTest::TestBasic() { embb::mtapi::Node::Finalize(); + PT_EXPECT(embb_get_bytes_allocated() == 0); //std::cout << "...done" << std::endl << std::endl; } diff --git a/mtapi_cpp/test/mtapi_cpp_test_task.cc b/mtapi_cpp/test/mtapi_cpp_test_task.cc index 58f1722..55a72bd 100644 --- a/mtapi_cpp/test/mtapi_cpp_test_task.cc +++ b/mtapi_cpp/test/mtapi_cpp_test_task.cc @@ -31,6 +31,8 @@ #include #include +#include + #define JOB_TEST_TASK 42 #define TASK_TEST_ID 23 @@ -117,5 +119,6 @@ void TaskTest::TestBasic() { embb::mtapi::Node::Finalize(); + PT_EXPECT(embb_get_bytes_allocated() == 0); //std::cout << "...done" << std::endl << std::endl; } -- libgit2 0.26.0