We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dd32e18 commit 0807655Copy full SHA for 0807655
lib/std/static_string_map.zig
@@ -187,6 +187,21 @@ const TestMapIgnoreCase = StaticStringMapIgnoreCase(TestEnum);
187
const testing = std.testing;
188
const test_alloc = testing.allocator;
189
190
+test "list literal of list literals" {
191
+ const slice: []const TestKV = &.{
192
+ .{ "these", .D },
193
+ .{ "have", .A },
194
+ .{ "nothing", .B },
195
+ .{ "incommon", .C },
196
+ .{ "samelen", .E },
197
+ };
198
+
199
+ const map = TestMap.initComptime(slice);
200
+ try testMap(map);
201
+ // Default comparison is case sensitive
202
+ try testing.expect(null == map.get("NOTHING"));
203
+}
204
205
test "get/has with edge cases" {
206
const map = StaticStringMap(u32).initComptime(&.{
207
.{ "a", 0 },
0 commit comments