more test details logged

This commit is contained in:
Tom 2024-01-18 13:47:14 -05:00
parent bb676a8699
commit 525d9b52fe
2 changed files with 13 additions and 2 deletions

View File

@ -281,7 +281,7 @@
if(maxTextures <= 0){ if(maxTextures <= 0){
this._numGlMaxTextureErrors += 1; this._numGlMaxTextureErrors += 1;
$.console.error(`There was a WebGL problem: bad value for MAX_TEXTURE_IMAGE_UNITS (${maxTextures})`); $.console.error(`There was a WebGL problem: bad value for MAX_TEXTURE_IMAGE_UNITS (${maxTextures})`);
console.error(`There was a WebGL problem: bad value for MAX_TEXTURE_IMAGE_UNITS (${maxTextures})`); console.error(`There was a WebGL problem: bad value for MAX_TEXTURE_IMAGE_UNITS (${maxTextures}), total errors = ${this._numGlMaxTextureErrors}`);
return; return;
} else { } else {
this._numGlMaxTextureOks += 1; this._numGlMaxTextureOks += 1;

View File

@ -8,7 +8,7 @@
var SPRING_STIFFNESS = 100; // Faster animation = faster tests var SPRING_STIFFNESS = 100; // Faster animation = faster tests
var EPSILON = 0.0000000001; var EPSILON = 0.0000000001;
QUnit.module("viewport", { QUnit.module.only("viewport", {
beforeEach: function () { beforeEach: function () {
$('<div id="example"></div>').appendTo("#qunit-fixture"); $('<div id="example"></div>').appendTo("#qunit-fixture");
@ -22,6 +22,17 @@
}, },
afterEach: function () { afterEach: function () {
if (viewer){ if (viewer){
let drawers = [viewer.drawer, viewer.navigator && viewer.navigator.drawer];
for(const drawer of drawers){
if(!drawer){
return;
}
let errors = drawer._numGlMaxTextureErrors;
let ok = drawer._numGlMaxTextureErrors;
errors === 0 ? console.log('No GL errors') : errors ? console.log(`GL errors: ${errors}`) : null;
ok === 0 ? console.log('No GL calls') : ok ? console.log(`GL calls: ${ok}`) : null;
}
viewer.destroy(); viewer.destroy();
} }