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

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

Issue 171038: Fix issue 420: accept truncated log files. (Closed)
Patch Set: Comment addressed Created 11 years, 4 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 | test/mjsunit/tools/logreader.js » ('j') | 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 function assertInstanceof(obj, type) { 173 function assertInstanceof(obj, type) {
174 if (!(obj instanceof type)) { 174 if (!(obj instanceof type)) {
175 assertTrue(false, "Object <" + obj + "> is not an instance of <" + type + "> "); 175 assertTrue(false, "Object <" + obj + "> is not an instance of <" + type + "> ");
176 } 176 }
177 } 177 }
178 178
179 179
180 function assertDoesNotThrow(code) { 180 function assertDoesNotThrow(code) {
181 try { 181 try {
182 eval(code); 182 if (typeof code == 'function') {
183 code();
184 } else {
185 eval(code);
186 }
183 } catch (e) { 187 } catch (e) {
184 assertTrue(false, "threw an exception"); 188 assertTrue(false, "threw an exception: " + (e.message || e));
185 } 189 }
186 } 190 }
187 191
188 192
189 function assertUnreachable(name_opt) { 193 function assertUnreachable(name_opt) {
190 // Fix this when we ditch the old test runner. 194 // Fix this when we ditch the old test runner.
191 var message = "Fail" + "ure: unreachable" 195 var message = "Fail" + "ure: unreachable"
192 if (name_opt) { 196 if (name_opt) {
193 message += " - " + name_opt; 197 message += " - " + name_opt;
194 } 198 }
195 throw new MjsUnitAssertionError(message); 199 throw new MjsUnitAssertionError(message);
196 } 200 }
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/tools/logreader.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698