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

Unified Diff: test/mjsunit/arguments-opt.js

Issue 6869007: Cleanup of mjsunit.js code and make assertEquals more strict. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed review comments Created 9 years, 8 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
« no previous file with comments | « test/mjsunit/arguments-apply.js ('k') | test/mjsunit/array-length.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/arguments-opt.js
diff --git a/test/mjsunit/arguments-opt.js b/test/mjsunit/arguments-opt.js
index c74fc75a2eb69fcce77019a333cc866b2f0cb345..b8280b4bec875e6439eaa8d6e5dbfe1a6b81e6f8 100644
--- a/test/mjsunit/arguments-opt.js
+++ b/test/mjsunit/arguments-opt.js
@@ -79,36 +79,38 @@ assertTrue(typeof(A(10000)) == 'undefined');
assertTrue(typeof(A(10000, 0)) == 'undefined');
// String access.
-assertEquals(0, A('0'));
-assertEquals(0, A('0',1));
+assertEquals('0', A('0'));
+assertEquals('0', A('0',1));
assertEquals(2, A('1',2));
assertEquals(2, A('1',2,3,4,5));
assertEquals(5, A('4',2,3,4,5));
-assertTrue(typeof A('1') == 'undefined');
-assertTrue(typeof A('3',2,1) == 'undefined');
+assertEquals('undefined', typeof A('1'));
+assertEquals('undefined', typeof A('3',2,1));
assertEquals(A, A('callee'));
assertEquals(1, A('length'));
assertEquals(2, A('length',2));
assertEquals(5, A('length',2,3,4,5));
assertEquals({}.toString, A('toString'));
assertEquals({}.isPrototypeOf, A('isPrototypeOf'));
-assertTrue(typeof A('xxx') == 'undefined');
+assertEquals('undefined', typeof A('xxx'));
// Object access.
function O(key) {
return { toString: function() { return key; } };
}
-assertEquals(0, A(O(0)));
-assertEquals(0, A(O(0),1));
+var O0 = O(0);
+assertSame(O0, A(O0));
+assertSame(O0, A(O0,1));
assertEquals(2, A(O(1),2));
assertEquals(2, A(O(1),2,3,4,5));
assertEquals(5, A(O(4),2,3,4,5));
assertTrue(typeof A(O(1)) == 'undefined');
assertTrue(typeof A(O(3),2,1) == 'undefined');
-assertEquals(0, A(O('0')));
-assertEquals(0, A(O('0'),1));
+O0 = O('0');
+assertSame(O0, A(O0));
+assertSame(O0, A(O0,1));
assertEquals(2, A(O('1'),2));
assertEquals(2, A(O('1'),2,3,4,5));
assertEquals(5, A(O('4'),2,3,4,5));
« no previous file with comments | « test/mjsunit/arguments-apply.js ('k') | test/mjsunit/array-length.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698