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
@@ -975,3 +975,91 @@ tape( 'an ndarray constructor returns an instance which has a `set` method for s
975
975
976
976
t.end();
977
977
});
978
+
979
+
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){
980
+
varstrides;
981
+
varbuffer;
982
+
varoffset;
983
+
vardtype;
984
+
varorder;
985
+
varshape;
986
+
varopts;
987
+
vararr;
988
+
varf;
989
+
990
+
opts={
991
+
'codegen': false
992
+
};
993
+
994
+
dtype='generic';
995
+
buffer=[1.0,2.0,3.0,4.0];
996
+
shape=[1,1,1,2,2];
997
+
order='row-major';
998
+
strides=[4,4,4,2,1];
999
+
offset=0;
1000
+
1001
+
f=ctor(dtype,shape.length,opts);
1002
+
arr=f(buffer,shape,strides,offset,order);
1003
+
1004
+
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){
1024
+
varstrides;
1025
+
varbuffer;
1026
+
varoffset;
1027
+
vardtype;
1028
+
varorder;
1029
+
varshape;
1030
+
varopts;
1031
+
vararr;
1032
+
varf;
1033
+
1034
+
opts={
1035
+
'codegen': false
1036
+
};
1037
+
1038
+
dtype='generic';
1039
+
buffer=[1.0,2.0,3.0,4.0];
1040
+
shape=[1,1,1,2,2];
1041
+
order='column-major';
1042
+
strides=[1,1,1,1,2];
1043
+
offset=0;
1044
+
1045
+
f=ctor(dtype,shape.length,opts);
1046
+
arr=f(buffer,shape,strides,offset,order);
1047
+
1048
+
t.strictEqual(hasOwnProp(arr,'set'),false,'does not have own property');
0 commit comments