Skip to content

Commit 76a39f5

Browse files
committed
test: add tests for full coverage
--- 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: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 9c2193f commit 76a39f5

File tree

14 files changed

+511
-0
lines changed

14 files changed

+511
-0
lines changed

lib/node_modules/@stdlib/math/base/special/fresnel/test/test.assign.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,18 @@ tape( 'the function returns `[-0.5, -0.5]` if provided `-infinity`', function te
238238
t.end();
239239
});
240240

241+
tape( 'the function returns `[0.0, 0.0]` if provided `0.0`', function test( t ) {
242+
var v;
243+
var z;
244+
245+
z = [ 0.0, 0.0 ];
246+
v = fresnel( 0.0, z, 1, 0 );
247+
t.strictEqual( v, z, 'returns expected value' );
248+
t.strictEqual( v[0], 0.0, 'returns expected value' );
249+
t.strictEqual( v[1], 0.0, 'returns expected value' );
250+
t.end();
251+
});
252+
241253
tape( 'the function returns `[NaN, NaN]` if provided a `NaN`', function test( t ) {
242254
var v;
243255
var z;

lib/node_modules/@stdlib/math/base/special/fresnel/test/test.main.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,13 @@ tape( 'the function returns `[-0.5, -0.5]` if provided `-infinity`', function te
209209
t.end();
210210
});
211211

212+
tape( 'the function returns `[0.0, 0.0]` if provided `0.0`', function test( t ) {
213+
var v = fresnel( 0.0 );
214+
t.strictEqual( v[0], 0.0, 'returns expected value' );
215+
t.strictEqual( v[1], 0.0, 'returns expected value' );
216+
t.end();
217+
});
218+
212219
tape( 'the function returns `[NaN, NaN]` if provided a `NaN`', function test( t ) {
213220
var v = fresnel( NaN );
214221
t.strictEqual( isnan( v[0] ), true, 'returns expected value' );
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2025 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
'use strict';
20+
21+
// MODULES //
22+
23+
var tape = require( 'tape' );
24+
var polyC = require( './../lib/rational_pcqc.js' );
25+
26+
27+
// TESTS //
28+
29+
tape( 'main export is a function', function test( t ) {
30+
t.ok( true, __filename );
31+
t.strictEqual( typeof polyC, 'function', 'main export is a function' );
32+
t.end();
33+
});
34+
35+
tape( 'the function returns expected value for x = 0.0', function test( t ) {
36+
var v = polyC( 0.0 );
37+
t.strictEqual( v, 1.0, 'returns expected value' );
38+
t.end();
39+
});
40+
41+
tape( 'the function handles negative values', function test( t ) {
42+
var v;
43+
44+
v = polyC( -0.5 );
45+
t.strictEqual( typeof v, 'number', 'returns a number' );
46+
t.strictEqual( v, v, 'does not return NaN' );
47+
t.end();
48+
});
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2025 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
'use strict';
20+
21+
// MODULES //
22+
23+
var tape = require( 'tape' );
24+
var polyF = require( './../lib/rational_pfqf.js' );
25+
26+
27+
// TESTS //
28+
29+
tape( 'main export is a function', function test( t ) {
30+
t.ok( true, __filename );
31+
t.strictEqual( typeof polyF, 'function', 'main export is a function' );
32+
t.end();
33+
});
34+
35+
tape( 'the function returns expected value for x = 0.0', function test( t ) {
36+
var v = polyF( 0.0 );
37+
t.strictEqual( v, 2.999999999999634, 'returns expected value' );
38+
t.end();
39+
});
40+
41+
tape( 'the function handles negative values', function test( t ) {
42+
var v;
43+
44+
v = polyF( -0.5 );
45+
t.strictEqual( typeof v, 'number', 'returns a number' );
46+
t.strictEqual( v, v, 'does not return NaN' );
47+
t.end();
48+
});
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2025 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
'use strict';
20+
21+
// MODULES //
22+
23+
var tape = require( 'tape' );
24+
var polyG = require( './../lib/rational_pgqg.js' );
25+
26+
27+
// TESTS //
28+
29+
tape( 'main export is a function', function test( t ) {
30+
t.ok( true, __filename );
31+
t.strictEqual( typeof polyG, 'function', 'main export is a function' );
32+
t.end();
33+
});
34+
35+
tape( 'the function returns expected value for x = 0.0', function test( t ) {
36+
var v = polyG( 0.0 );
37+
t.strictEqual( v, 1.0, 'returns expected value' );
38+
t.end();
39+
});
40+
41+
tape( 'the function handles negative values', function test( t ) {
42+
var v;
43+
44+
v = polyG( -0.5 );
45+
t.strictEqual( typeof v, 'number', 'returns a number' );
46+
t.strictEqual( v, v, 'does not return NaN' );
47+
t.end();
48+
});
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2025 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
'use strict';
20+
21+
// MODULES //
22+
23+
var tape = require( 'tape' );
24+
var polyS = require( './../lib/rational_psqs.js' );
25+
26+
27+
// TESTS //
28+
29+
tape( 'main export is a function', function test( t ) {
30+
t.ok( true, __filename );
31+
t.strictEqual( typeof polyS, 'function', 'main export is a function' );
32+
t.end();
33+
});
34+
35+
tape( 'the function returns expected value for x = 0.0', function test( t ) {
36+
var v = polyS( 0.0 );
37+
t.strictEqual( v, 0.5235987755982989, 'returns expected value' );
38+
t.end();
39+
});
40+
41+
tape( 'the function handles negative values', function test( t ) {
42+
var v;
43+
44+
v = polyS( -0.5 );
45+
t.strictEqual( typeof v, 'number', 'returns a number' );
46+
t.strictEqual( v, v, 'does not return NaN' );
47+
t.end();
48+
});

lib/node_modules/@stdlib/math/base/special/fresnelc/test/test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,12 @@ tape( 'the function returns `-0.5` if provided `-infinity`', function test( t )
170170
t.end();
171171
});
172172

173+
tape( 'the function returns `0.0` if provided `0.0`', function test( t ) {
174+
var v = fresnelc( 0.0 );
175+
t.strictEqual( v, 0.0, 'returns expected value' );
176+
t.end();
177+
});
178+
173179
tape( 'the function returns `NaN` if provided a `NaN`', function test( t ) {
174180
var v = fresnelc( NaN );
175181
t.strictEqual( isnan( v ), true, 'returns expected value' );
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2025 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
'use strict';
20+
21+
// MODULES //
22+
23+
var tape = require( 'tape' );
24+
var polyC = require( './../lib/rational_pcqc.js' );
25+
26+
27+
// TESTS //
28+
29+
tape( 'main export is a function', function test( t ) {
30+
t.ok( true, __filename );
31+
t.strictEqual( typeof polyC, 'function', 'main export is a function' );
32+
t.end();
33+
});
34+
35+
tape( 'the function returns expected value for x = 0.0', function test( t ) {
36+
var v = polyC( 0.0 );
37+
t.strictEqual( v, 1.0, 'returns expected value' );
38+
t.end();
39+
});
40+
41+
tape( 'the function handles negative values', function test( t ) {
42+
var v;
43+
44+
v = polyC( -0.5 );
45+
t.strictEqual( typeof v, 'number', 'returns a number' );
46+
t.strictEqual( v, v, 'does not return NaN' );
47+
t.end();
48+
});
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2025 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
'use strict';
20+
21+
// MODULES //
22+
23+
var tape = require( 'tape' );
24+
var polyF = require( './../lib/rational_pfqf.js' );
25+
26+
27+
// TESTS //
28+
29+
tape( 'main export is a function', function test( t ) {
30+
t.ok( true, __filename );
31+
t.strictEqual( typeof polyF, 'function', 'main export is a function' );
32+
t.end();
33+
});
34+
35+
tape( 'the function returns expected value for x = 0.0', function test( t ) {
36+
var v = polyF( 0.0 );
37+
t.strictEqual( v, 2.999999999999634, 'returns expected value' );
38+
t.end();
39+
});
40+
41+
tape( 'the function handles negative values', function test( t ) {
42+
var v;
43+
44+
v = polyF( -0.5 );
45+
t.strictEqual( typeof v, 'number', 'returns a number' );
46+
t.strictEqual( v, v, 'does not return NaN' );
47+
t.end();
48+
});
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2025 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
'use strict';
20+
21+
// MODULES //
22+
23+
var tape = require( 'tape' );
24+
var polyG = require( './../lib/rational_pgqg.js' );
25+
26+
27+
// TESTS //
28+
29+
tape( 'main export is a function', function test( t ) {
30+
t.ok( true, __filename );
31+
t.strictEqual( typeof polyG, 'function', 'main export is a function' );
32+
t.end();
33+
});
34+
35+
tape( 'the function returns expected value for x = 0.0', function test( t ) {
36+
var v = polyG( 0.0 );
37+
t.strictEqual( v, 1.0, 'returns expected value' );
38+
t.end();
39+
});
40+
41+
tape( 'the function handles negative values', function test( t ) {
42+
var v;
43+
44+
v = polyG( -0.5 );
45+
t.strictEqual( typeof v, 'number', 'returns a number' );
46+
t.strictEqual( v, v, 'does not return NaN' );
47+
t.end();
48+
});

0 commit comments

Comments
 (0)