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

Side by Side Diff: test/mjsunit/mjsunit.js

Issue 1398703007: When converting an mjsunit exception to a string, include the stack (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 21 matching lines...) Expand all
32 } 32 }
33 33
34 /* 34 /*
35 * This file is included in all mini jsunit test cases. The test 35 * This file is included in all mini jsunit test cases. The test
36 * framework expects lines that signal failed tests to start with 36 * framework expects lines that signal failed tests to start with
37 * the f-word and ignore all other lines. 37 * the f-word and ignore all other lines.
38 */ 38 */
39 39
40 40
41 MjsUnitAssertionError.prototype.toString = function () { 41 MjsUnitAssertionError.prototype.toString = function () {
42 return this.message; 42 return this.message + "\n\nStack: " + this.stack;
43 }; 43 };
44 44
45 45
46 // Expected and found values the same objects, or the same primitive 46 // Expected and found values the same objects, or the same primitive
47 // values. 47 // values.
48 // For known primitive values, please use assertEquals. 48 // For known primitive values, please use assertEquals.
49 var assertSame; 49 var assertSame;
50 50
51 // Expected and found values are identical primitive values or functions 51 // Expected and found values are identical primitive values or functions
52 // or similarly structured objects (checking internal properties 52 // or similarly structured objects (checking internal properties
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 if (sync_opt === undefined) sync_opt = ""; 388 if (sync_opt === undefined) sync_opt = "";
389 assertTrue(OptimizationStatus(fun, sync_opt) !== 1, name_opt); 389 assertTrue(OptimizationStatus(fun, sync_opt) !== 1, name_opt);
390 } 390 }
391 391
392 assertOptimized = function assertOptimized(fun, sync_opt, name_opt) { 392 assertOptimized = function assertOptimized(fun, sync_opt, name_opt) {
393 if (sync_opt === undefined) sync_opt = ""; 393 if (sync_opt === undefined) sync_opt = "";
394 assertTrue(OptimizationStatus(fun, sync_opt) !== 2, name_opt); 394 assertTrue(OptimizationStatus(fun, sync_opt) !== 2, name_opt);
395 } 395 }
396 396
397 })(); 397 })();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698