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

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

Issue 1424793004: Prettyprint symbols in mjsunit tests. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 function PrettyPrint(value) { 124 function PrettyPrint(value) {
125 switch (typeof value) { 125 switch (typeof value) {
126 case "string": 126 case "string":
127 return JSON.stringify(value); 127 return JSON.stringify(value);
128 case "number": 128 case "number":
129 if (value === 0 && (1 / value) < 0) return "-0"; 129 if (value === 0 && (1 / value) < 0) return "-0";
130 // FALLTHROUGH. 130 // FALLTHROUGH.
131 case "boolean": 131 case "boolean":
132 case "undefined": 132 case "undefined":
133 case "function": 133 case "function":
134 case "symbol":
134 return String(value); 135 return String(value);
135 case "object": 136 case "object":
136 if (value === null) return "null"; 137 if (value === null) return "null";
137 var objectClass = classOf(value); 138 var objectClass = classOf(value);
138 switch (objectClass) { 139 switch (objectClass) {
139 case "Number": 140 case "Number":
140 case "String": 141 case "String":
141 case "Boolean": 142 case "Boolean":
142 case "Date": 143 case "Date":
143 return objectClass + "(" + PrettyPrint(value.valueOf()) + ")"; 144 return objectClass + "(" + PrettyPrint(value.valueOf()) + ")";
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 if (sync_opt === undefined) sync_opt = ""; 389 if (sync_opt === undefined) sync_opt = "";
389 assertTrue(OptimizationStatus(fun, sync_opt) !== 1, name_opt); 390 assertTrue(OptimizationStatus(fun, sync_opt) !== 1, name_opt);
390 } 391 }
391 392
392 assertOptimized = function assertOptimized(fun, sync_opt, name_opt) { 393 assertOptimized = function assertOptimized(fun, sync_opt, name_opt) {
393 if (sync_opt === undefined) sync_opt = ""; 394 if (sync_opt === undefined) sync_opt = "";
394 assertTrue(OptimizationStatus(fun, sync_opt) !== 2, name_opt); 395 assertTrue(OptimizationStatus(fun, sync_opt) !== 2, name_opt);
395 } 396 }
396 397
397 })(); 398 })();
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