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

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

Issue 10558005: Further extend TypedArray support in d8: (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Michael's comments. Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « test/mjsunit/external-array.js ('k') | test/mjsunit/pixel-array-rounding.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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 // Success. 314 // Success.
315 return; 315 return;
316 } 316 }
317 throw new MjsUnitAssertionError("Did not throw exception"); 317 throw new MjsUnitAssertionError("Did not throw exception");
318 }; 318 };
319 319
320 320
321 assertInstanceof = function assertInstanceof(obj, type) { 321 assertInstanceof = function assertInstanceof(obj, type) {
322 if (!(obj instanceof type)) { 322 if (!(obj instanceof type)) {
323 var actualTypeName = null; 323 var actualTypeName = null;
324 var actualConstructor = Object.prototypeOf(obj).constructor; 324 var actualConstructor = Object.getPrototypeOf(obj).constructor;
325 if (typeof actualConstructor == "function") { 325 if (typeof actualConstructor == "function") {
326 actualTypeName = actualConstructor.name || String(actualConstructor); 326 actualTypeName = actualConstructor.name || String(actualConstructor);
327 } 327 }
328 fail("Object <" + PrettyPrint(obj) + "> is not an instance of <" + 328 fail("Object <" + PrettyPrint(obj) + "> is not an instance of <" +
329 (type.name || type) + ">" + 329 (type.name || type) + ">" +
330 (actualTypeName ? " but of < " + actualTypeName + ">" : "")); 330 (actualTypeName ? " but of < " + actualTypeName + ">" : ""));
331 } 331 }
332 }; 332 };
333 333
334 334
(...skipping 13 matching lines...) Expand all
348 // Fix this when we ditch the old test runner. 348 // Fix this when we ditch the old test runner.
349 var message = "Fail" + "ure: unreachable"; 349 var message = "Fail" + "ure: unreachable";
350 if (name_opt) { 350 if (name_opt) {
351 message += " - " + name_opt; 351 message += " - " + name_opt;
352 } 352 }
353 throw new MjsUnitAssertionError(message); 353 throw new MjsUnitAssertionError(message);
354 }; 354 };
355 355
356 })(); 356 })();
357 357
OLDNEW
« no previous file with comments | « test/mjsunit/external-array.js ('k') | test/mjsunit/pixel-array-rounding.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698