Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Coding style: ! -> 'not'.
[simgrid.git] / examples / cpp / platform-properties / s4u-platform-properties.cpp
index 1eb7ff4..6f3f8e3 100644 (file)
@@ -35,7 +35,8 @@ static void test_host(const std::string& hostname)
   XBT_INFO("== Try to get a host property that does exist");
   value = thehost->get_property(exist);
   xbt_assert(value, "\tProperty %s is undefined (where it should)", exist);
-  xbt_assert(!strcmp(value, "180"), "\tValue of property %s is defined to %s (where it should be 180)", exist, value);
+  xbt_assert(strcmp(value, "180") == 0, "\tValue of property %s is defined to %s (where it should be 180)", exist,
+             value);
   XBT_INFO("   Property: %s old value: %s", exist, value);
 
   XBT_INFO("== Trying to modify a host property");
@@ -44,7 +45,7 @@ static void test_host(const std::string& hostname)
   /* Test if we have changed the value */
   value = thehost->get_property(exist);
   xbt_assert(value, "Property %s is undefined (where it should)", exist);
-  xbt_assert(!strcmp(value, "250"), "Value of property %s is defined to %s (where it should be 250)", exist, value);
+  xbt_assert(strcmp(value, "250") == 0, "Value of property %s is defined to %s (where it should be 250)", exist, value);
   XBT_INFO("   Property: %s old value: %s", exist, value);
 
   /* Restore the value for the next test */