MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / testMultimapToMap

Function testMultimapToMap

tests/utils.cc:71–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71static void testMultimapToMap()
72{
73 std::multimap<int, std::string> input = {
74 {0, "zero" },
75 {0, "nil" },
76 {1, "one" },
77 {3, "two" },
78 {3, "drei" },
79 {3, "trois"}
80 };
81 std::map<int, std::vector<std::string>> wanted = {
82 {0, {"zero", "nil"} },
83 {1, {"one"} },
84 {3, {"two", "drei", "trois"}}
85 };
86
87 auto output = multimapToMapOfVectors(input);
88 AssertThat(output, Equals(wanted));
89}
90
91int main(void)
92{

Callers 1

mainFunction · 0.85

Calls 1

multimapToMapOfVectorsFunction · 0.85

Tested by

no test coverage detected