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
@@ -802,3 +802,81 @@ tape( 'an ndarray constructor returns an instance which has a `set` method for s
802
802
803
803
t.end();
804
804
});
805
+
806
+
tape('an ndarray constructor returns an instance which has a `set` method for setting an array element using subscripts (4d; row-major)',functiontest(t){
807
+
varstrides;
808
+
varbuffer;
809
+
varoffset;
810
+
vardtype;
811
+
varorder;
812
+
varshape;
813
+
vararr;
814
+
varf;
815
+
816
+
dtype='generic';
817
+
buffer=[1.0,2.0,3.0,4.0];
818
+
shape=[1,1,2,2];
819
+
order='row-major';
820
+
strides=[4,4,2,1];
821
+
offset=0;
822
+
823
+
f=ctor(dtype,shape.length);
824
+
arr=f(buffer,shape,strides,offset,order);
825
+
826
+
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){
846
+
varstrides;
847
+
varbuffer;
848
+
varoffset;
849
+
vardtype;
850
+
varorder;
851
+
varshape;
852
+
vararr;
853
+
varf;
854
+
855
+
dtype='generic';
856
+
buffer=[1.0,2.0,3.0,4.0];
857
+
shape=[1,1,2,2];
858
+
order='column-major';
859
+
strides=[1,1,1,2];
860
+
offset=0;
861
+
862
+
f=ctor(dtype,shape.length);
863
+
arr=f(buffer,shape,strides,offset,order);
864
+
865
+
t.strictEqual(hasOwnProp(arr,'set'),false,'does not have own property');
0 commit comments