From 44b66be0a9731f13bce677be0b60173734b33907 Mon Sep 17 00:00:00 2001 From: Tom Date: Wed, 17 Jan 2024 17:07:25 -0500 Subject: [PATCH] update tests --- test/modules/ajax-tiles.js | 4 ++++ test/modules/basic.js | 4 ++++ test/modules/controls.js | 8 ++++++-- test/modules/drawer.js | 4 ++++ test/modules/events.js | 5 ++++- test/modules/formats.js | 4 ++++ test/modules/imageloader.js | 4 ++++ test/modules/multi-image.js | 2 +- test/modules/navigator.js | 4 ++++ test/modules/overlays.js | 8 ++++++-- test/modules/referencestrip.js | 4 ++++ test/modules/tiledimage.js | 4 ++++ test/modules/tilesource-dynamic-url.js | 4 ++++ test/modules/units.js | 4 ++++ test/modules/viewerretrieval.js | 12 ++++++++++-- test/modules/viewport.js | 4 ++++ test/modules/world.js | 4 ++++ 17 files changed, 75 insertions(+), 8 deletions(-) diff --git a/test/modules/ajax-tiles.js b/test/modules/ajax-tiles.js index fc0b0545..967b907b 100644 --- a/test/modules/ajax-tiles.js +++ b/test/modules/ajax-tiles.js @@ -54,6 +54,10 @@ }, afterEach: function() { if (viewer){ + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } viewer.destroy(); } diff --git a/test/modules/basic.js b/test/modules/basic.js index bf2fc077..ad7234a9 100644 --- a/test/modules/basic.js +++ b/test/modules/basic.js @@ -17,6 +17,10 @@ }, afterEach: function () { if (viewer){ + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } viewer.destroy(); } diff --git a/test/modules/controls.js b/test/modules/controls.js index 7e774d9b..d40fb8d7 100644 --- a/test/modules/controls.js +++ b/test/modules/controls.js @@ -16,8 +16,12 @@ }, afterEach: function () { - if (viewer && viewer.close) { - viewer.close(); + if (viewer){ + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } + viewer.destroy(); } viewer = null; diff --git a/test/modules/drawer.js b/test/modules/drawer.js index e7b8e8cf..e9f1466d 100644 --- a/test/modules/drawer.js +++ b/test/modules/drawer.js @@ -15,6 +15,10 @@ }, afterEach: function () { if (viewer){ + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } viewer.destroy(); } viewer = null; diff --git a/test/modules/events.js b/test/modules/events.js index 6b033ba9..f40ed45b 100644 --- a/test/modules/events.js +++ b/test/modules/events.js @@ -18,9 +18,12 @@ }, afterEach: function () { if (viewer){ + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } viewer.destroy(); } - viewer = null; } } ); diff --git a/test/modules/formats.js b/test/modules/formats.js index 6b5c7fb6..0c499bcf 100644 --- a/test/modules/formats.js +++ b/test/modules/formats.js @@ -15,6 +15,10 @@ }, afterEach: function () { if (viewer){ + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } viewer.destroy(); } diff --git a/test/modules/imageloader.js b/test/modules/imageloader.js index 7a7d6768..13dc3cbf 100644 --- a/test/modules/imageloader.js +++ b/test/modules/imageloader.js @@ -16,6 +16,10 @@ }, afterEach: function () { if (viewer){ + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } viewer.destroy(); } diff --git a/test/modules/multi-image.js b/test/modules/multi-image.js index 25fa5528..9fc20021 100644 --- a/test/modules/multi-image.js +++ b/test/modules/multi-image.js @@ -7,7 +7,7 @@ function runDrawerTests(drawerType){ - QUnit.module.only( 'Multi-Image-'+drawerType, { + QUnit.module( 'Multi-Image-'+drawerType, { beforeEach: function() { $( '
' ).appendTo( "#qunit-fixture" ); diff --git a/test/modules/navigator.js b/test/modules/navigator.js index cb5c425f..321b160b 100644 --- a/test/modules/navigator.js +++ b/test/modules/navigator.js @@ -43,6 +43,10 @@ resetTestVariables(); if (viewer){ + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } viewer.destroy(); } diff --git a/test/modules/overlays.js b/test/modules/overlays.js index 613c0de3..8b9cd58f 100644 --- a/test/modules/overlays.js +++ b/test/modules/overlays.js @@ -26,8 +26,12 @@ }); var resetTestVariables = function() { - if (viewer) { - viewer.close(); + if (viewer){ + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } + viewer.destroy(); } }; diff --git a/test/modules/referencestrip.js b/test/modules/referencestrip.js index 86e0c5ee..746a37f3 100644 --- a/test/modules/referencestrip.js +++ b/test/modules/referencestrip.js @@ -11,6 +11,10 @@ }, afterEach: function () { if (viewer){ + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } viewer.destroy(); } diff --git a/test/modules/tiledimage.js b/test/modules/tiledimage.js index 6c33b752..e3c046b0 100644 --- a/test/modules/tiledimage.js +++ b/test/modules/tiledimage.js @@ -21,6 +21,10 @@ }, afterEach: function() { if (viewer){ + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } viewer.destroy(); } diff --git a/test/modules/tilesource-dynamic-url.js b/test/modules/tilesource-dynamic-url.js index 099530af..48b59d71 100644 --- a/test/modules/tilesource-dynamic-url.js +++ b/test/modules/tilesource-dynamic-url.js @@ -137,6 +137,10 @@ ASSERT = null; if (viewer){ + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } viewer.destroy(); } diff --git a/test/modules/units.js b/test/modules/units.js index e1190603..540e439b 100644 --- a/test/modules/units.js +++ b/test/modules/units.js @@ -20,6 +20,10 @@ }, afterEach: function () { if (viewer){ + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } viewer.destroy(); } diff --git a/test/modules/viewerretrieval.js b/test/modules/viewerretrieval.js index 79c1c7b2..81fa5b2a 100644 --- a/test/modules/viewerretrieval.js +++ b/test/modules/viewerretrieval.js @@ -25,10 +25,18 @@ }, afterEach: function () { - if (viewer1 && viewer1.destroy) { + if (viewer1){ + let errors = viewer1.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } viewer1.destroy(); } - if (viewer2 && viewer2.destroy) { + if (viewer2){ + let errors = viewer2.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } viewer2.destroy(); } viewer1 = viewer2 = null; diff --git a/test/modules/viewport.js b/test/modules/viewport.js index 995447bd..455def67 100644 --- a/test/modules/viewport.js +++ b/test/modules/viewport.js @@ -22,6 +22,10 @@ }, afterEach: function () { if (viewer){ + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } viewer.destroy(); } diff --git a/test/modules/world.js b/test/modules/world.js index 49253fd5..6a9b3bb1 100644 --- a/test/modules/world.js +++ b/test/modules/world.js @@ -17,6 +17,10 @@ }, afterEach: function () { if (viewer){ + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } viewer.destroy(); }