entity-manager: probe: add support for bytestrings

Add support for bytestrings, and associated unit tests.

Change-Id: I1307b886494784ee3cd510351626297c43c431d6
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/test/test_entity-manager.cpp b/test/test_entity-manager.cpp
index 9826c04..1464774 100644
--- a/test/test_entity-manager.cpp
+++ b/test/test_entity-manager.cpp
@@ -367,6 +367,13 @@
     EXPECT_FALSE(matchProbe(j, v));
 }
 
+TEST(MatchProbe, stringNeqArray)
+{
+    nlohmann::json j = R"("-123.4")"_json;
+    BasicVariantType v = std::vector<uint8_t>{1, 2};
+    EXPECT_FALSE(matchProbe(j, v));
+}
+
 TEST(MatchProbe, boolNeqString)
 {
     nlohmann::json j = R"(false)"_json;
@@ -465,6 +472,13 @@
     EXPECT_FALSE(matchProbe(j, v));
 }
 
+TEST(MatchProbe, trueNeqArray)
+{
+    nlohmann::json j = R"(true)"_json;
+    BasicVariantType v = std::vector<uint8_t>{1, 2};
+    EXPECT_FALSE(matchProbe(j, v));
+}
+
 TEST(MatchProbe, uintNeqString)
 {
     nlohmann::json j = R"(11)"_json;
@@ -535,6 +549,13 @@
     EXPECT_FALSE(matchProbe(j, v));
 }
 
+TEST(MatchProbe, uintNeqArray)
+{
+    nlohmann::json j = R"(11)"_json;
+    BasicVariantType v = std::vector<uint8_t>{11};
+    EXPECT_FALSE(matchProbe(j, v));
+}
+
 TEST(MatchProbe, intNeqString)
 {
     nlohmann::json j = R"(-11)"_json;
@@ -591,6 +612,13 @@
     EXPECT_FALSE(matchProbe(j, v));
 }
 
+TEST(MatchProbe, intNeqArray)
+{
+    nlohmann::json j = R"(-11)"_json;
+    BasicVariantType v = std::vector<uint8_t>{11};
+    EXPECT_FALSE(matchProbe(j, v));
+}
+
 TEST(MatchProbe, doubleNeqString)
 {
     nlohmann::json j = R"(0.0)"_json;
@@ -653,6 +681,13 @@
     EXPECT_FALSE(matchProbe(j, v));
 }
 
+TEST(MatchProbe, doubleNeqArray)
+{
+    nlohmann::json j = R"(-11.2)"_json;
+    BasicVariantType v = std::vector<uint8_t>{11};
+    EXPECT_FALSE(matchProbe(j, v));
+}
+
 TEST(MatchProbe, arrayNeqString)
 {
     nlohmann::json j = R"([1, 2])"_json;
@@ -695,6 +730,48 @@
     EXPECT_FALSE(matchProbe(j, v));
 }
 
+TEST(MatchProbe, arrayEqArray)
+{
+    nlohmann::json j = R"([1, 2])"_json;
+    BasicVariantType v = std::vector<uint8_t>{1, 2};
+    EXPECT_TRUE(matchProbe(j, v));
+}
+
+TEST(MatchProbe, arrayNeqArrayDiffSize1)
+{
+    nlohmann::json j = R"([1, 2, 3])"_json;
+    BasicVariantType v = std::vector<uint8_t>{1, 2};
+    EXPECT_FALSE(matchProbe(j, v));
+}
+
+TEST(MatchProbe, arrayNeqArrayDiffSize2)
+{
+    nlohmann::json j = R"([1, 2])"_json;
+    BasicVariantType v = std::vector<uint8_t>{1, 2, 3};
+    EXPECT_FALSE(matchProbe(j, v));
+}
+
+TEST(MatchProbe, emptyArrayEqEmptyArray)
+{
+    nlohmann::json j = R"([])"_json;
+    BasicVariantType v = std::vector<uint8_t>{};
+    EXPECT_TRUE(matchProbe(j, v));
+}
+
+TEST(MatchProbe, emptyArrayNeqArray)
+{
+    nlohmann::json j = R"([])"_json;
+    BasicVariantType v = std::vector<uint8_t>{1};
+    EXPECT_FALSE(matchProbe(j, v));
+}
+
+TEST(MatchProbe, arrayNeqEmptyArray)
+{
+    nlohmann::json j = R"([1])"_json;
+    BasicVariantType v = std::vector<uint8_t>{};
+    EXPECT_FALSE(matchProbe(j, v));
+}
+
 TEST(MatchProbe, objNeqString)
 {
     nlohmann::json j = R"({"foo": "bar"})"_json;
@@ -737,6 +814,13 @@
     EXPECT_FALSE(matchProbe(j, v));
 }
 
+TEST(MatchProbe, objNeqArray)
+{
+    nlohmann::json j = R"({"foo": "bar"})"_json;
+    BasicVariantType v = std::vector<uint8_t>{1, 2};
+    EXPECT_FALSE(matchProbe(j, v));
+}
+
 TEST(MatchProbe, nullNeqString)
 {
     nlohmann::json j = R"(null)"_json;
@@ -778,3 +862,10 @@
     BasicVariantType v = double(1.1);
     EXPECT_FALSE(matchProbe(j, v));
 }
+
+TEST(MatchProbe, nullNeqArray)
+{
+    nlohmann::json j = R"(null)"_json;
+    BasicVariantType v = std::vector<uint8_t>{};
+    EXPECT_FALSE(matchProbe(j, v));
+}