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_no_codegen.js
+88Lines changed: 88 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -887,3 +887,91 @@ tape( 'an ndarray constructor returns an instance which has a `set` method for s
887
887
888
888
t.end();
889
889
});
890
+
891
+
tape('an ndarray constructor returns an instance which has a `set` method for setting an array element using subscripts (4d; row-major; codegen=false)',functiontest(t){
892
+
varstrides;
893
+
varbuffer;
894
+
varoffset;
895
+
vardtype;
896
+
varorder;
897
+
varshape;
898
+
varopts;
899
+
vararr;
900
+
varf;
901
+
902
+
opts={
903
+
'codegen': false
904
+
};
905
+
906
+
dtype='generic';
907
+
buffer=[1.0,2.0,3.0,4.0];
908
+
shape=[1,1,2,2];
909
+
order='row-major';
910
+
strides=[4,4,2,1];
911
+
offset=0;
912
+
913
+
f=ctor(dtype,shape.length,opts);
914
+
arr=f(buffer,shape,strides,offset,order);
915
+
916
+
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; codegen=false)',functiontest(t){
936
+
varstrides;
937
+
varbuffer;
938
+
varoffset;
939
+
vardtype;
940
+
varorder;
941
+
varshape;
942
+
varopts;
943
+
vararr;
944
+
varf;
945
+
946
+
opts={
947
+
'codegen': false
948
+
};
949
+
950
+
dtype='generic';
951
+
buffer=[1.0,2.0,3.0,4.0];
952
+
shape=[1,1,2,2];
953
+
order='column-major';
954
+
strides=[1,1,1,2];
955
+
offset=0;
956
+
957
+
f=ctor(dtype,shape.length,opts);
958
+
arr=f(buffer,shape,strides,offset,order);
959
+
960
+
t.strictEqual(hasOwnProp(arr,'set'),false,'does not have own property');
0 commit comments