Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Unified Diff: test/mjsunit/wasm/stack.js

Issue 1961453002: [wasm] Clean up test case (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@wasm-offset-table-4
Patch Set: update expected test outcome Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/js/messages.js ('K') | « src/js/messages.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/stack.js
diff --git a/test/mjsunit/wasm/stack.js b/test/mjsunit/wasm/stack.js
index 0e6a6a01d6e442ca6bcc34a518bcfbfb3301af6e..b2b5eb9441f3572cb98eade29d30e748a0f681ee 100644
--- a/test/mjsunit/wasm/stack.js
+++ b/test/mjsunit/wasm/stack.js
@@ -16,10 +16,8 @@ function stripPath(s) {
function verifyStack(frames, expected) {
assertEquals(expected.length, frames.length, "number of frames mismatch");
expected.forEach(function(exp, i) {
- if (exp[1] != "?") {
- assertEquals(exp[1], frames[i].getFunctionName(),
- "["+i+"].getFunctionName()");
- }
+ assertEquals(exp[1], frames[i].getFunctionName(),
+ "["+i+"].getFunctionName()");
assertEquals(exp[2], frames[i].getLineNumber(), "["+i+"].getLineNumber()");
if (exp[0])
assertEquals(exp[3], frames[i].getPosition(),
@@ -27,8 +25,7 @@ function verifyStack(frames, expected) {
assertContains(exp[4], frames[i].getFileName(), "["+i+"].getFileName()");
var toString;
if (exp[0]) {
- var funName = exp[1] == "?" ? "" : exp[1];
- toString = funName + " (<WASM>:" + exp[2] + ":" + exp[3] + ")";
+ toString = exp[1] + " (<WASM>:" + exp[2] + ":" + exp[3] + ")";
} else {
toString = exp[4] + ":" + exp[2] + ":";
}
@@ -71,10 +68,10 @@ var module = builder.instantiate({func: STACK});
(function testSimpleStack() {
var expected_string = "Error\n" +
// The line numbers below will change as this test gains / loses lines..
- " at STACK (stack.js:42:11)\n" + // --
+ " at STACK (stack.js:39:11)\n" + // --
" at main (<WASM>:0:1)\n" + // --
- " at testSimpleStack (stack.js:79:18)\n" + // --
- " at stack.js:81:3"; // --
+ " at testSimpleStack (stack.js:76:18)\n" + // --
+ " at stack.js:78:3"; // --
module.exports.main();
assertEquals(expected_string, stripPath(stack));
@@ -91,10 +88,10 @@ Error.prepareStackTrace = function(error, frames) {
verifyStack(stack, [
// isWasm function line pos file
- [ false, "STACK", 42, 0, "stack.js"],
+ [ false, "STACK", 39, 0, "stack.js"],
[ true, "main", 0, 1, null],
- [ false, "testStackFrames", 90, 0, "stack.js"],
- [ false, null, 99, 0, "stack.js"]
+ [ false, "testStackFrames", 87, 0, "stack.js"],
+ [ false, null, 96, 0, "stack.js"]
]);
})();
@@ -108,8 +105,8 @@ Error.prepareStackTrace = function(error, frames) {
// isWasm function line pos file
// TODO(clemensh): pos should be 1
[ true, "exec_unreachable", 1, -1, null],
- [ false, "testWasmUnreachable", 103, 0, "stack.js"],
- [ false, null, 115, 0, "stack.js"]
+ [ false, "testWasmUnreachable", 100, 0, "stack.js"],
+ [ false, null, 112, 0, "stack.js"]
]);
}
})();
@@ -123,10 +120,10 @@ Error.prepareStackTrace = function(error, frames) {
verifyStack(e.stack, [
// isWasm function line pos file
// TODO(clemensh): pos should be 3
- [ true, "?", 2, -1, null],
+ [ true, "<WASM>", 2, -1, null],
[ true, "call_mem_out_of_bounds", 3, 1, null],
- [ false, "testWasmMemOutOfBounds", 119, 0, "stack.js"],
- [ false, null, 132, 0, "stack.js"]
+ [ false, "testWasmMemOutOfBounds", 116, 0, "stack.js"],
+ [ false, null, 129, 0, "stack.js"]
]);
}
})();
« src/js/messages.js ('K') | « src/js/messages.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698