diff --git a/kupl/test/test_main.cpp b/kupl/test/test_main.cpp index fdd930380e3d5fb246f0f6c562c5e109260fa827..0f7039a2dbbcc8d24a6e7712f839b764adcd3a74 100644 --- a/kupl/test/test_main.cpp +++ b/kupl/test/test_main.cpp @@ -1,8 +1,38 @@ #include "gtest/gtest.h" +#include +#include + +class CustomTestEventListener : public::testing::EmptyTestEventListener { +public: + CustomTestEventListener() { + } + + ~CustomTestEventListener() override { + } + + void OnTestStart(const::testing::TestInfo& test_info) override { + std::cout << "start test " <listeners(); + delete listeners.Release(listeners.default_result_printer()); + listeners.Append(new CustomTestEventListener()); + + return RUN_ALL_TESTS(); } \ No newline at end of file diff --git a/kupl/test/test_sgraph.cpp b/kupl/test/test_sgraph.cpp index efaa506deff22d27663b4e121d8d709dbfeed32f..e39eebf518e71e465800934d39c09157333734c9 100644 --- a/kupl/test/test_sgraph.cpp +++ b/kupl/test/test_sgraph.cpp @@ -8,9 +8,6 @@ kupl_sgraph_node_h task_gnode_3; static inline void task_str(void *args) { - const char *str = (const char*)args; - printf("[thread:%lu] get string %s\n", pthread_self(), str); - usleep(10000); } static kupl_sgraph_node_h add_node(kupl_sgraph_h sgraph, const char *text) @@ -27,11 +24,11 @@ TEST(test_sgraph, kupl_sgraph_001) sgraph = kupl_sgraph_create(); ASSERT_TRUE(sgraph != nullptr); - task_gnode_1 = add_node(sgraph, "static a"); + task_gnode_1 = add_node(sgraph, nullptr); ASSERT_TRUE(task_gnode_1 != nullptr); - task_gnode_2 = add_node(sgraph, "static b"); + task_gnode_2 = add_node(sgraph, nullptr); ASSERT_TRUE(task_gnode_2 != nullptr); - task_gnode_3 = add_node(sgraph, "static c"); + task_gnode_3 = add_node(sgraph, nullptr); ASSERT_TRUE(task_gnode_3 != nullptr); int ret = kupl_sgraph_add_dep(task_gnode_1, task_gnode_2);