File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
lib/node_modules/@stdlib/ndarray/concat/test Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,45 @@ tape( 'the function throws an error if provided a second argument which is not a
115
115
}
116
116
} ) ;
117
117
118
+ tape ( 'the function throws an error if provided a third argument which is not a negative integer' , function test ( t ) {
119
+ var values ;
120
+ var x ;
121
+ var y ;
122
+ var z ;
123
+ var i ;
124
+
125
+ x = zeros ( [ 2 , 2 ] ) ;
126
+ y = zeros ( [ 2 , 2 ] ) ;
127
+ z = zeros ( [ 2 , 4 ] ) ;
128
+
129
+ values = [
130
+ '5' ,
131
+ 5.5 ,
132
+ 0 ,
133
+ 1 ,
134
+ 2 ,
135
+ NaN ,
136
+ true ,
137
+ false ,
138
+ null ,
139
+ void 0 ,
140
+ [ ] ,
141
+ { } ,
142
+ function noop ( ) { }
143
+ ] ;
144
+
145
+ for ( i = 0 ; i < values . length ; i ++ ) {
146
+ t . throws ( badValue ( values [ i ] ) , TypeError , 'throws an error when provided ' + values [ i ] ) ;
147
+ }
148
+ t . end ( ) ;
149
+
150
+ function badValue ( value ) {
151
+ return function badValue ( ) {
152
+ assign ( [ x , y ] , z , value ) ;
153
+ } ;
154
+ }
155
+ } ) ;
156
+
118
157
tape ( 'the function concatenates ndarrays along a specified dimension' , function test ( t ) {
119
158
var expected ;
120
159
var actual ;
You can’t perform that action at this time.
0 commit comments