Skip to content

Commit 493ccaf

Browse files
committed
test: rename variable
--- 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 571dce8 commit 493ccaf

File tree

1 file changed

+35
-35
lines changed
  • lib/node_modules/@stdlib/stats/array/varianceyc/test

1 file changed

+35
-35
lines changed

lib/node_modules/@stdlib/stats/array/varianceyc/test/test.js

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@ var isnan = require( '@stdlib/math/base/assert/is-nan' );
2525
var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
2626
var BooleanArray = require( '@stdlib/array/bool' );
2727
var Complex128Array = require( '@stdlib/array/complex128' );
28-
var varianceyv = require( './../lib' );
28+
var varianceyc = require( './../lib' );
2929

3030

3131
// TESTS //
3232

3333
tape( 'main export is a function', function test( t ) {
3434
t.ok( true, __filename );
35-
t.strictEqual( typeof varianceyv, 'function', 'main export is a function' );
35+
t.strictEqual( typeof varianceyc, 'function', 'main export is a function' );
3636
t.end();
3737
});
3838

3939
tape( 'the function has an arity of 1', function test( t ) {
40-
t.strictEqual( varianceyv.length, 1, 'returns expected value' );
40+
t.strictEqual( varianceyc.length, 1, 'returns expected value' );
4141
t.end();
4242
});
4343

