Lines Matching refs:C
8 var C = class C {} class in TestBasics
9 assertEquals(typeof C, 'function');
10 assertEquals(C.__proto__, Function.prototype);
11 assertEquals(Object.prototype, Object.getPrototypeOf(C.prototype));
12 assertEquals(Function.prototype, Object.getPrototypeOf(C));
13 assertEquals('C', C.name);
36 class C extends null {} class in TestBasicsExtends
37 assertEquals(typeof C, 'function');
38 assertEquals(C.__proto__, Function.prototype);
39 assertEquals(null, Object.getPrototypeOf(C.prototype));
41 class D extends C {}
43 assertEquals(D.__proto__, C);
44 assertEquals(C.prototype, Object.getPrototypeOf(D.prototype));
50 class C {} class in TestSideEffectInExtends
51 class D extends (calls++, C) {}
54 assertEquals(D.__proto__, C);
55 assertEquals(C.prototype, Object.getPrototypeOf(D.prototype));
61 class C extends 42 {} class
66 class C extends Math.abs {} class
71 class C extends Math.abs {} class
77 class C extends g {} class
83 class C {} class in TestConstructorProperty
84 assertEquals(C, C.prototype.constructor);
85 var descr = Object.getOwnPropertyDescriptor(C.prototype, 'constructor');
93 class C {} class in TestPrototypeProperty
94 var descr = Object.getOwnPropertyDescriptor(C, 'prototype');
103 class C { class in TestConstructor
105 assertEquals(Object.getPrototypeOf(this), C.prototype);
109 assertEquals(C, C.prototype.constructor);
110 var descr = Object.getOwnPropertyDescriptor(C.prototype, 'constructor');
115 var c = new C();
117 assertEquals(Object.getPrototypeOf(c), C.prototype);
122 class C {} class in TestImplicitConstructor
123 var c = new C();
124 assertEquals(Object.getPrototypeOf(c), C.prototype);
129 class C { class in TestConstructorStrict
136 new C();
145 class C extends B { class in TestSuperInConstructor
153 new C;
159 class C {} class in TestStrictMode
181 class C {} class in TestToString
182 assertEquals('class C {}', C.toString());
234 class C { class in TestMethods
241 assertMethodDescriptor(C.prototype, 'method');
242 assertMethodDescriptor(C.prototype, 'method2');
243 assertMethodDescriptor(C, 'staticMethod');
244 assertMethodDescriptor(C, 'staticMethod2');
246 assertEquals(1, new C().method());
247 assertEquals(2, C.staticMethod());
248 assertEquals(3, new C().method2());
249 assertEquals(4, C.staticMethod2());
254 class C { class in TestGetters
261 assertGetterDescriptor(C.prototype, 'x');
262 assertGetterDescriptor(C.prototype, 'y');
263 assertGetterDescriptor(C, 'staticX');
264 assertGetterDescriptor(C, 'staticY');
266 assertEquals(1, new C().x);
267 assertEquals(2, C.staticX);
268 assertEquals(3, new C().y);
269 assertEquals(4, C.staticY);
276 class C { class in TestSetters
283 assertSetterDescriptor(C.prototype, 'x');
284 assertSetterDescriptor(C.prototype, 'y');
285 assertSetterDescriptor(C, 'staticX');
286 assertSetterDescriptor(C, 'staticY');
288 assertEquals(1, new C().x = 1);
290 assertEquals(2, C.staticX = 2);
292 assertEquals(3, new C().y = 3);
294 assertEquals(4, C.staticY = 4);
308 class C extends B { class in TestSideEffectsInPropertyDefine
312 assertEquals(1, new C().m());
317 class C { class in TestAccessors
329 assertAccessorDescriptor(C.prototype, 'x');
330 assertAccessorDescriptor(C, 'staticX');
332 var c = new C(1);
338 C._x = 3;
339 assertEquals(3, C.staticX);
340 C._x = 4;
341 assertEquals(4, C.staticX );
346 class C { class in TestProto
349 assertMethodDescriptor(C.prototype, '__proto__');
350 assertEquals(1, new C().__proto__());
355 class C { class in TestProtoStatic
358 assertMethodDescriptor(C, '__proto__');
359 assertEquals(1, C.__proto__());
364 class C { class in TestProtoAccessor
368 assertAccessorDescriptor(C.prototype, '__proto__');
369 var c = new C();
378 class C { class in TestStaticProtoAccessor
382 assertAccessorDescriptor(C, '__proto__');
383 C._p = 1;
384 assertEquals(1, C.__proto__);
385 C.__proto__ = 2;
386 assertEquals(2, C.__proto__);
406 class C extends Base { class in TestSettersOnProto
415 assertEquals(1, new C().m());
416 assertEquals(2, C.staticM());
423 class C extends Base {} class
438 class C extends Base {} class in TestPrototypeGetter
450 class C extends Base {} class
464 class C extends Base {} class
478 class C extends B { class in TestSuperInMethods
484 assertEquals(1, new C().method());
497 class C extends B { class in TestSuperInGetter
503 assertEquals(1, new C().y);
516 class C extends B { class in TestSuperInSetter
523 assertEquals(3, new C().y = 3);
536 class C extends B { class in TestSuperInStaticMethods
542 assertEquals(1, C.method());
555 class C extends B { class in TestSuperInStaticGetter
561 assertEquals(1, C.x);
574 class C extends B { class in TestSuperInStaticSetter
581 assertEquals(3, C.x = 3);
604 class C extends B { class in TestNumericPropertyNames
612 assertEquals(1, new C()[1]());
613 assertEquals(2, new C()[2]);
614 assertEquals(4, C[4]());
615 assertEquals(5, C[5]);
621 class C {} class in TestDefaultConstructorNoCrash
622 assertThrows(function () {C();}, TypeError);
623 assertThrows(function () {C(1);}, TypeError);
624 assertTrue(new C() instanceof C);
625 assertTrue(new C(1) instanceof C);
757 class C { class in TestNameBinding
759 C2 = C;
762 C2 = C;
765 C2 = C;
768 C2 = C;
771 new C();
772 assertEquals(C, C2);
775 new C().m();
776 assertEquals(C, C2);
779 new C().x;
780 assertEquals(C, C2);
783 new C().x = 1;
784 assertEquals(C, C2);
790 var C = class C2 { class in TestNameBindingExpression
792 assertEquals(C2, C);
796 assertEquals(C2, C);
800 assertEquals(C2, C);
804 assertEquals(C2, C);
808 new C();
809 assertEquals(C, C3);
812 new C().m();
813 assertEquals(C, C3);
816 new C().x;
817 assertEquals(C, C3);
820 new C().x = 1;
821 assertEquals(C, C3);
843 class C extends Base { class
848 }; new C();
851 class C extends Base { class
855 }; new C();
858 class C extends Base { class
862 }; new C();
865 class C extends Base { class
870 }; new C();
873 class C extends Base { class
877 }; new C();
880 class C extends Base { class
884 }; new C();
887 class C extends Base { class
891 }; new C();
894 class C extends Base { class
898 }; new C();
901 class C extends Base { class
905 }; new C();
935 function testClassRestrictedProperties(C) { argument
936 assertEquals(false, C.hasOwnProperty("arguments"));
937 assertThrows(function() { return C.arguments; }, TypeError);
938 assertThrows(function() { C.arguments = {}; }, TypeError);
940 assertEquals(false, C.hasOwnProperty("caller"));
941 assertThrows(function() { return C.caller; }, TypeError);
942 assertThrows(function() { C.caller = {}; }, TypeError);
944 assertEquals(false, (new C).method.hasOwnProperty("arguments"));
945 assertThrows(function() { return new C().method.arguments; }, TypeError);
946 assertThrows(function() { new C().method.arguments = {}; }, TypeError);
948 assertEquals(false, (new C).method.hasOwnProperty("caller"));
949 assertThrows(function() { return new C().method.caller; }, TypeError);
950 assertThrows(function() { new C().method.caller = {}; }, TypeError);