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/types/ndarray/ctor/test/test.instance.set.js
+78Lines changed: 78 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -880,3 +880,81 @@ tape( 'an ndarray constructor returns an instance which has a `set` method for s
880
880
881
881
t.end();
882
882
});
883
+
884
+
tape('an ndarray constructor returns an instance which has a `set` method for setting an array element using subscripts (>4d; row-major)',functiontest(t){
885
+
varstrides;
886
+
varbuffer;
887
+
varoffset;
888
+
vardtype;
889
+
varorder;
890
+
varshape;
891
+
vararr;
892
+
varf;
893
+
894
+
dtype='generic';
895
+
buffer=[1.0,2.0,3.0,4.0];
896
+
shape=[1,1,1,2,2];
897
+
order='row-major';
898
+
strides=[4,4,4,2,1];
899
+
offset=0;
900
+
901
+
f=ctor(dtype,shape.length);
902
+
arr=f(buffer,shape,strides,offset,order);
903
+
904
+
t.strictEqual(hasOwnProp(arr,'set'),false,'does not have own property');
tape('an ndarray constructor returns an instance which has a `set` method for setting an array element using subscripts (>4d; column-major)',functiontest(t){
924
+
varstrides;
925
+
varbuffer;
926
+
varoffset;
927
+
vardtype;
928
+
varorder;
929
+
varshape;
930
+
vararr;
931
+
varf;
932
+
933
+
dtype='generic';
934
+
buffer=[1.0,2.0,3.0,4.0];
935
+
shape=[1,1,1,2,2];
936
+
order='column-major';
937
+
strides=[1,1,1,1,2];
938
+
offset=0;
939
+
940
+
f=ctor(dtype,shape.length);
941
+
arr=f(buffer,shape,strides,offset,order);
942
+
943
+
t.strictEqual(hasOwnProp(arr,'set'),false,'does not have own property');
0 commit comments