GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — benchmark: use assert.ok instead of assert · nodejs/node@b6e8305

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • benchmark/buffers
    • buffer-atob.js
    • buffer-btoa.js
    • buffer-iterate.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎benchmark/buffers/buffer-atob.js‎

Copy file name to clipboardExpand all lines: benchmark/buffers/buffer-atob.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ function main({ n, size }) {
1616
out += atob(input).length;
1717
}
1818
bench.end(n);
19-
assert(out > 0);
19+
assert.ok(out > 0);
2020
}
Collapse file

‎benchmark/buffers/buffer-btoa.js‎

Copy file name to clipboardExpand all lines: benchmark/buffers/buffer-btoa.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ function main({ n, size }) {
1616
out += btoa(input).length;
1717
}
1818
bench.end(n);
19-
assert(out > 0);
19+
assert.ok(out > 0);
2020
}
Collapse file

‎benchmark/buffers/buffer-iterate.js‎

Copy file name to clipboardExpand all lines: benchmark/buffers/buffer-iterate.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ function main({ size, type, method, n }) {
3131
function benchFor(buffer, n) {
3232
for (let k = 0; k < n; k++) {
3333
for (let i = 0; i < buffer.length; i++) {
34-
assert(buffer[i] === 0);
34+
assert.strictEqual(buffer[i], 0);
3535
}
3636
}
3737
}
3838

3939
function benchForOf(buffer, n) {
4040
for (let k = 0; k < n; k++) {
4141
for (const b of buffer) {
42-
assert(b === 0);
42+
assert.strictEqual(b, 0);
4343
}
4444
}
4545
}
@@ -50,7 +50,7 @@ function benchIterator(buffer, n) {
5050
let cur = iter.next();
5151

5252
while (!cur.done) {
53-
assert(cur.value === 0);
53+
assert.strictEqual(cur.value, 0);
5454
cur = iter.next();
5555
}
5656

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.