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

Unified Diff: test/mjsunit/harmony/object-literals-super.js

Issue 1164073003: [es6] super.prop, eval and lazy functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Make the logger use 2 fields Created 5 years, 6 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/harmony/classes-lazy-parsing.js ('k') | test/mjsunit/harmony/super.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/object-literals-super.js
diff --git a/test/mjsunit/harmony/object-literals-super.js b/test/mjsunit/harmony/object-literals-super.js
index 3d713517ce14d0d50aa52396113e2f577018d871..ccf492bf5874ac471b804895fc27392239d8eb8b 100644
--- a/test/mjsunit/harmony/object-literals-super.js
+++ b/test/mjsunit/harmony/object-literals-super.js
@@ -141,16 +141,26 @@
};
var o = {
__proto__: p,
- eval() {
- assertSame(super.x, eval('super.x'));
- assertSame(super.m(), eval('super.m()'));
- // Global eval.
+ evalM() {
+ assertEquals(1, eval('super.m()'));
+ },
+ evalX() {
+ assertEquals(2, eval('super.x'));
+ },
+ globalEval1() {
+ assertThrows('super.x', SyntaxError);
+ assertThrows('super.m()', SyntaxError);
+ },
+ globalEval2() {
+ super.x;
assertThrows('super.x', SyntaxError);
assertThrows('super.m()', SyntaxError);
- return eval('super.m()');
}
};
- assertSame(1, o.eval());
+ o.evalM();
+ o.evalX();
+ o.globalEval1();
+ o.globalEval2();
})();
« no previous file with comments | « test/mjsunit/harmony/classes-lazy-parsing.js ('k') | test/mjsunit/harmony/super.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698