summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-09-30 14:34:48 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-09-30 14:39:07 +0100
commitf2cea8d5934591cb2f3b22f6bb3f586666fd394e (patch)
tree97a3d6e6a1956c47b9a3b6906dc5363b25db54df
parentUse ice_id() whenever possible (diff)
downloadslicer-f2cea8d5934591cb2f3b22f6bb3f586666fd394e.tar.bz2
slicer-f2cea8d5934591cb2f3b22f6bb3f586666fd394e.tar.xz
slicer-f2cea8d5934591cb2f3b22f6bb3f586666fd394e.zip
Add new test type
-rw-r--r--slicer/test/collections.ice2
-rw-r--r--slicer/test/preprocessor.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/slicer/test/collections.ice b/slicer/test/collections.ice
index 60798cd..62d3d3e 100644
--- a/slicer/test/collections.ice
+++ b/slicer/test/collections.ice
@@ -10,6 +10,8 @@ module TestModule {
local sequence<StructType> Structs;
dictionary<int, ClassType> ClassMap;
local dictionary<int, StructType> StructMap;
+ ["slicer:key:id","slicer:value:res","slicer:item:thing"]
+ local dictionary<long, StructType> StructMapNamed;
};
#endif
diff --git a/slicer/test/preprocessor.cpp b/slicer/test/preprocessor.cpp
index fea951b..ee94fea 100644
--- a/slicer/test/preprocessor.cpp
+++ b/slicer/test/preprocessor.cpp
@@ -12,7 +12,7 @@
#include <vector>
constexpr std::array<std::pair<std::string_view, size_t>, 12> COMPONENTS_IN_TEST_ICE_ARRAY {
- {{"classtype.ice", 2}, {"classes.ice", 3}, {"collections.ice", 5}, {"enums.ice", 2}, {"inheritance.ice", 12},
+ {{"classtype.ice", 2}, {"classes.ice", 3}, {"collections.ice", 6}, {"enums.ice", 2}, {"inheritance.ice", 12},
{"interfaces.ice", 0}, {"json.ice", 2}, {"locals.ice", 7}, {"optionals.ice", 2}, {"structs.ice", 5},
{"types.ice", 4}, {"xml.ice", 5}}};
using ComponentsCount = decltype(COMPONENTS_IN_TEST_ICE_ARRAY);
@@ -21,7 +21,7 @@ constexpr auto COMPONENTS_IN_TEST_ICE_COUNT = std::accumulate(
COMPONENTS_IN_TEST_ICE.begin(), COMPONENTS_IN_TEST_ICE.end(), 0U, [](const auto & t, const auto & c) {
return t + c.second;
});
-static_assert(COMPONENTS_IN_TEST_ICE_COUNT == 49);
+static_assert(COMPONENTS_IN_TEST_ICE_COUNT == 50);
void
process(Slicer::Slicer & s, const ComponentsCount::value_type & c)