Skip to content

Commit b24284b

Browse files
committed
test: improve test values to resolve ambiguity in expected values
--- 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 cbe9d1a commit b24284b

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

lib/node_modules/@stdlib/lapack/base/dlacpy/test/test.ndarray.js

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -46,25 +46,25 @@ tape( 'the function copies all of a matrix `A` to another matrix `B` (row-major)
4646
var A;
4747
var B;
4848

49-
A = new Float64Array( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
49+
A = new Float64Array( [ 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0 ] );
5050
B = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
51-
expected = new Float64Array( [ 0.0, 0.0, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
51+
expected = new Float64Array( [ 0.0, 0.0, 0.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0 ] );
5252

5353
out = dlacpy( 'all', 2, 3, A, 3, 1, 1, B, 3, 1, 3 );
5454
t.strictEqual( out, B, 'returns expected value' );
5555
t.deepEqual( out, expected, 'returns expected value' );
5656

57-
A = new Float64Array( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
57+
A = new Float64Array( [ 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0 ] );
5858
B = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
59-
expected = new Float64Array( [ 0.0, 0.0, 0.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0 ] );
59+
expected = new Float64Array( [ 0.0, 0.0, 0.0, 16.0, 15.0, 14.0, 13.0, 12.0, 11.0 ] );
6060

6161
out = dlacpy( 'all', 2, 3, A, -3, -1, 6, B, 3, 1, 3 );
6262
t.strictEqual( out, B, 'returns expected value' );
6363
t.deepEqual( out, expected, 'returns expected value' );
6464

65-
A = new Float64Array( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
65+
A = new Float64Array( [ 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0 ] );
6666
B = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
67-
expected = new Float64Array( [ 0.0, 0.0, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
67+
expected = new Float64Array( [ 0.0, 0.0, 0.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0 ] );
6868

6969
out = dlacpy( 'all', 3, 2, A, 2, 1, 1, B, 2, 1, 3 );
7070
t.strictEqual( out, B, 'returns expected value' );
@@ -79,25 +79,25 @@ tape( 'the function copies part of a matrix `A` to another matrix `B` (row-major
7979
var A;
8080
var B;
8181

82-
A = new Float64Array( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
82+
A = new Float64Array( [ 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0 ] );
8383
B = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
84-
expected = new Float64Array( [ 0.0, 0.0, 0.0, 1.0, 2.0, 3.0, 0.0, 5.0, 6.0 ] );
84+
expected = new Float64Array( [ 0.0, 0.0, 0.0, 11.0, 12.0, 13.0, 0.0, 15.0, 16.0 ] );
8585

8686
out = dlacpy( 'upper', 2, 3, A, 3, 1, 1, B, 3, 1, 3 );
8787
t.strictEqual( out, B, 'returns expected value' );
8888
t.deepEqual( out, expected, 'returns expected value' );
8989

90-
A = new Float64Array( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
90+
A = new Float64Array( [ 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0 ] );
9191
B = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
92-
expected = new Float64Array( [ 0.0, 0.0, 0.0, 3.0, 2.0, 1.0, 0.0, 5.0, 4.0 ] );
92+
expected = new Float64Array( [ 0.0, 0.0, 0.0, 13.0, 12.0, 11.0, 0.0, 15.0, 14.0 ] );
9393

9494
out = dlacpy( 'upper', 2, 3, A, 3, -1, 3, B, 3, 1, 3 );
9595
t.strictEqual( out, B, 'returns expected value' );
9696
t.deepEqual( out, expected, 'returns expected value' );
9797

98-
A = new Float64Array( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
98+
A = new Float64Array( [ 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0 ] );
9999
B = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
100-
expected = new Float64Array( [ 0.0, 0.0, 0.0, 1.0, 2.0, 0.0, 4.0, 0.0, 0.0 ] );
100+
expected = new Float64Array( [ 0.0, 0.0, 0.0, 11.0, 12.0, 0.0, 14.0, 0.0, 0.0 ] );
101101

102102
out = dlacpy( 'upper', 3, 2, A, 2, 1, 1, B, 2, 1, 3 );
103103
t.strictEqual( out, B, 'returns expected value' );
@@ -112,25 +112,25 @@ tape( 'the function copies part of a matrix `A` to another matrix `B` (row-major
112112
var A;
113113
var B;
114114

115-
A = new Float64Array( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
115+
A = new Float64Array( [ 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0 ] );
116116
B = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
117-
expected = new Float64Array( [ 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 4.0, 5.0, 0.0 ] );
117+
expected = new Float64Array( [ 0.0, 0.0, 0.0, 11.0, 0.0, 0.0, 14.0, 15.0, 0.0 ] );
118118

119119
out = dlacpy( 'lower', 2, 3, A, 3, 1, 1, B, 3, 1, 3 );
120120
t.strictEqual( out, B, 'returns expected value' );
121121
t.deepEqual( out, expected, 'returns expected value' );
122122

123-
A = new Float64Array( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
123+
A = new Float64Array( [ 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0 ] );
124124
B = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
125-
expected = new Float64Array( [ 0.0, 0.0, 0.0, 4.0, 0.0, 0.0, 1.0, 2.0, 0.0 ] );
125+
expected = new Float64Array( [ 0.0, 0.0, 0.0, 14.0, 0.0, 0.0, 11.0, 12.0, 0.0 ] );
126126

127127
out = dlacpy( 'lower', 2, 3, A, -3, 1, 4, B, 3, 1, 3 );
128128
t.strictEqual( out, B, 'returns expected value' );
129129
t.deepEqual( out, expected, 'returns expected value' );
130130

131-
A = new Float64Array( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
131+
A = new Float64Array( [ 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0 ] );
132132
B = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
133-
expected = new Float64Array( [ 0.0, 0.0, 0.0, 1.0, 0.0, 3.0, 4.0, 5.0, 6.0 ] );
133+
expected = new Float64Array( [ 0.0, 0.0, 0.0, 11.0, 0.0, 13.0, 14.0, 15.0, 16.0 ] );
134134

135135
out = dlacpy( 'lower', 3, 2, A, 2, 1, 1, B, 2, 1, 3 );
136136
t.strictEqual( out, B, 'returns expected value' );
@@ -145,25 +145,25 @@ tape( 'the function copies all of a matrix `A` to another matrix `B` (column-maj
145145
var A;
146146
var B;
147147

148-
A = new Float64Array( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
148+
A = new Float64Array( [ 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0 ] );
149149
B = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
150-
expected = new Float64Array( [ 0.0, 0.0, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
150+
expected = new Float64Array( [ 0.0, 0.0, 0.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0 ] );
151151

152152
out = dlacpy( 'all', 2, 3, A, 1, 2, 1, B, 1, 2, 3 );
153153
t.strictEqual( out, B, 'returns expected value' );
154154
t.deepEqual( out, expected, 'returns expected value' );
155155

156-
A = new Float64Array( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
156+
A = new Float64Array( [ 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0 ] );
157157
B = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
158-
expected = new Float64Array( [ 0.0, 0.0, 0.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0 ] );
158+
expected = new Float64Array( [ 0.0, 0.0, 0.0, 16.0, 15.0, 14.0, 13.0, 12.0, 11.0 ] );
159159

160160
out = dlacpy( 'all', 2, 3, A, 1, 2, 1, B, -1, -2, 8 );
161161
t.strictEqual( out, B, 'returns expected value' );
162162
t.deepEqual( out, expected, 'returns expected value' );
163163

164-
A = new Float64Array( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
164+
A = new Float64Array( [ 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0 ] );
165165
B = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
166-
expected = new Float64Array( [ 0.0, 0.0, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
166+
expected = new Float64Array( [ 0.0, 0.0, 0.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0 ] );
167167

168168
out = dlacpy( 'all', 3, 2, A, 1, 3, 1, B, 1, 3, 3 );
169169
t.strictEqual( out, B, 'returns expected value' );
@@ -178,25 +178,25 @@ tape( 'the function copies part of a matrix `A` to another matrix `B` (column-ma
178178
var A;
179179
var B;
180180

181-
A = new Float64Array( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
181+
A = new Float64Array( [ 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0 ] );
182182
B = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
183-
expected = new Float64Array( [ 0.0, 0.0, 0.0, 1.0, 0.0, 3.0, 4.0, 5.0, 6.0 ] );
183+
expected = new Float64Array( [ 0.0, 0.0, 0.0, 11.0, 0.0, 13.0, 14.0, 15.0, 16.0 ] );
184184

185185
out = dlacpy( 'upper', 2, 3, A, 1, 2, 1, B, 1, 2, 3 );
186186
t.strictEqual( out, B, 'returns expected value' );
187187
t.deepEqual( out, expected, 'returns expected value' );
188188

189-
A = new Float64Array( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
189+
A = new Float64Array( [ 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0 ] );
190190
B = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
191-
expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 1.0, 4.0, 3.0, 6.0, 5.0 ] );
191+
expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 11.0, 14.0, 13.0, 16.0, 15.0 ] );
192192

193193
out = dlacpy( 'upper', 2, 3, A, 1, 2, 1, B, -1, 2, 4 );
194194
t.strictEqual( out, B, 'returns expected value' );
195195
t.deepEqual( out, expected, 'returns expected value' );
196196

197-
A = new Float64Array( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
197+
A = new Float64Array( [ 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0 ] );
198198
B = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
199-
expected = new Float64Array( [ 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 4.0, 5.0, 0.0 ] );
199+
expected = new Float64Array( [ 0.0, 0.0, 0.0, 11.0, 0.0, 0.0, 14.0, 15.0, 0.0 ] );
200200

201201
out = dlacpy( 'upper', 3, 2, A, 1, 3, 1, B, 1, 3, 3 );
202202
t.strictEqual( out, B, 'returns expected value' );
@@ -211,25 +211,25 @@ tape( 'the function copies part of a matrix `A` to another matrix `B` (column-ma
211211
var A;
212212
var B;
213213

214-
A = new Float64Array( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
214+
A = new Float64Array( [ 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0 ] );
215215
B = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
216-
expected = new Float64Array( [ 0.0, 0.0, 0.0, 1.0, 2.0, 0.0, 4.0, 0.0, 0.0 ] );
216+
expected = new Float64Array( [ 0.0, 0.0, 0.0, 11.0, 12.0, 0.0, 14.0, 0.0, 0.0 ] );
217217

218218
out = dlacpy( 'lower', 2, 3, A, 1, 2, 1, B, 1, 2, 3 );
219219
t.strictEqual( out, B, 'returns expected value' );
220220
t.deepEqual( out, expected, 'returns expected value' );
221221

222-
A = new Float64Array( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
222+
A = new Float64Array( [ 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0 ] );
223223
B = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
224-
expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4.0, 1.0, 2.0 ] );
224+
expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 14.0, 11.0, 12.0 ] );
225225

226226
out = dlacpy( 'lower', 2, 3, A, 1, 2, 1, B, 1, -2, 7 );
227227
t.strictEqual( out, B, 'returns expected value' );
228228
t.deepEqual( out, expected, 'returns expected value' );
229229

230-
A = new Float64Array( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
230+
A = new Float64Array( [ 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0 ] );
231231
B = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
232-
expected = new Float64Array( [ 0.0, 0.0, 0.0, 1.0, 2.0, 3.0, 0.0, 5.0, 6.0 ] );
232+
expected = new Float64Array( [ 0.0, 0.0, 0.0, 11.0, 12.0, 13.0, 0.0, 15.0, 16.0 ] );
233233

234234
out = dlacpy( 'lower', 3, 2, A, 1, 3, 1, B, 1, 3, 3 );
235235
t.strictEqual( out, B, 'returns expected value' );

0 commit comments

Comments
 (0)