Skip to content

Commit 0c3c08e

Browse files
fix: Check precision support for bitwise tests
1 parent 6f8d8c2 commit 0c3c08e

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

test/features/bitwise-operators.js

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ function testBitwiseAndSinglePrecision(mode) {
2828
testBitwiseAndSinglePrecision('gpu');
2929
});
3030

31-
(GPU.isWebGLSupported ? test : skip)('bitwise AND single precision webgl', () => {
31+
(GPU.isWebGLSupported && GPU.isSinglePrecisionSupported ? test : skip)('bitwise AND single precision webgl', () => {
3232
testBitwiseAndSinglePrecision('webgl');
3333
});
3434

3535
(GPU.isWebGL2Supported ? test : skip)('bitwise AND single precision webgl2', () => {
3636
testBitwiseAndSinglePrecision('webgl2');
3737
});
3838

39-
(GPU.isHeadlessGLSupported ? test : skip)('bitwise AND single precision headlessgl', () => {
39+
(GPU.isHeadlessGLSupported && GPU.isSinglePrecisionSupported ? test : skip)('bitwise AND single precision headlessgl', () => {
4040
testBitwiseAndSinglePrecision('headlessgl');
4141
});
4242

@@ -61,11 +61,11 @@ function testBitwiseAndUnsignedPrecision(mode) {
6161
gpu.destroy();
6262
}
6363

64-
(GPU.isSinglePrecisionSupported ? test : skip)('bitwise AND unsigned precision auto', () => {
64+
test('bitwise AND unsigned precision auto', () => {
6565
testBitwiseAndUnsignedPrecision();
6666
});
6767

68-
(GPU.isSinglePrecisionSupported ? test : skip)('bitwise AND unsigned precision gpu', () => {
68+
test('bitwise AND unsigned precision gpu', () => {
6969
testBitwiseAndUnsignedPrecision('gpu');
7070
});
7171

@@ -110,15 +110,15 @@ function testBitwiseOrSinglePrecision(mode) {
110110
testBitwiseOrSinglePrecision('gpu');
111111
});
112112

113-
(GPU.isWebGLSupported ? test : skip)('bitwise OR single precision webgl', () => {
113+
(GPU.isWebGLSupported && GPU.isSinglePrecisionSupported ? test : skip)('bitwise OR single precision webgl', () => {
114114
testBitwiseOrSinglePrecision('webgl');
115115
});
116116

117117
(GPU.isWebGL2Supported ? test : skip)('bitwise OR single precision webgl2', () => {
118118
testBitwiseOrSinglePrecision('webgl2');
119119
});
120120

121-
(GPU.isHeadlessGLSupported ? test : skip)('bitwise OR single precision headlessgl', () => {
121+
(GPU.isHeadlessGLSupported && GPU.isSinglePrecisionSupported? test : skip)('bitwise OR single precision headlessgl', () => {
122122
testBitwiseOrSinglePrecision('headlessgl');
123123
});
124124

@@ -143,11 +143,11 @@ function testBitwiseOrUnsignedPrecision(mode) {
143143
gpu.destroy();
144144
}
145145

146-
(GPU.isSinglePrecisionSupported ? test : skip)('bitwise OR unsigned precision auto', () => {
146+
test('bitwise OR unsigned precision auto', () => {
147147
testBitwiseOrUnsignedPrecision();
148148
});
149149

150-
(GPU.isSinglePrecisionSupported ? test : skip)('bitwise OR unsigned precision gpu', () => {
150+
test('bitwise OR unsigned precision gpu', () => {
151151
testBitwiseOrUnsignedPrecision('gpu');
152152
});
153153

@@ -192,15 +192,15 @@ function testBitwiseXORSinglePrecision(mode) {
192192
testBitwiseXORSinglePrecision('gpu');
193193
});
194194

195-
(GPU.isWebGLSupported ? test : skip)('bitwise XOR single precision webgl', () => {
195+
(GPU.isWebGLSupported && GPU.isSinglePrecisionSupported ? test : skip)('bitwise XOR single precision webgl', () => {
196196
testBitwiseXORSinglePrecision('webgl');
197197
});
198198

199199
(GPU.isWebGL2Supported ? test : skip)('bitwise XOR single precision webgl2', () => {
200200
testBitwiseXORSinglePrecision('webgl2');
201201
});
202202

203-
(GPU.isHeadlessGLSupported ? test : skip)('bitwise XOR single precision headlessgl', () => {
203+
(GPU.isHeadlessGLSupported && GPU.isSinglePrecisionSupported ? test : skip)('bitwise XOR single precision headlessgl', () => {
204204
testBitwiseXORSinglePrecision('headlessgl');
205205
});
206206

@@ -225,11 +225,11 @@ function testBitwiseXORUnsignedPrecision(mode) {
225225
gpu.destroy();
226226
}
227227

228-
(GPU.isSinglePrecisionSupported ? test : skip)('bitwise XOR unsigned precision auto', () => {
228+
test('bitwise XOR unsigned precision auto', () => {
229229
testBitwiseXORUnsignedPrecision();
230230
});
231231

232-
(GPU.isSinglePrecisionSupported ? test : skip)('bitwise XOR unsigned precision gpu', () => {
232+
test('bitwise XOR unsigned precision gpu', () => {
233233
testBitwiseXORUnsignedPrecision('gpu');
234234
});
235235

@@ -272,15 +272,15 @@ function testBitwiseNotSinglePrecision(mode) {
272272
testBitwiseNotSinglePrecision('gpu');
273273
});
274274

275-
(GPU.isWebGLSupported ? test : skip)('bitwise NOT single precision webgl', () => {
275+
(GPU.isWebGLSupported && GPU.isSinglePrecisionSupported ? test : skip)('bitwise NOT single precision webgl', () => {
276276
testBitwiseNotSinglePrecision('webgl');
277277
});
278278

279279
(GPU.isWebGL2Supported ? test : skip)('bitwise NOT single precision webgl2', () => {
280280
testBitwiseNotSinglePrecision('webgl2');
281281
});
282282

283-
(GPU.isHeadlessGLSupported ? test : skip)('bitwise NOT single precision headlessgl', () => {
283+
(GPU.isHeadlessGLSupported && GPU.isSinglePrecisionSupported ? test : skip)('bitwise NOT single precision headlessgl', () => {
284284
testBitwiseNotSinglePrecision('headlessgl');
285285
});
286286

@@ -303,11 +303,11 @@ function testBitwiseNotUnsignedPrecision(mode) {
303303
gpu.destroy();
304304
}
305305

306-
(GPU.isSinglePrecisionSupported ? test : skip)('bitwise NOT unsigned precision auto', () => {
306+
test('bitwise NOT unsigned precision auto', () => {
307307
testBitwiseNotUnsignedPrecision();
308308
});
309309

310-
(GPU.isSinglePrecisionSupported ? test : skip)('bitwise NOT unsigned precision gpu', () => {
310+
test('bitwise NOT unsigned precision gpu', () => {
311311
testBitwiseNotUnsignedPrecision('gpu');
312312
});
313313

@@ -352,15 +352,15 @@ function testBitwiseZeroFillLeftShiftSinglePrecision(mode) {
352352
testBitwiseZeroFillLeftShiftSinglePrecision('gpu');
353353
});
354354

355-
(GPU.isWebGLSupported ? test : skip)('bitwise zero fill left shift single precision webgl', () => {
355+
(GPU.isWebGLSupported && GPU.isSinglePrecisionSupported ? test : skip)('bitwise zero fill left shift single precision webgl', () => {
356356
testBitwiseZeroFillLeftShiftSinglePrecision('webgl');
357357
});
358358

359359
(GPU.isWebGL2Supported ? test : skip)('bitwise zero fill left shift single precision webgl2', () => {
360360
testBitwiseZeroFillLeftShiftSinglePrecision('webgl2');
361361
});
362362

363-
(GPU.isHeadlessGLSupported ? test : skip)('bitwise zero fill left shift single precision headlessgl', () => {
363+
(GPU.isHeadlessGLSupported && GPU.isSinglePrecisionSupported ? test : skip)('bitwise zero fill left shift single precision headlessgl', () => {
364364
testBitwiseZeroFillLeftShiftSinglePrecision('headlessgl');
365365
});
366366

@@ -385,11 +385,11 @@ function testBitwiseZeroFillLeftShiftUnsignedPrecision(mode) {
385385
gpu.destroy();
386386
}
387387

388-
(GPU.isSinglePrecisionSupported ? test : skip)('bitwise zero fill left shift unsigned precision auto', () => {
388+
test('bitwise zero fill left shift unsigned precision auto', () => {
389389
testBitwiseZeroFillLeftShiftUnsignedPrecision();
390390
});
391391

392-
(GPU.isSinglePrecisionSupported ? test : skip)('bitwise zero fill left shift unsigned precision gpu', () => {
392+
test('bitwise zero fill left shift unsigned precision gpu', () => {
393393
testBitwiseZeroFillLeftShiftUnsignedPrecision('gpu');
394394
});
395395

@@ -434,15 +434,15 @@ function testBitwiseSignedRightShiftSinglePrecision(mode) {
434434
testBitwiseSignedRightShiftSinglePrecision('gpu');
435435
});
436436

437-
(GPU.isWebGLSupported ? test : skip)('bitwise signed fill right shift single precision webgl', () => {
437+
(GPU.isWebGLSupported && GPU.isSinglePrecisionSupported ? test : skip)('bitwise signed fill right shift single precision webgl', () => {
438438
testBitwiseSignedRightShiftSinglePrecision('webgl');
439439
});
440440

441441
(GPU.isWebGL2Supported ? test : skip)('bitwise signed fill right shift single precision webgl2', () => {
442442
testBitwiseSignedRightShiftSinglePrecision('webgl2');
443443
});
444444

445-
(GPU.isHeadlessGLSupported ? test : skip)('bitwise signed fill right shift single precision headlessgl', () => {
445+
(GPU.isHeadlessGLSupported && GPU.isSinglePrecisionSupported ? test : skip)('bitwise signed fill right shift single precision headlessgl', () => {
446446
testBitwiseSignedRightShiftSinglePrecision('headlessgl');
447447
});
448448

@@ -467,11 +467,11 @@ function testBitwiseSignedRightShiftUnsignedPrecision(mode) {
467467
gpu.destroy();
468468
}
469469

470-
(GPU.isSinglePrecisionSupported ? test : skip)('bitwise signed fill right shift unsigned precision auto', () => {
470+
test('bitwise signed fill right shift unsigned precision auto', () => {
471471
testBitwiseSignedRightShiftUnsignedPrecision();
472472
});
473473

474-
(GPU.isSinglePrecisionSupported ? test : skip)('bitwise signed fill right shift unsigned precision gpu', () => {
474+
test('bitwise signed fill right shift unsigned precision gpu', () => {
475475
testBitwiseSignedRightShiftUnsignedPrecision('gpu');
476476
});
477477

@@ -516,15 +516,15 @@ function testBitwiseZeroFillRightShiftSinglePrecision(mode) {
516516
testBitwiseZeroFillRightShiftSinglePrecision('gpu');
517517
});
518518

519-
(GPU.isWebGLSupported ? test : skip)('bitwise zero fill right shift single precision webgl', () => {
519+
(GPU.isWebGLSupported && GPU.isSinglePrecisionSupported ? test : skip)('bitwise zero fill right shift single precision webgl', () => {
520520
testBitwiseZeroFillRightShiftSinglePrecision('webgl');
521521
});
522522

523523
(GPU.isWebGL2Supported ? test : skip)('bitwise zero fill right shift single precision webgl2', () => {
524524
testBitwiseZeroFillRightShiftSinglePrecision('webgl2');
525525
});
526526

527-
(GPU.isHeadlessGLSupported ? test : skip)('bitwise zero fill right shift single precision headlessgl', () => {
527+
(GPU.isHeadlessGLSupported && GPU.isSinglePrecisionSupported ? test : skip)('bitwise zero fill right shift single precision headlessgl', () => {
528528
testBitwiseZeroFillRightShiftSinglePrecision('headlessgl');
529529
});
530530

@@ -549,11 +549,11 @@ function testBitwiseZeroFillRightShiftUnsignedPrecision(mode) {
549549
gpu.destroy();
550550
}
551551

552-
(GPU.isSinglePrecisionSupported ? test : skip)('bitwise zero fill right shift unsigned precision auto', () => {
552+
test('bitwise zero fill right shift unsigned precision auto', () => {
553553
testBitwiseZeroFillRightShiftUnsignedPrecision();
554554
});
555555

556-
(GPU.isSinglePrecisionSupported ? test : skip)('bitwise zero fill right shift unsigned precision gpu', () => {
556+
test('bitwise zero fill right shift unsigned precision gpu', () => {
557557
testBitwiseZeroFillRightShiftUnsignedPrecision('gpu');
558558
});
559559

0 commit comments

Comments
 (0)