OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 the V8 project authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 (function () { | |
6 "use strict"; | |
arv (Not doing code reviews)
2015/05/12 16:44:20
wrong indentation... use 2 spaces
Dmitry Lomov (no reviews)
2015/05/12 16:50:18
Done.
| |
7 class A { | |
8 s() { | |
9 super.bla = 10; | |
arv (Not doing code reviews)
2015/05/12 16:44:20
Can we also add tests for reading?
Dmitry Lomov (no reviews)
2015/05/12 16:50:17
Done.
| |
10 } | |
11 }; | |
12 | |
13 let a = new A(); | |
14 (new A).s.call(a); | |
15 assertEquals(10, a.bla); | |
16 assertThrows(function() { (new A).s.call(undefined); }, TypeError); | |
17 assertThrows(function() { (new A).s.call(42); }, TypeError); | |
18 assertThrows(function() { (new A).s.call(null); }, TypeError); | |
19 assertThrows(function() { (new A).s.call("abc"); }, TypeError); | |
20 })() | |
OLD | NEW |