File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -158,7 +158,22 @@ TEST(TaskTest, TaskDestructor_ThrowsIfStageIncomplete) {
158158 } task (in);
159159 task.Validation ();
160160 };
161- EXPECT_DEATH_IF_SUPPORTED (destroy_func (), " .*ORDER OF FUNCTIONS IS NOT RIGHT.*" );
161+ EXPECT_DEATH_IF_SUPPORTED ({ destroy_func (); }, " .*ORDER OF FUNCTIONS IS NOT RIGHT.*" );
162+ }
163+
164+ TEST (TaskTest, TaskDestructor_ThrowsIfEmpty) {
165+ testing::FLAGS_gtest_death_test_style = " threadsafe" ;
166+ auto destroy_func = [] {
167+ std::vector<int32_t > in (20 , 1 );
168+ struct LocalTask : ppc::core::Task<std::vector<int32_t >, int32_t > {
169+ explicit LocalTask (const std::vector<int32_t >& in) { this ->GetInput () = in; }
170+ bool ValidationImpl () override { return true ; }
171+ bool PreProcessingImpl () override { return true ; }
172+ bool RunImpl () override { return true ; }
173+ bool PostProcessingImpl () override { return true ; }
174+ } task (in);
175+ };
176+ EXPECT_DEATH_IF_SUPPORTED ({ destroy_func (); }, " .*ORDER OF FUNCTIONS IS NOT RIGHT.*" );
162177}
163178
164179TEST (TaskTest, InternalTimeTest_ThrowsIfTimeoutExceeded) {
You can’t perform that action at this time.
0 commit comments