From 96fda4bccaea4a9df6d2eb6502365ad5eb11e7d8 Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Fri, 1 Dec 2023 15:31:06 +0000 Subject: [PATCH] keyexpr test fix --- tests/universal/keyexpr.cxx | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/tests/universal/keyexpr.cxx b/tests/universal/keyexpr.cxx index 2a521edf..81a7feb2 100644 --- a/tests/universal/keyexpr.cxx +++ b/tests/universal/keyexpr.cxx @@ -381,6 +381,13 @@ void includes_declared(Session& s) { assert(foobarv.check()); assert(starbuzv.check()); + assert(keyexpr_includes("FOO/*", "FOO/BAR", err)); + assert(err == 0); + assert(!keyexpr_includes("*/BUZ", "FOO/BAR", err)); + assert(err == 0); + assert(!keyexpr_includes("FOO/*", nul, err)); + assert(err < 0); + #ifdef ZENOHCXX_ZENOHC // zenoh-c is able to check declared keyexprs assert(foostar.includes(foobar, err)); @@ -389,12 +396,6 @@ void includes_declared(Session& s) { assert(err == 0); assert(!foostar.includes(nul, err)); assert(err < 0); - assert(keyexpr_includes("FOO/*", "FOO/BAR", err)); - assert(err == 0); - assert(!keyexpr_includes("*/BUZ", "FOO/BAR", err)); - assert(err == 0); - assert(!keyexpr_includes("FOO/*", nul, err)); - assert(err < 0); #else // zenoh-pico returns error when checking declared keyexprs: the string value is avaliable in session only assert(!foostar.includes(foobar, err)); @@ -403,12 +404,6 @@ void includes_declared(Session& s) { assert(err < 0); assert(!foostar.includes(nul, err)); assert(err < 0); - assert(!keyexpr_includes("FOO/*", "FOO/BAR", err)); - assert(err < 0); - assert(!keyexpr_includes("*/BUZ", "FOO/BAR", err)); - assert(err < 0); - assert(!keyexpr_includes("FOO/*", nul, err)); - assert(err < 0); #endif // both zenoh-c and zenoh-pico are able to check declared keyexprs through the session