function Base() {}
Base.prototype = {
constructor: Base,
- x : "x from Base"
+ x: 'x from Base'
};
function Derived() {}
};
Derived.prototype.testSetter = function() {
- assertEquals("x from Base", super.x);
- super.x = "data property";
- assertEquals("x from Base", super.x);
- assertEquals("data property", this.x);
+ assertEquals('x from Base', super.x);
+ super.x = 'data property';
+ assertEquals('x from Base', super.x);
+ assertEquals('data property', this.x);
}.toMethod(Derived.prototype);
new Derived().testSetter();
var ex;
try {
super.newProperty = 15;
- } catch(e) { ex = e; }
+ } catch (e) { ex = e; }
assertTrue(ex instanceof TypeError);
}.toMethod(Derived.prototype);