@@ -63,7 +63,7 @@ tape( 'the function throws an error if provided a first argument which is not an
6363

6464
function badValue( value ) {
6565
return function badValue() {
66-
varianceyv( value );
66+
varianceyc( value );
6767
};
6868
}
6969
});
@@ -90,7 +90,7 @@ tape( 'the function throws an error if provided a first argument which is not an
9090

9191
function badValue( value ) {
9292
return function badValue() {
93-
varianceyv( value, 1.0 );
93+
varianceyc( value, 1.0 );
9494
};
9595
}
9696
});
@@ -110,7 +110,7 @@ tape( 'the function throws an error if provided a first argument which has an un
110110

111111
function badValue( value ) {
112112
return function badValue() {
113-
varianceyv( value );
113+
varianceyc( value );
114114
};
115115
}
116116
});
@@ -130,7 +130,7 @@ tape( 'the function throws an error if provided a first argument which has an un
130130

131131
function badValue( value ) {
132132
return function badValue() {
133-
varianceyv( value, 1.0 );
133+
varianceyc( value, 1.0 );
134134
};
135135
}
136136
});
@@ -156,7 +156,7 @@ tape( 'the function throws an error if provided a second argument which is not a
156156

157157
function badValue( value ) {
158158
return function badValue() {
159-
varianceyv( [ 1, 2, 3 ], value );
159+
varianceyc( [ 1, 2, 3 ], value );
160160
};
161161
}
162162
});
@@ -166,15 +166,15 @@ tape( 'the function calculates the population variance of a strided array', func
166166
var v;
167167

168168
x = [ 1.0, -2.0, -4.0, 5.0, 0.0, 3.0 ];
169-
v = varianceyv( x, 0.0 );
169+
v = varianceyc( x, 0.0 );
170170
t.strictEqual( v, 53.5/x.length, 'returns expected value' );
171171

172172
x = [ -4.0, -4.0 ];
173-
v = varianceyv( x, 0.0 );
173+
v = varianceyc( x, 0.0 );
174174
t.strictEqual( v, 0.0, 'returns expected value' );
175175

176176
x = [ NaN, 4.0 ];
177-
v = varianceyv( x, 0.0 );
177+
v = varianceyc( x, 0.0 );
178178
t.strictEqual( isnan( v ), true, 'returns expected value' );
179179

180180
t.end();
@@ -185,15 +185,15 @@ tape( 'the function calculates the population variance of a strided array (acces
185185
var v;
186186

187187
x = [ 1.0, -2.0, -4.0, 5.0, 0.0, 3.0 ];
188-
v = varianceyv( toAccessorArray( x ), 0.0 );
188+
v = varianceyc( toAccessorArray( x ), 0.0 );
189189
t.strictEqual( v, 53.5/x.length, 'returns expected value' );
190190

191191
x = [ -4.0, -4.0 ];
192-
v = varianceyv( toAccessorArray( x ), 0.0 );
192+
v = varianceyc( toAccessorArray( x ), 0.0 );
193193
t.strictEqual( v, 0.0, 'returns expected value' );
194194

195195
x = [ NaN, 4.0 ];
196-
v = varianceyv( toAccessorArray( x ), 0.0 );
196+
v = varianceyc( toAccessorArray( x ), 0.0 );
197197
t.strictEqual( isnan( v ), true, 'returns expected value' );
198198

199199
t.end();
@@ -212,7 +212,7 @@ tape( 'the function calculates the population variance of an array (array-like o
212212
'4': 0.0,
213213
'5': 3.0
214214
};
215-
v = varianceyv( x, 0.0 );
215+
v = varianceyc( x, 0.0 );
216216
t.strictEqual( v, 53.5/x.length, 'returns expected value' );
217217

218218
t.end();
@@ -223,15 +223,15 @@ tape( 'the function calculates the sample variance of an array (default)', funct
223223
var v;
224224

225225
x = [ 1.0, -2.0, -4.0, 5.0, 0.0, 3.0 ];
226-
v = varianceyv( x );
226+
v = varianceyc( x );
227227
t.strictEqual( v, 53.5/(x.length-1), 'returns expected value' );
228228

229229
x = [ -4.0, -4.0 ];
230-
v = varianceyv( x );
230+
v = varianceyc( x );
231231
t.strictEqual( v, 0.0, 'returns expected value' );
232232

233233
x = [ NaN, 4.0 ];
234-
v = varianceyv( x );
234+
v = varianceyc( x );
235235
t.strictEqual( isnan( v ), true, 'returns expected value' );
236236

237237
t.end();
@@ -242,15 +242,15 @@ tape( 'the function calculates the sample variance of an array (default, accesso
242242
var v;
243243

244244
x = [ 1.0, -2.0, -4.0, 5.0, 0.0, 3.0 ];
245-
v = varianceyv( toAccessorArray( x ) );
245+
v = varianceyc( toAccessorArray( x ) );
246246
t.strictEqual( v, 53.5/(x.length-1), 'returns expected value' );
247247

248248
x = [ -4.0, -4.0 ];
249-
v = varianceyv( toAccessorArray( x ) );
249+
v = varianceyc( toAccessorArray( x ) );
250250
t.strictEqual( v, 0.0, 'returns expected value' );
251251

252252
x = [ NaN, 4.0 ];
253-
v = varianceyv( toAccessorArray( x ) );
253+
v = varianceyc( toAccessorArray( x ) );
254254
t.strictEqual( isnan( v ), true, 'returns expected value' );
255255

256256
t.end();
@@ -261,15 +261,15 @@ tape( 'the function calculates the sample variance of an array', function test(
261261
var v;
262262

263263
x = [ 1.0, -2.0, -4.0, 5.0, 0.0, 3.0 ];
264-
v = varianceyv( x, 1.0 );
264+
v = varianceyc( x, 1.0 );
265265
t.strictEqual( v, 53.5/(x.length-1), 'returns expected value' );
266266

267267
x = [ -4.0, -4.0 ];
268-
v = varianceyv( x, 1.0 );
268+
v = varianceyc( x, 1.0 );
269269
t.strictEqual( v, 0.0, 'returns expected value' );
270270

271271
x = [ NaN, 4.0 ];
272-
v = varianceyv( x, 1.0 );
272+
v = varianceyc( x, 1.0 );
273273
t.strictEqual( isnan( v ), true, 'returns expected value' );
274274

275275
t.end();
@@ -280,40 +280,40 @@ tape( 'the function calculates the sample variance of an array (accessors)', fun
280280
var v;
281281

282282
x = [ 1.0, -2.0, -4.0, 5.0, 0.0, 3.0 ];
283-
v = varianceyv( toAccessorArray( x ), 1.0 );
283+
v = varianceyc( toAccessorArray( x ), 1.0 );
284284
t.strictEqual( v, 53.5/(x.length-1), 'returns expected value' );
285285

286286
x = [ -4.0, -4.0 ];
287-
v = varianceyv( toAccessorArray( x ), 1.0 );
287+
v = varianceyc( toAccessorArray( x ), 1.0 );
288288
t.strictEqual( v, 0.0, 'returns expected value' );
289289

290290
x = [ NaN, 4.0 ];
291-
v = varianceyv( toAccessorArray( x ), 1.0 );
291+
v = varianceyc( toAccessorArray( x ), 1.0 );
292292
t.strictEqual( isnan( v ), true, 'returns expected value' );
293293

294294
t.end();
295295
});
296296

297297
tape( 'if provided an empty array, the function returns `NaN`', function test( t ) {
298-
var v = varianceyv( [] );
298+
var v = varianceyc( [] );
299299
t.strictEqual( isnan( v ), true, 'returns expected value' );
300300
t.end();
301301
});
302302

303303
tape( 'if provided an empty array, the function returns `NaN` (accessors)', function test( t ) {
304-
var v = varianceyv( toAccessorArray( [] ) );
304+
var v = varianceyc( toAccessorArray( [] ) );
305305
t.strictEqual( isnan( v ), true, 'returns expected value' );
306306
t.end();
307307
});
308308

309309
tape( 'if provided an array containing a single element, the function returns `0` when computing the population variance', function test( t ) {
310-
var v = varianceyv( [ 1.0 ], 0.0 );
310+
var v = varianceyc( [ 1.0 ], 0.0 );
311311
t.strictEqual( v, 0.0, 'returns expected value' );
312312
t.end();
313313
});
314314

315315
tape( 'if provided an array containing a single element, the function returns `0` when computing the population variance (accessors)', function test( t ) {
316-
var v = varianceyv( toAccessorArray( [ 1.0 ] ), 0.0 );
316+
var v = varianceyc( toAccessorArray( [ 1.0 ] ), 0.0 );
317317
t.strictEqual( v, 0.0, 'returns expected value' );
318318
t.end();
319319
});
@@ -324,10 +324,10 @@ tape( 'if provided a `correction` parameter which is greater than or equal to th
324324

325325
x = [ 1.0, -2.0, -4.0, 5.0, 3.0 ];
326326

327-
v = varianceyv( x, x.length );
327+
v = varianceyc( x, x.length );
328328
t.strictEqual( isnan( v ), true, 'returns expected value' );
329329

330-
v = varianceyv( x, x.length+1 );
330+
v = varianceyc( x, x.length+1 );
331331
t.strictEqual( isnan( v ), true, 'returns expected value' );
332332

333333
t.end();
@@ -339,10 +339,10 @@ tape( 'if provided a `correction` parameter which is greater than or equal to th
339339

340340
x = toAccessorArray( [ 1.0, -2.0, -4.0, 5.0, 3.0 ] );
341341

342-
v = varianceyv( x, x.length );
342+
v = varianceyc( x, x.length );
343343
t.strictEqual( isnan( v ), true, 'returns expected value' );
344344

345-
v = varianceyv( x, x.length+1 );
345+
v = varianceyc( x, x.length+1 );
346346
t.strictEqual( isnan( v ), true, 'returns expected value' );
347347

348348
t.end();

0 commit comments

Comments
 (0)