You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/array/to-fancy/test/test.get.boolean_array.js
+55-3Lines changed: 55 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -99,7 +99,7 @@ tape( 'the function returns an array-like object supporting boolean array indexi
99
99
t.end();
100
100
});
101
101
102
-
tape('the function returns an array-like object boolean array indexing (typed)',opts,functiontest(t){
102
+
tape('the function returns an array-like object supporting boolean array indexing and returning arrays (typed)',opts,functiontest(t){
103
103
varexpected;
104
104
varactual;
105
105
varidx;
@@ -157,7 +157,7 @@ tape( 'the function returns an array-like object boolean array indexing (typed)'
157
157
t.end();
158
158
});
159
159
160
-
tape('the function returns an array-like object boolean array indexing which can themselves support boolean arrays (generic)',opts,functiontest(t){
160
+
tape('the function returns an array-like object supporting boolean array indexing and returning arrays which can themselves support boolean arrays (generic)',opts,functiontest(t){
161
161
varexpected;
162
162
varactual;
163
163
varidx;
@@ -204,7 +204,7 @@ tape( 'the function returns an array-like object boolean array indexing which ca
204
204
t.end();
205
205
});
206
206
207
-
tape('the function returns an array-like object boolean array indexing which can themselves support boolean arrays (typed)',opts,functiontest(t){
207
+
tape('the function returns an array-like object supporting boolean array indexing and returning arrays which can themselves support boolean arrays (typed)',opts,functiontest(t){
208
208
varexpected;
209
209
varactual;
210
210
varidx;
@@ -250,3 +250,55 @@ tape( 'the function returns an array-like object boolean array indexing which ca
250
250
251
251
t.end();
252
252
});
253
+
254
+
tape('the function returns an array-like object which throws an error if provided a boolean array index having an incompatible number of elements (generic)',opts,functiontest(t){
255
+
varvalues;
256
+
varx;
257
+
vary;
258
+
vari;
259
+
260
+
x=[1,2,3,4];
261
+
y=array2fancy(x);
262
+
263
+
values=[
264
+
array2fancy.idx([true,false]),
265
+
array2fancy.idx([true,true,true]),
266
+
array2fancy.idx([true,false,true,false,true])
267
+
];
268
+
for(i=0;i<values.length;i++){
269
+
t.throws(badValue(values[i]),Error,'throws an error');
tape('the function returns an array-like object which throws an error if provided a boolean array index having an incompatible number of elements (typed)',opts,functiontest(t){
281
+
varvalues;
282
+
varx;
283
+
vary;
284
+
vari;
285
+
286
+
x=newInt32Array([1,2,3,4]);
287
+
y=array2fancy(x);
288
+
289
+
values=[
290
+
array2fancy.idx([true,false]),
291
+
array2fancy.idx([true,true,true]),
292
+
array2fancy.idx([true,false,true,false,true])
293
+
];
294
+
for(i=0;i<values.length;i++){
295
+
t.throws(badValue(values[i]),Error,'throws an error');
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/array/to-fancy/test/test.get.integer_array.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -126,7 +126,7 @@ tape( 'the function returns an array-like object supporting integer array indexi
126
126
t.end();
127
127
});
128
128
129
-
tape('the function returns an array-like object integer array indexing (typed)',opts,functiontest(t){
129
+
tape('the function returns an array-like object supporting integer array indexing (typed)',opts,functiontest(t){
130
130
varexpected;
131
131
varactual;
132
132
varidx;
@@ -375,7 +375,7 @@ tape( 'when `strict` is `true`, the function returns an array-like object which
375
375
}
376
376
});
377
377
378
-
tape('the function returns an array-like object integer array indexing which can themselves support integer arrays (generic)',opts,functiontest(t){
378
+
tape('the function returns an array-like object supporting integer array indexing and returning arrays which themselves support integer arrays (generic)',opts,functiontest(t){
379
379
varexpected;
380
380
varactual;
381
381
varidx;
@@ -422,7 +422,7 @@ tape( 'the function returns an array-like object integer array indexing which ca
422
422
t.end();
423
423
});
424
424
425
-
tape('the function returns an array-like object integer array indexing which can themselves support integer arrays (typed)',opts,functiontest(t){
425
+
tape('the function returns an array-like object supporting integer array indexing and returning arrays which themselves support integer arrays (typed)',opts,functiontest(t){
0 commit comments