Skip to content

Commit c5ccaff

Browse files
committed
test: remove the use of IS_BROWSER from test files
--- 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 816c8e7 commit c5ccaff

File tree

3 files changed

+6
-45
lines changed

3 files changed

+6
-45
lines changed

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

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
// MODULES //
2222

2323
var tape = require( 'tape' );
24-
var IS_BROWSER = require( '@stdlib/assert/is-browser' );
2524
var NINF = require( '@stdlib/constants/float64/ninf' );
2625
var PINF = require( '@stdlib/constants/float64/pinf' );
2726
var BIAS = require( '@stdlib/constants/float64/exponent-bias' );
@@ -124,7 +123,6 @@ tape( 'the function splits a floating-point number into a normalized fraction an
124123
});
125124

126125
tape( 'the returned normalized fraction and exponent satisfy the relation `x = frac * 2**exp`', function test( t ) {
127-
var total;
128126
var sign;
129127
var frac;
130128
var exp;
@@ -133,12 +131,7 @@ tape( 'the returned normalized fraction and exponent satisfy the relation `x = f
133131
var f;
134132
var i;
135133

136-
if ( IS_BROWSER ) {
137-
total = 200;
138-
} else {
139-
total = 1000;
140-
}
141-
for ( i = 0; i < total; i++ ) {
134+
for ( i = 0; i < 1000; i++ ) {
142135
if ( randu() < 0.5 ) {
143136
sign = -1.0;
144137
} else {
@@ -162,7 +155,6 @@ tape( 'the returned normalized fraction and exponent satisfy the relation `x = f
162155
});
163156

164157
tape( 'the absolute value of the normalized fraction is on the interval `[1/2,1)`', function test( t ) {
165-
var total;
166158
var sign;
167159
var frac;
168160
var exp;
@@ -171,12 +163,7 @@ tape( 'the absolute value of the normalized fraction is on the interval `[1/2,1)
171163
var f;
172164
var i;
173165

174-
if ( IS_BROWSER ) {
175-
total = 200;
176-
} else {
177-
total = 1000;
178-
}
179-
for ( i = 0; i < total; i++ ) {
166+
for ( i = 0; i < 1000; i++ ) {
180167
if ( randu() < 0.5 ) {
181168
sign = -1.0;
182169
} else {

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

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
// MODULES //
2222

2323
var tape = require( 'tape' );
24-
var IS_BROWSER = require( '@stdlib/assert/is-browser' );
2524
var NINF = require( '@stdlib/constants/float64/ninf' );
2625
var PINF = require( '@stdlib/constants/float64/pinf' );
2726
var BIAS = require( '@stdlib/constants/float64/exponent-bias' );
@@ -111,20 +110,14 @@ tape( 'the function splits a floating-point number into a normalized fraction an
111110
});
112111

113112
tape( 'the returned normalized fraction and exponent satisfy the relation `x = frac * 2**exp`', function test( t ) {
114-
var total;
115113
var sign;
116114
var frac;
117115
var exp;
118116
var x;
119117
var f;
120118
var i;
121119

122-
if ( IS_BROWSER ) {
123-
total = 200;
124-
} else {
125-
total = 1000;
126-
}
127-
for ( i = 0; i < total; i++ ) {
120+
for ( i = 0; i < 1000; i++ ) {
128121
if ( randu() < 0.5 ) {
129122
sign = -1.0;
130123
} else {
@@ -146,20 +139,14 @@ tape( 'the returned normalized fraction and exponent satisfy the relation `x = f
146139
});
147140

148141
tape( 'the absolute value of the normalized fraction is on the interval `[1/2,1)`', function test( t ) {
149-
var total;
150142
var sign;
151143
var frac;
152144
var exp;
153145
var x;
154146
var f;
155147
var i;
156148

157-
if ( IS_BROWSER ) {
158-
total = 200;
159-
} else {
160-
total = 1000;
161-
}
162-
for ( i = 0; i < total; i++ ) {
149+
for ( i = 0; i < 1000; i++ ) {
163150
if ( randu() < 0.5 ) {
164151
sign = -1.0;
165152
} else {

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

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
var resolve = require( 'path' ).resolve;
2424
var tape = require( 'tape' );
25-
var IS_BROWSER = require( '@stdlib/assert/is-browser' );
2625
var NINF = require( '@stdlib/constants/float64/ninf' );
2726
var PINF = require( '@stdlib/constants/float64/pinf' );
2827
var BIAS = require( '@stdlib/constants/float64/exponent-bias' );
@@ -120,20 +119,14 @@ tape( 'the function splits a floating-point number into a normalized fraction an
120119
});
121120

122121
tape( 'the returned normalized fraction and exponent satisfy the relation `x = frac * 2**exp`', opts, function test( t ) {
123-
var total;
124122
var sign;
125123
var frac;
126124
var exp;
127125
var x;
128126
var f;
129127
var i;
130128

131-
if ( IS_BROWSER ) {
132-
total = 200;
133-
} else {
134-
total = 1000;
135-
}
136-
for ( i = 0; i < total; i++ ) {
129+
for ( i = 0; i < 1000; i++ ) {
137130
if ( randu() < 0.5 ) {
138131
sign = -1.0;
139132
} else {
@@ -155,20 +148,14 @@ tape( 'the returned normalized fraction and exponent satisfy the relation `x = f
155148
});
156149

157150
tape( 'the absolute value of the normalized fraction is on the interval `[1/2,1)`', opts, function test( t ) {
158-
var total;
159151
var sign;
160152
var frac;
161153
var exp;
162154
var x;
163155
var f;
164156
var i;
165157

166-
if ( IS_BROWSER ) {
167-
total = 200;
168-
} else {
169-
total = 1000;
170-
}
171-
for ( i = 0; i < total; i++ ) {
158+
for ( i = 0; i < 1000; i++ ) {
172159
if ( randu() < 0.5 ) {
173160
sign = -1.0;
174161
} else {

0 commit comments

Comments
 (0)