@@ -1477,7 +1477,7 @@ TEST(FunctionReflectionTest, JitCallAdvanced) {
14771477 Ctor.Invoke (&object);
14781478 EXPECT_TRUE (object) << " Failed to call the ctor." ;
14791479 // Building a wrapper with a typedef decl must be possible.
1480- Cpp::Destruct (object, Decls[1 ]);
1480+ EXPECT_TRUE ( Cpp::Destruct (object, Decls[1 ]) );
14811481
14821482 // C API
14831483 auto * I = clang_createInterpreterFromRawPtr (Cpp::GetInterpreter ());
@@ -2342,7 +2342,7 @@ TEST(FunctionReflectionTest, ConstructArray) {
23422342 obj = reinterpret_cast <int *>(reinterpret_cast <char *>(where) +
23432343 (Cpp::SizeOf (scope) * 4 ));
23442344 EXPECT_TRUE (*obj == 42 );
2345- Cpp::Destruct (where, scope, /* withFree=*/ false , 5 );
2345+ EXPECT_TRUE ( Cpp::Destruct (where, scope, /* withFree=*/ false , 5 ) );
23462346 Cpp::Deallocate (scope, where, 5 );
23472347 output = testing::internal::GetCapturedStdout ();
23482348 EXPECT_EQ (output,
@@ -2379,7 +2379,7 @@ TEST(FunctionReflectionTest, Destruct) {
23792379 testing::internal::CaptureStdout ();
23802380 Cpp::TCppScope_t scope = Cpp::GetNamed (" C" );
23812381 Cpp::TCppObject_t object = Cpp::Construct (scope);
2382- Cpp::Destruct (object, scope);
2382+ EXPECT_TRUE ( Cpp::Destruct (object, scope) );
23832383 std::string output = testing::internal::GetCapturedStdout ();
23842384
23852385 EXPECT_EQ (output, " Destructor Executed" );
@@ -2389,7 +2389,7 @@ TEST(FunctionReflectionTest, Destruct) {
23892389 object = Cpp::Construct (scope);
23902390 // Make sure we do not call delete by adding an explicit Deallocate. If we
23912391 // called delete the Deallocate will cause a double deletion error.
2392- Cpp::Destruct (object, scope, /* withFree=*/ false );
2392+ EXPECT_TRUE ( Cpp::Destruct (object, scope, /* withFree=*/ false ) );
23932393 Cpp::Deallocate (scope, object);
23942394 output = testing::internal::GetCapturedStdout ();
23952395 EXPECT_EQ (output, " Destructor Executed" );
@@ -2454,7 +2454,7 @@ TEST(FunctionReflectionTest, DestructArray) {
24542454
24552455 testing::internal::CaptureStdout ();
24562456 // destruct 3 out of 5 objects
2457- Cpp::Destruct (where, scope, false , 3 );
2457+ EXPECT_TRUE ( Cpp::Destruct (where, scope, false , 3 ) );
24582458 output = testing::internal::GetCapturedStdout ();
24592459
24602460 EXPECT_EQ (
@@ -2466,7 +2466,7 @@ TEST(FunctionReflectionTest, DestructArray) {
24662466 // destruct the rest
24672467 auto *new_head = reinterpret_cast <void *>(reinterpret_cast <char *>(where) +
24682468 (Cpp::SizeOf (scope) * 3 ));
2469- Cpp::Destruct (new_head, scope, false , 2 );
2469+ EXPECT_TRUE ( Cpp::Destruct (new_head, scope, false , 2 ) );
24702470
24712471 output = testing::internal::GetCapturedStdout ();
24722472 EXPECT_EQ (output, " \n Destructor Executed\n\n Destructor Executed\n " );
@@ -2481,7 +2481,7 @@ TEST(FunctionReflectionTest, DestructArray) {
24812481 testing::internal::CaptureStdout ();
24822482 // FIXME : This should work with the array of objects as well
24832483 // Cpp::Destruct(where, scope, true, 5);
2484- Cpp::Destruct (where, scope, true );
2484+ EXPECT_TRUE ( Cpp::Destruct (where, scope, true ) );
24852485 output = testing::internal::GetCapturedStdout ();
24862486 EXPECT_EQ (output, " \n Destructor Executed\n " );
24872487 output.clear ();
0 commit comments