Skip to content

Commit

Permalink
test: clean-up code comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kgryte committed Sep 16, 2024
1 parent 2674432 commit 362c05f
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 114 deletions.
56 changes: 28 additions & 28 deletions lib/node_modules/@stdlib/blas/ext/base/cfill/test/test.cfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,19 @@ tape( 'the function supports specifying a stride', function test( t ) {

x = new Complex64Array([
2.0, // 0
-3.0,
4.0, // 1
-3.0, // 0
4.0,
-6.0,
8.0, // 2
-9.0
8.0, // 1
-9.0 // 1
]);
expected = new Complex64Array([
5.0, // 0
-5.0,
4.0, // 1
-5.0, // 0
4.0,
-6.0,
5.0, // 2
-5.0
5.0, // 1
-5.0 // 1
]);

cfill( 2, new Complex64( 5.0, -5.0 ), x, 2 );
Expand All @@ -137,20 +137,20 @@ tape( 'the function supports specifying a negative stride', function test( t ) {
var x;

x = new Complex64Array([
2.0, // 2
-3.0,
4.0, // 1
2.0, // 1
-3.0, // 1
4.0,
-5.0,
6.0, // 0
-7.0
6.0, // 0
-7.0 // 0
]);
expected = new Complex64Array([
5.0, // 2
-5.0,
4.0, // 1
5.0, // 1
-5.0, // 1
4.0,
-5.0,
5.0, // 0
-5.0
5.0, // 0
-5.0 // 0
]);

cfill( 2, new Complex64( 5.0, -5.0 ), x, -2 );
Expand All @@ -166,22 +166,22 @@ tape( 'the function supports view offsets', function test( t ) {
x0 = new Complex64Array([
1.0,
-2.0,
3.0, // 0
-4.0,
6.0, // 1
3.0, // 0
-4.0, // 0
6.0,
-8.0,
10.0, // 2
-12.0
10.0, // 1
-12.0 // 1
]);
expected = new Complex64Array([
1.0,
-2.0,
5.0, // 0
-5.0,
6.0, // 1
5.0, // 0
-5.0, // 0
6.0,
-8.0,
5.0, // 2
-5.0
5.0, // 1
-5.0 // 1
]);

x1 = new Complex64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ tape( 'the function fills a strided array', opts, function test( t ) {
cfill( x.length, new Complex64( 5.0, 5.0 ), x, 1 );
t.strictEqual( isSameComplex64Array( x, expected ), true, 'returns expected value' );

x = new Complex64Array( [ 1.0, 2.0 ] );
expected = new Complex64Array( [ 5.0, 5.0 ] );
x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
expected = new Complex64Array( [ 5.0, 5.0, 5.0, 5.0 ] );

cfill( x.length, new Complex64( 5.0, 5.0 ), x, 1 );
t.strictEqual( isSameComplex64Array( x, expected ), true, 'returns expected value' );
Expand Down Expand Up @@ -121,19 +121,19 @@ tape( 'the function supports specifying a stride', opts, function test( t ) {

x = new Complex64Array([
2.0, // 0
-3.0,
4.0, // 1
-3.0, // 0
4.0,
-6.0,
8.0, // 2
-9.0
8.0, // 1
-9.0 // 1
]);
expected = new Complex64Array([
5.0, // 0
-5.0,
4.0, // 1
-5.0, // 0
4.0,
-6.0,
5.0, // 2
-5.0
5.0, // 1
-5.0 // 1
]);

cfill( 2, new Complex64( 5.0, -5.0 ), x, 2 );
Expand All @@ -146,20 +146,20 @@ tape( 'the function supports specifying a negative stride', opts, function test(
var x;

x = new Complex64Array([
2.0, // 2
-3.0,
4.0, // 1
2.0, // 1
-3.0, // 1
4.0,
-5.0,
6.0, // 0
-7.0
6.0, // 0
-7.0 // 0
]);
expected = new Complex64Array([
5.0, // 2
-5.0,
4.0, // 1
5.0, // 1
-5.0, // 1
4.0,
-5.0,
5.0, // 0
-5.0
5.0, // 0
-5.0 // 0
]);

cfill( 2, new Complex64( 5.0, -5.0 ), x, -2 );
Expand All @@ -175,22 +175,22 @@ tape( 'the function supports view offsets', opts, function test( t ) {
x0 = new Complex64Array([
1.0,
-2.0,
3.0, // 0
-4.0,
6.0, // 1
3.0, // 0
-4.0, // 0
6.0,
-8.0,
10.0, // 2
-12.0
10.0, // 1
-12.0 // 1
]);
expected = new Complex64Array([
1.0,
-2.0,
5.0, // 0
-5.0,
6.0, // 1
5.0, // 0
-5.0, // 0
6.0,
-8.0,
5.0, // 2
-5.0
5.0, // 1
-5.0 // 1
]);

x1 = new Complex64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 );
Expand Down
56 changes: 28 additions & 28 deletions lib/node_modules/@stdlib/blas/ext/base/cfill/test/test.ndarray.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,19 @@ tape( 'the function supports specifying a stride', function test( t ) {

x = new Complex64Array([
2.0, // 0
-3.0,
4.0, // 1
-3.0, // 0
4.0,
-6.0,
8.0, // 2
-9.0
8.0, // 1
-9.0 // 1
]);
expected = new Complex64Array([
5.0, // 0
-5.0,
4.0, // 1
-5.0, // 0
4.0,
-6.0,
5.0, // 2
-5.0
5.0, // 1
-5.0 // 1
]);

cfill( 2, new Complex64( 5.0, -5.0 ), x, 2, 0 );
Expand All @@ -137,20 +137,20 @@ tape( 'the function supports specifying a negative stride', function test( t ) {
var x;

x = new Complex64Array([
2.0, // 2
-3.0,
4.0, // 1
2.0, // 1
-3.0, // 1
4.0,
-6.0,
8.0, // 0
-9.0
8.0, // 0
-9.0 // 0
]);
expected = new Complex64Array([
5.0, // 2
-5.0,
4.0, // 1
5.0, // 1
-5.0, // 1
4.0,
-6.0,
5.0, // 0
-5.0
5.0, // 0
-5.0 // 0
]);

cfill( 2, new Complex64( 5.0, -5.0 ), x, -2, x.length-1 );
Expand All @@ -165,22 +165,22 @@ tape( 'the function supports an offset parameter', function test( t ) {
x = new Complex64Array([
1.0,
-2.0,
3.0, // 0
-4.0,
6.0, // 1
3.0, // 0
-4.0, // 0
6.0,
-8.0,
10.0, // 2
-12.0
10.0, // 1
-12.0 // 1
]);
expected = new Complex64Array([
1.0,
-2.0,
5.0, // 0
-5.0,
6.0, // 1
5.0, // 0
-5.0, // 0
6.0,
-8.0,
5.0, // 2
-5.0
5.0, // 1
-5.0 // 1
]);

cfill( 2, new Complex64( 5.0, -5.0 ), x, 2, 1 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,19 +121,19 @@ tape( 'the function supports specifying a stride', opts, function test( t ) {

x = new Complex64Array([
2.0, // 0
-3.0,
4.0, // 1
-3.0, // 0
4.0,
-6.0,
8.0, // 2
-9.0
8.0, // 1
-9.0 // 1
]);
expected = new Complex64Array([
5.0, // 0
-5.0,
4.0, // 1
-5.0, // 0
4.0,
-6.0,
5.0, // 2
-5.0
5.0, // 1
-5.0 // 1
]);

cfill( 2, new Complex64( 5.0, -5.0 ), x, 2, 0 );
Expand All @@ -146,20 +146,20 @@ tape( 'the function supports specifying a negative stride', opts, function test(
var x;

x = new Complex64Array([
2.0, // 2
-3.0,
4.0, // 1
2.0, // 1
-3.0, // 1
4.0,
-6.0,
8.0, // 0
-9.0
8.0, // 0
-9.0 // 0
]);
expected = new Complex64Array([
5.0, // 2
-5.0,
4.0, // 1
5.0, // 1
-5.0, // 1
4.0,
-6.0,
5.0, // 0
-5.0
5.0, // 0
-5.0 // 0
]);

cfill( 2, new Complex64( 5.0, -5.0 ), x, -2, x.length-1 );
Expand All @@ -174,22 +174,22 @@ tape( 'the function supports an offset parameter', opts, function test( t ) {
x = new Complex64Array([
1.0,
-2.0,
3.0, // 0
-4.0,
6.0, // 1
3.0, // 0
-4.0, // 0
6.0,
-8.0,
10.0, // 2
-12.0
10.0, // 1
-12.0 // 1
]);
expected = new Complex64Array([
1.0,
-2.0,
5.0, // 0
-5.0,
6.0, // 1
5.0, // 0
-5.0, // 0
6.0,
-8.0,
5.0, // 2
-5.0
5.0, // 1
-5.0 // 1
]);

cfill( 2, new Complex64( 5.0, -5.0 ), x, 2, 1 );
Expand Down

0 comments on commit 362c05f

Please sign in to comment.