Skip to content

Commit 83bec2a

Browse files
committed
chore: add test cases
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 725bf51 commit 83bec2a

File tree

4 files changed

+40
-0
lines changed

4 files changed

+40
-0
lines changed

lib/node_modules/@stdlib/blas/base/dnrm2/test/test.dnrm2.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ tape( 'the function calculates the L2-norm of a vector ( large value ) ', functi
6565
z = dnrm2( x.length, x, 1, 0 );
6666
t.strictEqual( z, 2.0e147, 'returns expected value' );
6767

68+
x = new Float64Array( [ 2.5e146, 5.0 ] );
69+
70+
z = dnrm2( x.length, x, 1, 0 );
71+
t.strictEqual( z, 2.5e146, 'returns expected value' );
72+
6873
t.end();
6974
});
7075

@@ -77,6 +82,11 @@ tape( 'the function calculates the L2-norm of a vector ( tiny value ) ', functio
7782
z = dnrm2( x.length, x, 1, 0 );
7883
t.strictEqual( z, sqrt( 51.0 ), 'returns expected value' );
7984

85+
x = new Float64Array( [ 5.0, 1.0e155 ] );
86+
87+
z = dnrm2( x.length, x, 1, 0 );
88+
t.strictEqual( z, 1.0e155, 'returns expected value' );
89+
8090
t.end();
8191
});
8292

lib/node_modules/@stdlib/blas/base/dnrm2/test/test.dnrm2.native.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ tape( 'the function calculates the L2-norm of a vector ( large value ) ', functi
7474
z = dnrm2( x.length, x, 1, 0 );
7575
t.strictEqual( z, 2.0e147, 'returns expected value' );
7676

77+
x = new Float64Array( [ 2.5e146, 5.0 ] );
78+
79+
z = dnrm2( x.length, x, 1, 0 );
80+
t.strictEqual( z, 2.5e146, 'returns expected value' );
81+
7782
t.end();
7883
});
7984

@@ -86,6 +91,11 @@ tape( 'the function calculates the L2-norm of a vector ( tiny value ) ', functio
8691
z = dnrm2( x.length, x, 1, 0 );
8792
t.strictEqual( z, sqrt( 51.0 ), 'returns expected value' );
8893

94+
x = new Float64Array( [ 5.0, 1.0e155 ] );
95+
96+
z = dnrm2( x.length, x, 1, 0 );
97+
t.strictEqual( z, 1.0e155, 'returns expected value' );
98+
8999
t.end();
90100
});
91101

lib/node_modules/@stdlib/blas/base/dnrm2/test/test.ndarray.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ tape( 'the function calculates the L2-norm of a vector ( large value ) ', functi
6565
z = dnrm2( x.length, x, 1, 0 );
6666
t.strictEqual( z, 2.0e147, 'returns expected value' );
6767

68+
x = new Float64Array( [ 2.5e146, 5.0 ] );
69+
70+
z = dnrm2( x.length, x, 1, 0 );
71+
t.strictEqual( z, 2.5e146, 'returns expected value' );
72+
6873
t.end();
6974
});
7075

@@ -77,6 +82,11 @@ tape( 'the function calculates the L2-norm of a vector ( tiny value ) ', functio
7782
z = dnrm2( x.length, x, 1, 0 );
7883
t.strictEqual( z, sqrt( 51.0 ), 'returns expected value' );
7984

85+
x = new Float64Array( [ 5.0, 1.0e155 ] );
86+
87+
z = dnrm2( x.length, x, 1, 0 );
88+
t.strictEqual( z, 1.0e155, 'returns expected value' );
89+
8090
t.end();
8191
});
8292

lib/node_modules/@stdlib/blas/base/dnrm2/test/test.ndarray.native.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ tape( 'the function calculates the L2-norm of a vector ( large value ) ', functi
7474
z = dnrm2( x.length, x, 1, 0 );
7575
t.strictEqual( z, 2.0e147, 'returns expected value' );
7676

77+
x = new Float64Array( [ 2.5e146, 5.0 ] );
78+
79+
z = dnrm2( x.length, x, 1, 0 );
80+
t.strictEqual( z, 2.5e146, 'returns expected value' );
81+
7782
t.end();
7883
});
7984

@@ -86,6 +91,11 @@ tape( 'the function calculates the L2-norm of a vector ( tiny value ) ', functio
8691
z = dnrm2( x.length, x, 1, 0 );
8792
t.strictEqual( z, sqrt( 51.0 ), 'returns expected value' );
8893

94+
x = new Float64Array( [ 5.0, 1.0e155 ] );
95+
96+
z = dnrm2( x.length, x, 1, 0 );
97+
t.strictEqual( z, 1.0e155, 'returns expected value' );
98+
8999
t.end();
90100
});
91101

0 commit comments

Comments
 (0)