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

Unified Diff: test/mjsunit/harmony/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/object-literals-super.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/super.js
diff --git a/test/mjsunit/harmony/super.js b/test/mjsunit/harmony/super.js
index 87fceafb299bceffd8fead995e1e4a45f03705c7..1a0dd2add796fc9afb0ed27c807e295555a3eaef 100644
--- a/test/mjsunit/harmony/super.js
+++ b/test/mjsunit/harmony/super.js
@@ -2076,17 +2076,27 @@ TestKeyedSetterCreatingOwnPropertiesNonConfigurable(42, 43, 44);
get x() { return 2; }
}
class Derived extends Base {
- 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()');
}
}
let d = new Derived();
- assertSame(1, d.eval());
+ d.globalEval1();
+ d.globalEval2();
+ d.evalM();
+ d.evalX();
})();
« no previous file with comments | « test/mjsunit/harmony/object-literals-super.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698