MCPcopy
hub / github.com/greggman/twgl.js / assertWebGLError

Function assertWebGLError

test/webgl.js:4–7  ·  view source on GitHub ↗
(gl, expected, msg = '')

Source from the content-addressed store, hash-verified

2import {assertArrayEqual, assertEqual} from './assert.js';
3
4export function assertWebGLError(gl, expected, msg = '') {
5 const err = gl.getError();
6 assertEqual(err, expected, `${twgl.glEnumToString(gl, err)} === ${twgl.glEnumToString(gl, expected)}: ${msg}`);
7}
8
9export function assertNoWebGLError(gl, msg = '') {
10 assertWebGLError(gl, gl.NO_ERROR, msg);

Callers 1

assertNoWebGLErrorFunction · 0.85

Calls 1

assertEqualFunction · 0.90

Tested by

no test coverage detected