From b8cc3db63853dc4e9b4b949abc36bac20c3bf305 Mon Sep 17 00:00:00 2001 From: Athan Reines Date: Fri, 20 Sep 2024 02:11:32 -0700 Subject: [PATCH] test: use `Module` constructor directly --- .../base/daxpy-wasm/test/test.module.main.js | 24 ++++++++-------- .../daxpy-wasm/test/test.module.ndarray.js | 28 +++++++++---------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/daxpy-wasm/test/test.module.main.js b/lib/node_modules/@stdlib/blas/base/daxpy-wasm/test/test.module.main.js index df480bb8b47..37a0073f558 100644 --- a/lib/node_modules/@stdlib/blas/base/daxpy-wasm/test/test.module.main.js +++ b/lib/node_modules/@stdlib/blas/base/daxpy-wasm/test/test.module.main.js @@ -25,14 +25,14 @@ var tape = require( 'tape' ); var Memory = require( '@stdlib/wasm/memory' ); var Float64Array = require( '@stdlib/array/float64' ); -var daxpy = require( './../lib' ); +var Module = require( './../lib' ).Module; // TESTS // -tape( 'main export is an object', function test( t ) { +tape( 'main export is a function', function test( t ) { t.ok( true, __filename ); - t.strictEqual( typeof daxpy, 'object', 'main export is an object' ); + t.strictEqual( typeof Module, 'function', 'main export is a function' ); t.end(); }); @@ -43,7 +43,7 @@ tape( 'a module instance has a `main` method which has an arity of 6', function mem = new Memory({ 'initial': 0 }); - mod = new daxpy.Module( mem ); + mod = new Module( mem ); t.strictEqual( mod.main.length, 6, 'returns expected value' ); t.end(); }); @@ -59,7 +59,7 @@ tape( 'a module instance has a `main` method which multiplies `x` by a constant mem = new Memory({ 'initial': 1 }); - mod = new daxpy.Module( mem ); + mod = new Module( mem ); mod.initializeSync(); xp = 0; @@ -105,7 +105,7 @@ tape( 'a module instance has a `main` method which efficiently handles the case mem = new Memory({ 'initial': 1 }); - mod = new daxpy.Module( mem ); + mod = new Module( mem ); mod.initializeSync(); xp = 0; @@ -137,7 +137,7 @@ tape( 'a module instance has a `main` method which supports an `x` stride', func mem = new Memory({ 'initial': 1 }); - mod = new daxpy.Module( mem ); + mod = new Module( mem ); mod.initializeSync(); xp = 0; @@ -182,7 +182,7 @@ tape( 'a module instance has a `main` method which supports a `y` stride', funct mem = new Memory({ 'initial': 1 }); - mod = new daxpy.Module( mem ); + mod = new Module( mem ); mod.initializeSync(); xp = 0; @@ -225,7 +225,7 @@ tape( 'a module instance has a `main` method which returns a pointer to the outp mem = new Memory({ 'initial': 1 }); - mod = new daxpy.Module( mem ); + mod = new Module( mem ); mod.initializeSync(); xp = 0; @@ -251,7 +251,7 @@ tape( 'if provided an `N` parameter less than or equal to `0`, a module instance mem = new Memory({ 'initial': 1 }); - mod = new daxpy.Module( mem ); + mod = new Module( mem ); mod.initializeSync(); xp = 0; @@ -287,7 +287,7 @@ tape( 'a module instance has a `main` method which supports negative strides', f mem = new Memory({ 'initial': 1 }); - mod = new daxpy.Module( mem ); + mod = new Module( mem ); mod.initializeSync(); xp = 0; @@ -332,7 +332,7 @@ tape( 'a module instance has a `main` method which supports complex access patte mem = new Memory({ 'initial': 1 }); - mod = new daxpy.Module( mem ); + mod = new Module( mem ); mod.initializeSync(); xp = 0; diff --git a/lib/node_modules/@stdlib/blas/base/daxpy-wasm/test/test.module.ndarray.js b/lib/node_modules/@stdlib/blas/base/daxpy-wasm/test/test.module.ndarray.js index 331b7d74c18..c2db815a3e3 100644 --- a/lib/node_modules/@stdlib/blas/base/daxpy-wasm/test/test.module.ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/daxpy-wasm/test/test.module.ndarray.js @@ -25,14 +25,14 @@ var tape = require( 'tape' ); var Memory = require( '@stdlib/wasm/memory' ); var Float64Array = require( '@stdlib/array/float64' ); -var daxpy = require( './../lib' ); +var Module = require( './../lib' ).Module; // TESTS // -tape( 'main export is an object', function test( t ) { +tape( 'main export is a function', function test( t ) { t.ok( true, __filename ); - t.strictEqual( typeof daxpy, 'object', 'main export is an object' ); + t.strictEqual( typeof Module, 'function', 'main export is a function' ); t.end(); }); @@ -43,7 +43,7 @@ tape( 'a module instance has an `ndarray` method which has an arity of 8', funct mem = new Memory({ 'initial': 0 }); - mod = new daxpy.Module( mem ); + mod = new Module( mem ); t.strictEqual( mod.ndarray.length, 8, 'returns expected value' ); t.end(); }); @@ -59,7 +59,7 @@ tape( 'a module instance has an `ndarray` method which multiplies `x` by a const mem = new Memory({ 'initial': 1 }); - mod = new daxpy.Module( mem ); + mod = new Module( mem ); mod.initializeSync(); xp = 0; @@ -105,7 +105,7 @@ tape( 'a module instance has an `ndarray` method which efficiently handles the c mem = new Memory({ 'initial': 1 }); - mod = new daxpy.Module( mem ); + mod = new Module( mem ); mod.initializeSync(); xp = 0; @@ -137,7 +137,7 @@ tape( 'a module instance has an `ndarray` method which supports an `x` stride', mem = new Memory({ 'initial': 1 }); - mod = new daxpy.Module( mem ); + mod = new Module( mem ); mod.initializeSync(); xp = 0; @@ -182,7 +182,7 @@ tape( 'a module instance has an `ndarray` method which supports an `x` offset', mem = new Memory({ 'initial': 1 }); - mod = new daxpy.Module( mem ); + mod = new Module( mem ); mod.initializeSync(); xp = 0; @@ -227,7 +227,7 @@ tape( 'a module instance has an `ndarray` method which supports a `y` stride', f mem = new Memory({ 'initial': 1 }); - mod = new daxpy.Module( mem ); + mod = new Module( mem ); mod.initializeSync(); xp = 0; @@ -272,7 +272,7 @@ tape( 'a module instance has an `ndarray` method which supports a `y` offset', f mem = new Memory({ 'initial': 1 }); - mod = new daxpy.Module( mem ); + mod = new Module( mem ); mod.initializeSync(); xp = 0; @@ -315,7 +315,7 @@ tape( 'a module instance has an `ndarray` method which returns a pointer to the mem = new Memory({ 'initial': 1 }); - mod = new daxpy.Module( mem ); + mod = new Module( mem ); mod.initializeSync(); xp = 0; @@ -341,7 +341,7 @@ tape( 'if provided an `N` parameter less than or equal to `0`, a module instance mem = new Memory({ 'initial': 1 }); - mod = new daxpy.Module( mem ); + mod = new Module( mem ); mod.initializeSync(); xp = 0; @@ -377,7 +377,7 @@ tape( 'a module instance has an `ndarray` method which supports negative strides mem = new Memory({ 'initial': 1 }); - mod = new daxpy.Module( mem ); + mod = new Module( mem ); mod.initializeSync(); xp = 0; @@ -422,7 +422,7 @@ tape( 'a module instance has an `ndarray` method which supports complex access p mem = new Memory({ 'initial': 1 }); - mod = new daxpy.Module( mem ); + mod = new Module( mem ); mod.initializeSync(); xp = 0;