@@ -88,7 +88,6 @@ function test(file) {
88
88
{
89
89
let arr = [ 1 , 2 , 3 , 4 , 5 , 0x80000000 | 0 ] ;
90
90
let ref = exports . __newArray ( exports . INT32ARRAY_ID , arr ) ;
91
- assert ( exports . __instanceof ( ref , exports . INT32ARRAY_ID ) ) ;
92
91
93
92
// should be able to get the values of an array
94
93
assert . deepStrictEqual ( exports . __getArray ( ref ) , arr ) ;
@@ -104,7 +103,6 @@ function test(file) {
104
103
{
105
104
let arr = [ 1 , 2 , 3 , 4 , 5 , 0x80000000 | 0 ] ;
106
105
let ref = exports . __newArray ( exports . STATICARRAYI32_ID , arr ) ;
107
- assert ( exports . __instanceof ( ref , exports . STATICARRAYI32_ID ) ) ;
108
106
109
107
// should be able to get the values of an array
110
108
assert . deepStrictEqual ( exports . __getArray ( ref ) , arr ) ;
@@ -120,17 +118,14 @@ function test(file) {
120
118
{
121
119
let arrU8Arr = new Uint8Array([0, 1, 2]);
122
120
let refU8Arr = module.__newUint8Array(arrU8Arr);
123
- assert(module.__instanceof(refU8Arr, module.UINT8ARRAY_ID));
124
121
assert.deepStrictEqual(module.__getUint8Array(refU8Arr), arrU8Arr);
125
122
126
123
let arrU16Arr = new Uint16Array([0, 0x7FFF, 0xFFFF]);
127
124
let refU16Arr = module.__newUint16Array(arrU16Arr);
128
- assert(module.__instanceof(refU16Arr, module.UINT16ARRAY_ID));
129
125
assert.deepStrictEqual(module.__getUint16Array(refU16Arr), arrU16Arr);
130
126
131
127
let arrI16Arr = new Int16Array([0, -1, -2]);
132
128
let refI16Arr = module.__newInt16Array(arrI16Arr);
133
- assert(module.__instanceof(refI16Arr, module.INT16ARRAY_ID));
134
129
assert.deepStrictEqual(module.__getInt16Array(refI16Arr), arrI16Arr);
135
130
}
136
131
*/
@@ -140,7 +135,6 @@ function test(file) {
140
135
let values = [ 0 , 255 , 127 ] ;
141
136
let arr = new Uint8Array ( values ) ;
142
137
let ref = exports . __newArray ( exports . UINT8ARRAY_ID , arr ) ;
143
- assert ( exports . __instanceof ( ref , exports . UINT8ARRAY_ID ) ) ;
144
138
assert . deepStrictEqual ( exports . __getUint8Array ( ref ) , arr ) ;
145
139
assert . deepStrictEqual ( exports . __getUint8ArrayView ( ref ) , arr ) ;
146
140
assert . deepStrictEqual ( exports . __getArray ( ref ) , values ) ;
@@ -150,7 +144,6 @@ function test(file) {
150
144
{
151
145
let arr = [ 0 , 255 , 127 ] ;
152
146
let ref = exports . __newArray ( exports . STATICARRAYU8_ID , arr ) ;
153
- assert ( exports . __instanceof ( ref , exports . STATICARRAYU8_ID ) ) ;
154
147
assert . deepStrictEqual ( exports . __getArray ( ref ) , arr ) ;
155
148
}
156
149
@@ -159,7 +152,6 @@ function test(file) {
159
152
let values = [ 0 , 0xFFFF , - 0x00FF ] ;
160
153
let arr = new Int16Array ( values ) ;
161
154
let ref = exports . __newArray ( exports . INT16ARRAY_ID , arr ) ;
162
- assert ( exports . __instanceof ( ref , exports . INT16ARRAY_ID ) ) ;
163
155
assert . deepStrictEqual ( exports . __getInt16Array ( ref ) , arr ) ;
164
156
assert . deepStrictEqual ( exports . __getInt16ArrayView ( ref ) , arr ) ;
165
157
assert . deepStrictEqual ( exports . __getArray ( ref ) , [ 0 , - 1 , - 255 ] ) ;
@@ -169,7 +161,6 @@ function test(file) {
169
161
{
170
162
let arr = [ 0 , 0xFFFF , - 0x00FF ] ;
171
163
let ref = exports . __newArray ( exports . STATICARRAYI16_ID , arr ) ;
172
- assert ( exports . __instanceof ( ref , exports . STATICARRAYI16_ID ) ) ;
173
164
assert . deepStrictEqual ( exports . __getArray ( ref ) , [ 0 , - 1 , - 255 ] ) ;
174
165
}
175
166
@@ -178,7 +169,6 @@ function test(file) {
178
169
let values = [ 1 , - 1 >>> 0 , 0x80000000 ] ;
179
170
let arr = new Uint32Array ( values ) ;
180
171
let ref = exports . __newArray ( exports . UINT32ARRAY_ID , arr ) ;
181
- assert ( exports . __instanceof ( ref , exports . UINT32ARRAY_ID ) ) ;
182
172
assert . deepStrictEqual ( exports . __getUint32Array ( ref ) , arr ) ;
183
173
assert . deepStrictEqual ( exports . __getUint32ArrayView ( ref ) , arr ) ;
184
174
assert . deepStrictEqual ( exports . __getArray ( ref ) , values ) ;
@@ -188,7 +178,6 @@ function test(file) {
188
178
{
189
179
let arr = [ 1 , - 1 >>> 0 , 0x80000000 ] ;
190
180
let ref = exports . __newArray ( exports . STATICARRAYU32_ID , arr ) ;
191
- assert ( exports . __instanceof ( ref , exports . STATICARRAYU32_ID ) ) ;
192
181
assert . deepStrictEqual ( exports . __getArray ( ref ) , arr ) ;
193
182
}
194
183
@@ -197,7 +186,6 @@ function test(file) {
197
186
let values = [ 0.0 , 1.5 , 2.5 ] ;
198
187
let arr = new Float32Array ( values ) ;
199
188
let ref = exports . __newArray ( exports . FLOAT32ARRAY_ID , arr ) ;
200
- assert ( exports . __instanceof ( ref , exports . FLOAT32ARRAY_ID ) ) ;
201
189
assert . deepStrictEqual ( exports . __getFloat32Array ( ref ) , arr ) ;
202
190
assert . deepStrictEqual ( exports . __getFloat32ArrayView ( ref ) , arr ) ;
203
191
assert . deepStrictEqual ( exports . __getArray ( ref ) , values ) ;
@@ -207,29 +195,25 @@ function test(file) {
207
195
{
208
196
let arr = [ 0.0 , 1.5 , 2.5 ] ;
209
197
let ref = exports . __newArray ( exports . STATICARRAYF32_ID , arr ) ;
210
- assert ( exports . __instanceof ( ref , exports . STATICARRAYF32_ID ) ) ;
211
198
assert . deepStrictEqual ( exports . __getArray ( ref ) , arr ) ;
212
199
}
213
200
214
201
// should be able to create empty arrays
215
202
{
216
203
let ref = exports . __newArray ( exports . ARRAYI32_ID ) ;
217
- assert ( exports . __instanceof ( ref , exports . ARRAYI32_ID ) ) ;
218
204
assert . deepStrictEqual ( exports . __getArray ( ref ) , [ ] ) ;
219
205
}
220
206
221
207
// should be able to create arrays with capacity
222
208
{
223
209
let ref = exports . __newArray ( exports . ARRAYI32_ID , 32 ) ;
224
- assert ( exports . __instanceof ( ref , exports . ARRAYI32_ID ) ) ;
225
210
assert . strictEqual ( exports . __getArray ( ref ) . length , 32 ) ;
226
211
}
227
212
228
213
// should be able to work with normal arrays
229
214
{
230
215
let arr = [ 1 , 2 , 3 , 4 , 5 ] ;
231
216
let ref = exports . __newArray ( exports . ARRAYI32_ID , arr ) ;
232
- assert ( exports . __instanceof ( ref , exports . ARRAYI32_ID ) ) ;
233
217
exports . changeLength ( ref , 3 ) ;
234
218
assert . deepStrictEqual ( exports . __getArray ( ref ) , [ 1 , 2 , 3 ] ) ;
235
219
}
0 commit comments