Skip to content

Commit dc73db6

Browse files
committed
Use explicit nqp::elems in element counting tests.
1 parent b3b2a5b commit dc73db6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

t/serialization/01-basic.t

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -259,13 +259,13 @@ plan(67);
259259
pir::nqp_deserialize_sc__vSPP($serialized, $dsc, $sh);
260260

261261
ok(nqp::istype($dsc[0], T8), 'deserialized object has correct type');
262-
ok(+$dsc[0].a == 3, 'array a came back with correct element count');
262+
ok(nqp::elems($dsc[0].a) == 3, 'array a came back with correct element count');
263263
ok($dsc[0].a[0] == 1, 'array a first element is correct');
264264
ok($dsc[0].a[1] eq 'lol', 'array a second element is correct');
265265
ok($dsc[0].a[2] == 3, 'array a third element is fine');
266-
ok(+$dsc[0].b == 3, 'array b came back with correct element count');
266+
ok(nqp::elems($dsc[0].b) == 3, 'array b came back with correct element count');
267267
ok($dsc[0].b[0] == 1, 'array b first element is correct');
268-
ok(+$dsc[0].b[1] == 2, 'array b nested array has correct count');
268+
ok(nqp::elems($dsc[0].b[1]) == 2, 'array b nested array has correct element count');
269269
ok(+$dsc[0].b[1][0] == 2, 'array b nested array first element ok');
270270
ok(+$dsc[0].b[1][1] == 3, 'array b nested array second element ok');
271271
ok(+$dsc[0].b[2] == 4, 'array b third element is correct');
@@ -300,7 +300,7 @@ plan(67);
300300
pir::nqp_deserialize_sc__vSPP($serialized, $dsc, $sh);
301301

302302
ok(nqp::istype($dsc[0], T9), 'deserialized object has correct type');
303-
ok(+$dsc[0].a == 2, 'hash came back with correct element count');
303+
ok(nqp::elems($dsc[0].a) == 2, 'hash came back with correct element count');
304304
ok($dsc[0].a<a> == 42, 'hash first element is correct');
305305
ok($dsc[0].a<b> eq 'polar bear', 'hash second element is correct');
306306
}
@@ -335,7 +335,7 @@ plan(67);
335335
pir::nqp_deserialize_sc__vSPP($serialized, $dsc, $sh);
336336

337337
ok(nqp::istype($dsc[0], T10), 'deserialized object has correct type');
338-
ok(+$dsc[0].a == 3, 'integer array came back with correct element count');
338+
ok(nqp::elems($dsc[0].a) == 3, 'integer array came back with correct element count');
339339
ok($dsc[0].a[0] == 101, 'integer array first element is correct');
340340
ok($dsc[0].a[1] == 102, 'integer array second element is correct');
341341
ok($dsc[0].a[2] == 103, 'integer array third element is correct');
@@ -371,7 +371,7 @@ plan(67);
371371
pir::nqp_deserialize_sc__vSPP($serialized, $dsc, $sh);
372372

373373
ok(nqp::istype($dsc[0], T11), 'deserialized object has correct type');
374-
ok(+$dsc[0].a == 3, 'string array came back with correct element count');
374+
ok(nqp::elems($dsc[0].a) == 3, 'string array came back with correct element count');
375375
ok($dsc[0].a[0] eq 'cow', 'string array first element is correct');
376376
ok($dsc[0].a[1] eq 'sheep', 'string array second element is correct');
377377
ok($dsc[0].a[2] eq 'pig', 'string array third element is correct');

0 commit comments

Comments
 (0)