Skip to content

Commit f984105

Browse files
committed
Apply prettier formatter
1 parent 5d1cb31 commit f984105

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

core/engine/benches/bench_scripts/string_code_point_sum.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(() => {
2-
let sum = '';
2+
let sum = "";
33
let string = "Hello, world!!!";
44
for (let i = 0; i < string.length; ++i) {
55
sum += string.charCodeAt(i).toString(16);

core/runtime/assets/harness.js

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@ function assert(cond, message) {
66

77
function assertEq(lhs, rhs, message) {
88
if (lhs !== rhs) {
9-
throw `AssertionError: ${message ? message + ", " : ""}expected ${JSON.stringify(rhs)}, actual ${JSON.stringify(lhs)}`;
9+
throw `AssertionError: ${
10+
message ? message + ", " : ""
11+
}expected ${JSON.stringify(rhs)}, actual ${JSON.stringify(lhs)}`;
1012
}
1113
}
1214

1315
function assertNEq(lhs, rhs, message) {
1416
if (lhs === rhs) {
15-
throw `AssertionError: ${message ? message + ", " : ""}expected ${JSON.stringify(rhs)}, actual ${JSON.stringify(lhs)}`;
17+
throw `AssertionError: ${
18+
message ? message + ", " : ""
19+
}expected ${JSON.stringify(rhs)}, actual ${JSON.stringify(lhs)}`;
1620
}
1721
}
1822

@@ -26,7 +30,9 @@ function assertArrayEqual(lhs, rhs, message) {
2630
try {
2731
l = [...lhs];
2832
} catch (e) {
29-
throw `AssertionError: ${message ? message + ", " : ""}expected an iterable, actual isn't.`;
33+
throw `AssertionError: ${
34+
message ? message + ", " : ""
35+
}expected an iterable, actual isn't.`;
3036
}
3137
const r = [...rhs];
3238

@@ -37,7 +43,9 @@ function assertArrayEqual(lhs, rhs, message) {
3743
return;
3844
}
3945

40-
throw `AssertionError: ${message ? message + ", " : ""}expected ${JSON.stringify(rhs)}, actual ${JSON.stringify(lhs)}`;
46+
throw `AssertionError: ${
47+
message ? message + ", " : ""
48+
}expected ${JSON.stringify(rhs)}, actual ${JSON.stringify(lhs)}`;
4149
}
4250

4351
function assertThrows(fn, message) {
@@ -46,5 +54,7 @@ function assertThrows(fn, message) {
4654
} catch (e) {
4755
return;
4856
}
49-
throw `AssertionError: ${message ? message + ", " : ""}function did not throw.`;
57+
throw `AssertionError: ${
58+
message ? message + ", " : ""
59+
}function did not throw.`;
5060
}

0 commit comments

Comments
 (0)