X-Git-Url: http://git.meshlink.io/?p=meshlink;a=blobdiff_plain;f=test%2Fbasicpp.cpp;h=2f4e5c84a12d727349f751540ac33a60d26c160d;hp=ff49e3d428f749e9d7d9845c6176d494ed47782f;hb=fec95d1221c2d7e2059d6ba2fe244211ccee95ad;hpb=a10895efa0919ff8e00d1ab732a8690fde2786da diff --git a/test/basicpp.cpp b/test/basicpp.cpp index ff49e3d4..2f4e5c84 100644 --- a/test/basicpp.cpp +++ b/test/basicpp.cpp @@ -41,11 +41,14 @@ int main() { // Close the mesh and open it again, now with a different name parameter. mesh.close(); - assert(mesh.open("basicpp_conf", "bar", "basicpp", DEV_CLASS_BACKBONE)); + assert(!mesh.open("basicpp_conf", "bar", "basicpp", DEV_CLASS_BACKBONE)); + + // Open it without giving a name. + + assert(mesh.open("basicpp_conf", nullptr, "basicpp", DEV_CLASS_BACKBONE)); // Check that the name is ignored now, and that we still are "foo". - assert(!mesh.get_node("bar")); self = mesh.get_self(); assert(self); assert(!strcmp(self->name, "foo"));