Skip to content

Commit c88dbaa

Browse files
authored
test: add missing tests for math/base/special/tand
PR-URL: #2417 Reviewed-by: Athan Reines <kgryte@gmail.com>
1 parent d301be9 commit c88dbaa

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,15 @@ tape( 'if provided `-infinity`, the function returns `NaN`', function test( t )
108108
t.equal( isnan( v ), true, 'returns NaN' );
109109
t.end();
110110
});
111+
112+
tape( 'if provided `90.0`, the function returns `Infinity`', function test( t ) {
113+
var v = tand( 90.0 );
114+
t.equal( v, PINF, 'returns expected value' );
115+
t.end();
116+
});
117+
118+
tape( 'if provided `180.0`, the function returns `Infinity`', function test( t ) {
119+
var v = tand( 180.0 );
120+
t.equal( v, 0.0, 'returns expected value' );
121+
t.end();
122+
});

lib/node_modules/@stdlib/math/base/special/tand/test/test.native.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,15 @@ tape( 'if provided `-infinity`, the function returns `NaN`', opts, function test
117117
t.equal( isnan( v ), true, 'returns expected value' );
118118
t.end();
119119
});
120+
121+
tape( 'if provided `90.0`, the function returns `Infinity`', opts, function test( t ) {
122+
var v = tand( 90.0 );
123+
t.equal( v, PINF, 'returns expected value' );
124+
t.end();
125+
});
126+
127+
tape( 'if provided `180.0`, the function returns `Infinity`', opts, function test( t ) {
128+
var v = tand( 180.0 );
129+
t.equal( v, 0.0, 'returns expected value' );
130+
t.end();
131+
});

0 commit comments

Comments
 (0)