Add test for hex by itself
Verify this works.
Change-Id: I15b0a836150eccaa5826fab51d4aea51858e85f7
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/test/test_entity-manager.cpp b/test/test_entity-manager.cpp
index 2cf839b..f7f0a9c 100644
--- a/test/test_entity-manager.cpp
+++ b/test/test_entity-manager.cpp
@@ -210,3 +210,15 @@
nlohmann::json expected = "twelve is 12";
EXPECT_EQ(expected, j["foo"]);
}
+
+TEST(TemplateCharReplace, singleHex)
+{
+ nlohmann::json j = {{"foo", "0x54"}};
+ auto it = j.begin();
+ boost::container::flat_map<std::string, BasicVariantType> data;
+
+ templateCharReplace(it, data, 0);
+
+ nlohmann::json expected = 84;
+ EXPECT_EQ(expected, j["foo"]);
+}