tests: Fix use of an uninitialized variable 75/296675/1
authorSeunghun Lee <shiin.lee@samsung.com>
Wed, 2 Aug 2023 06:47:14 +0000 (15:47 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Thu, 3 Aug 2023 04:52:21 +0000 (13:52 +0900)
Change-Id: Ib5f8255c54d876f641fe1af1a953014f6748cc42

tests/mockclient.cpp

index 3c12d65..25aaaf3 100644 (file)
@@ -82,12 +82,9 @@ void MockClient::ExpectNoError()
     if (err != 0) {
         errcode = wl_display_get_protocol_error(this->display, &interface,
                 NULL);
+        FAIL() << "Expected no error, but got error(" << err << ") interface("
+            << interface->name << ") errcode(" << errcode << ")";
     }
-
-    ASSERT_EQ(err, 0)
-        << "Expected no error, but got error(" << err << ") interface("
-        << interface->name << ") errcode(" << errcode << ")";
-
 }
 
 void MockClient::ExpectProtocolError(const struct wl_interface *intf,