Skip to content

Commit 39f4901

Browse files
committed
Update msgpack_unit_test.zig
1 parent 64a7691 commit 39f4901

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/msgpack_unit_test.zig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ test "map write and read" {
144144
var test_val_1 = Payload.mapPayload(allocator);
145145
var bin = [5]u8{ 1, 2, 3, 4, 5 };
146146

147+
try test_val_1.mapPut("nil", Payload.nilToPayload());
147148
try test_val_1.mapPut("id", Payload.uintToPayload(16));
148149
try test_val_1.mapPut("bool", Payload.boolToPayload(true));
149150
try test_val_1.mapPut("float", Payload.floatToPayload(0.5));
@@ -170,6 +171,7 @@ test "map write and read" {
170171
defer val.free(allocator);
171172

172173
try expect(val == .map);
174+
try expect(val.map.get("nil").? == .nil);
173175
try expect(val.map.get("id").?.uint == 16);
174176
try expect(val.map.get("bool").?.bool == true);
175177
// Additional consideration needs

0 commit comments

Comments
 (0)