@@ -19,7 +19,7 @@ sub add_to_sc($sc, $idx, $obj) {
19
19
my $ dsc := nqp ::createsc(' TEST_SC_1_OUT' );
20
20
nqp ::deserialize($ serialized , $ dsc , $ sh , nqp ::list(), nqp ::null());
21
21
22
- ok (nqp :: elems ($ dsc ) == 0 , ' deserialized SC is also empty' );
22
+ ok (nqp ::scobjcount ($ dsc ) == 0 , ' deserialized SC is also empty' );
23
23
}
24
24
25
25
# Serializing an SC with a single object with P6int REPR.
@@ -37,7 +37,7 @@ sub add_to_sc($sc, $idx, $obj) {
37
37
my $ dsc := nqp ::createsc(' TEST_SC_2_OUT' );
38
38
nqp ::deserialize($ serialized , $ dsc , $ sh , nqp ::list(), nqp ::null());
39
39
40
- ok (nqp :: elems ($ dsc ) == 1 , ' deserialized SC has a single element ' );
40
+ ok (nqp ::scobjcount ($ dsc ) == 1 , ' deserialized SC has a single object ' );
41
41
ok (nqp ::istype($ dsc [0 ], T1), ' deserialized object has correct type' );
42
42
ok (nqp ::unbox_i($ dsc [0 ]) == 42 , ' deserialized object has correct value' );
43
43
}
@@ -57,7 +57,7 @@ sub add_to_sc($sc, $idx, $obj) {
57
57
my $ dsc := nqp ::createsc(' TEST_SC_3_OUT' );
58
58
nqp ::deserialize($ serialized , $ dsc , $ sh , nqp ::list(), nqp ::null());
59
59
60
- ok (nqp :: elems ($ dsc ) == 1 , ' deserialized SC has a single element ' );
60
+ ok (nqp ::scobjcount ($ dsc ) == 1 , ' deserialized SC has a single object ' );
61
61
ok (nqp ::istype($ dsc [0 ], T2), ' deserialized object has correct type' );
62
62
ok (nqp ::unbox_n($ dsc [0 ]) == 6.9 , ' deserialized object has correct value' );
63
63
}
@@ -77,7 +77,7 @@ sub add_to_sc($sc, $idx, $obj) {
77
77
my $ dsc := nqp ::createsc(' TEST_SC_4_OUT' );
78
78
nqp ::deserialize($ serialized , $ dsc , $ sh , nqp ::list(), nqp ::null());
79
79
80
- ok (nqp :: elems ($ dsc ) == 1 , ' deserialized SC has a single element ' );
80
+ ok (nqp ::scobjcount ($ dsc ) == 1 , ' deserialized SC has a single object ' );
81
81
ok (nqp ::istype($ dsc [0 ], T3), ' deserialized object has correct type' );
82
82
ok (nqp ::unbox_s($ dsc [0 ]) eq ' dugong' , ' deserialized object has correct value' );
83
83
}
@@ -114,7 +114,7 @@ sub add_to_sc($sc, $idx, $obj) {
114
114
my $ dsc := nqp ::createsc(' TEST_SC_5_OUT' );
115
115
nqp ::deserialize($ serialized , $ dsc , $ sh , nqp ::list(), nqp ::null());
116
116
117
- ok (nqp :: elems ($ dsc ) == 1 , ' deserialized SC has a single element ' );
117
+ ok (nqp ::scobjcount ($ dsc ) == 1 , ' deserialized SC has a single object ' );
118
118
ok (nqp ::istype($ dsc [0 ], T4), ' deserialized object has correct type' );
119
119
ok ($ dsc [0 ]. a == 42 , ' P6int attribute has correct value' );
120
120
ok ($ dsc [0 ]. b == 6.9 , ' P6num attribute has correct value' );
@@ -146,7 +146,7 @@ sub add_to_sc($sc, $idx, $obj) {
146
146
my $ dsc := nqp ::createsc(' TEST_SC_6_OUT' );
147
147
nqp ::deserialize($ serialized , $ dsc , $ sh , nqp ::list(), nqp ::null());
148
148
149
- ok (nqp :: elems ($ dsc ) == 2 , ' deserialized SC has 2 element ' );
149
+ ok (nqp ::scobjcount ($ dsc ) == 2 , ' deserialized SC has 2 objects ' );
150
150
ok (nqp ::istype($ dsc [0 ], T5), ' first deserialized object has correct type' );
151
151
ok (nqp ::istype($ dsc [1 ], T5), ' second deserialized object has correct type' );
152
152
ok ($ dsc [0 ]. x =:= $ dsc [1 ], ' reference from first object to second ok' );
@@ -185,7 +185,7 @@ sub add_to_sc($sc, $idx, $obj) {
185
185
my $ dsc := nqp ::createsc(' TEST_SC_7_OUT' );
186
186
nqp ::deserialize($ serialized , $ dsc , $ sh , nqp ::list(), nqp ::null());
187
187
188
- ok (nqp :: elems ($ dsc ) == 3 , ' deserialized SC has 3 elements - the one we added and two discovered' );
188
+ ok (nqp ::scobjcount ($ dsc ) == 3 , ' deserialized SC has 3 objects - the one we added and two discovered' );
189
189
ok (nqp ::istype($ dsc [0 ], T6), ' first deserialized object has correct type' );
190
190
ok (nqp ::istype($ dsc [1 ], T6), ' second deserialized object has correct type' );
191
191
ok (nqp ::istype($ dsc [2 ], T6), ' third deserialized object has correct type' );
@@ -227,7 +227,7 @@ sub add_to_sc($sc, $idx, $obj) {
227
227
my $ dsc := nqp ::createsc(' TEST_SC_8_OUT' );
228
228
nqp ::deserialize($ serialized , $ dsc , $ sh , nqp ::list(), nqp ::null());
229
229
230
- ok (nqp :: elems ($ dsc ) == 1 , ' deserialized SC has a single element ' );
230
+ ok (nqp ::scobjcount ($ dsc ) == 1 , ' deserialized SC has a single object ' );
231
231
ok (nqp ::istype($ dsc [0 ], T7), ' deserialized object has correct type' );
232
232
ok ($ dsc [0 ]. a == 42 , ' Integer survived serialization' );
233
233
ok ($ dsc [0 ]. b == 6.9 , ' Float survived serialization' );
0 commit comments