/external/v8/test/mjsunit/strong/ |
D | classes.js | 25 function constructor(body) { function 31 assertSyntaxError(constructor("super.a;")); 32 assertSyntaxError(constructor("super['a'];")); 33 assertSyntaxError(constructor("super.f();")); 34 assertSyntaxError(constructor("super.a;")); 35 assertSyntaxError(constructor("{ super.a }")); 36 assertSyntaxError(constructor("if (0) super.a;")); 44 assertReferenceError(constructor("")); 45 assertReferenceError(constructor("1")); 49 assertSyntaxError(constructor("super(), 0;")); [all …]
|
/external/v8/test/mjsunit/es6/ |
D | typedarray-copywithin.js | 20 CheckEachTypedArray(function copyWithinArity(constructor) { argument 21 assertEquals(new constructor([]).copyWithin.length, 2); 25 CheckEachTypedArray(function copyWithinTargetAndStart(constructor) { argument 28 new constructor([1, 2, 3, 4, 5]).copyWithin(0, 3)); 30 new constructor([1, 2, 3, 4, 5]).copyWithin(1, 3)); 32 new constructor([1, 2, 3, 4, 5]).copyWithin(1, 2)); 34 new constructor([1, 2, 3, 4, 5]).copyWithin(2, 2)); 38 CheckEachTypedArray(function copyWithinTargetStartAndEnd(constructor) { argument 40 assertArrayEquals(new constructor([1, 2, 3, 4, 5]).copyWithin(0, 3, 4), 42 assertArrayEquals(new constructor([1, 2, 3, 4, 5]).copyWithin(1, 3, 4), [all …]
|
D | typedarray-from.js | 17 for (var constructor of typedArrayConstructors) { 18 assertEquals(1, constructor.from.length); 21 assertThrows(function () {constructor.from.call(Array, [])}, TypeError); 37 constructor.from([1], non_strict); 38 constructor.from([1], non_strict, void 0); 39 constructor.from([1], non_strict, null); 40 constructor.from([1], strict); 41 constructor.from([1], strict, void 0); 42 constructor.from([1], strict_null, null); 45 assertThrows(function() {constructor.from.call({}, [])}, TypeError); [all …]
|
D | typedarray-iteration.js | 27 for (var constructor of typedArrayConstructors) { 30 var a = new constructor([0, 1]); 32 constructor); 33 assertArrayLikeEquals([0, 1], a, constructor); 37 a = new constructor([1, 42, 3, 42, 4]); 40 }, o), constructor); 43 a = new constructor([1, 42, 3, 42, 4]); 46 }), constructor); 47 assertArrayLikeEquals([43, 43, 43, 43, 43], a, constructor); 52 new constructor([1, 2]).filter(function() { a.push(this) }, ''); [all …]
|
D | typedarray-fill.js | 16 for (var constructor of typedArrayConstructors) { 17 assertEquals(1, constructor.prototype.fill.length); 19 assertArrayEquals(new constructor([]).fill(8), []); 20 assertArrayEquals(new constructor([0, 0, 0, 0, 0]).fill(8), [8, 8, 8, 8, 8]); 21 assertArrayEquals(new constructor([0, 0, 0, 0, 0]).fill(8, 1), [0, 8, 8, 8, 8]); 22 assertArrayEquals(new constructor([0, 0, 0, 0, 0]).fill(8, 10), [0, 0, 0, 0, 0]); 23 assertArrayEquals(new constructor([0, 0, 0, 0, 0]).fill(8, -5), [8, 8, 8, 8, 8]); 24 assertArrayEquals(new constructor([0, 0, 0, 0, 0]).fill(8, 1, 4), [0, 8, 8, 8, 0]); 25 assertArrayEquals(new constructor([0, 0, 0, 0, 0]).fill(8, 1, -1), [0, 8, 8, 8, 0]); 26 assertArrayEquals(new constructor([0, 0, 0, 0, 0]).fill(8, 1, 42), [0, 8, 8, 8, 8]); [all …]
|
D | typedarray-of.js | 21 function TestTypedArrayOf(constructor) { argument 23 var a = constructor.of(); 25 assertEquals(constructor.prototype, Object.getPrototypeOf(a)); 29 a = constructor.of(undefined, null, [], true, false, 3.14); 32 if (constructor === Float32Array || constructor === Float64Array) { 52 a = constructor.of.apply(constructor, aux); 58 class Bag extends constructor { 59 constructor(length) { method in TestTypedArrayOf.Bag 75 var actual = constructor.of.call(Bag, 5, 6); 84 Object.defineProperty(constructor.prototype, "0", { [all …]
|
D | typedarray-reduce.js | 90 for (var constructor of typedArrayConstructors) { 93 var simpleArray = new constructor([2,4,6]) 120 testReduce("reduce", "EmptyReduceSum", 0, [], new constructor([]), sum, 0); 121 testReduce("reduce", "EmptyReduceProd", 1, [], new constructor([]), prod, 1); 122 testReduce("reduce", "EmptyReduceDec", 0, [], new constructor([]), dec, 0); 123 testReduce("reduce", "EmptyReduceAccumulate", [], [], new constructor([]), accumulate, []); 125 testReduce("reduce", "EmptyReduceSumNoInit", 0, [], new constructor([0]), sum); 126 testReduce("reduce", "EmptyReduceProdNoInit", 1, [], new constructor([1]), prod); 127 testReduce("reduce", "EmptyReduceDecNoInit", 0, [], new constructor([0]), dec); 150 testReduce("reduceRight", "EmptyReduceRightSum", 0, [], new constructor([]), sum, 0); [all …]
|
D | array-from.js | 41 function testArrayFrom(thisArg, constructor) { argument 43 constructor); 44 assertArrayLikeEquals(Array.from.call(thisArg, NaN), [], constructor); 45 assertArrayLikeEquals(Array.from.call(thisArg, Infinity), [], constructor); 46 assertArrayLikeEquals(Array.from.call(thisArg, 10000000), [], constructor); 48 constructor); 51 { length: 1, '0': { 'foo': 'bar' } }), [{'foo': 'bar'}], constructor); 54 { length: -1, '0': { 'foo': 'bar' } }), [], constructor); 57 [ 'foo', 'bar', 'baz' ]), ['foo', 'bar', 'baz'], constructor); 61 constructor); [all …]
|
D | legacy-subclassing.js | 17 assertEquals(MyArray, myArray.constructor); 18 assertEquals(Array, myArray.map(x => x + 1).constructor); 19 assertEquals(Array, myArray.concat().constructor); 24 assertEquals(MyUint8Array, myTypedArray.constructor); 25 assertEquals(MyUint8Array, myTypedArray.map(x => x + 1).constructor); 29 assertEquals(MyArrayBuffer, myBuffer.constructor); 30 assertEquals(ArrayBuffer, myBuffer.slice().constructor); 34 assertEquals(MyPromise, myPromise.constructor); 35 assertEquals(MyPromise, myPromise.then().constructor); 38 assertEquals(Uint8Array, myTypedArray.subarray(1).constructor);
|
D | classes.js | 22 class D2 { constructor() {} } method in TestBasics.D2 30 var F = class { constructor() {} }; method in TestBasics.F 84 assertEquals(C, C.prototype.constructor); 104 constructor() { method in TestConstructor.C 109 assertEquals(C, C.prototype.constructor); 130 constructor() { method in TestConstructorStrict.C 146 constructor() { method in TestSuperInConstructor.C 184 class D { constructor() { 42; } } method in TestToString.D 302 constructor: B, property in B 318 constructor(x) { method in TestAccessors.C [all …]
|
D | typedarray-sort.js | 28 for (var constructor of typedArrayConstructors) { 30 var a = new constructor([100, 7, 45]) 32 assertArrayLikeEquals(a, [7, 45, 100], constructor); 36 if (constructor === Float32Array || constructor === Float64Array) { 37 var b = new constructor([+0, -0, NaN, -0, NaN, +0]) 39 assertArrayLikeEquals(b, [-0, -0, +0, +0, NaN, NaN], constructor); 45 assertArrayLikeEquals(a, [100, 45, 7], constructor); 51 assertArrayLikeEquals(a, [7, 45, 100], constructor);
|
/external/v8/test/webkit/ |
D | class-constructor-return.js | 37 class BaseNoReturn { constructor() { } }; method in BaseNoReturn 38 class BaseReturnImplicit { constructor() { return; } }; method in BaseReturnImplicit 39 class BaseReturnUndefined { constructor() { return undefined; } }; method in BaseReturnUndefined 40 class BaseReturnThis { constructor() { return this; } }; method in BaseReturnThis 41 class BaseReturnObject { constructor() { return {a:1}; } }; method in BaseReturnObject 42 class BaseReturnObject2 { constructor() { return globalVariable; } }; method in BaseReturnObject2 43 class BaseReturnString { constructor() { return "test"; } }; method in BaseReturnString 44 class BaseReturnNumber { constructor() { return 1; } }; method in BaseReturnNumber 45 class BaseReturnNull { constructor() { return null; } }; method in BaseReturnNull 46 class BaseReturnSymbol { constructor() { return Symbol(); } }; method in BaseReturnSymbol [all …]
|
D | class-syntax-name-expected.txt | 11 PASS class { constructor() {} } threw exception SyntaxError: Unexpected token {. 12 PASS 'use strict'; class { constructor() {} } threw exception SyntaxError: Unexpected token {. 13 PASS class A { constructor() {} } did not throw exception. 14 PASS 'use strict'; class A { constructor() {} } did not throw exception. 15 PASS class A { constructor() {} }; A.toString() is 'class A { constructor() {} }' 16 PASS 'use strict'; class A { constructor() {} }; A.toString() is 'class A { constructor() {} }' 17 PASS class A { constructor() {} }; (new A) instanceof A is true 18 PASS 'use strict'; class A { constructor() {} }; (new A) instanceof A is true 19 PASS class A { constructor() { this.base = A; } }; (new A).base.toString() is 'class A { constructo… 20 PASS 'use strict'; class A { constructor() { this.base = A; } }; (new A).base.toString() is 'class … [all …]
|
D | class-syntax-extends-expected.txt | 19 PASS x = class extends Base { constructor() { } } did not throw exception. 24 PASS x = class extends null { constructor() { } }; x.__proto__ is Function.prototype 26 PASS x = class extends 3 { constructor() { } }; x.__proto__ threw exception TypeError: Class extend… 27 PASS x = class extends "abc" { constructor() { } }; x.__proto__ threw exception TypeError: Class ex… 29 PASS x = class extends baseWithBadPrototype { constructor() { } } threw exception TypeError: Class … 31 PASS x = class extends baseWithBadPrototype { constructor() { } } threw exception TypeError: Class … 32 PASS baseWithBadPrototype.prototype = null; x = class extends baseWithBadPrototype { constructor() … 33 PASS x = 1; c = class extends ++x { constructor() { } }; threw exception SyntaxError: Unexpected to… 34 PASS x = 1; c = class extends x++ { constructor() { } }; threw exception SyntaxError: Unexpected to… 35 PASS x = 1; c = class extends (++x) { constructor() { } }; threw exception TypeError: Class extends… [all …]
|
D | class-syntax-expression-expected.txt | 17 PASS A.prototype.constructor is A 22 PASS x = class { constructor() {} constructor() {} } threw exception SyntaxError: A class may only … 23 PASS x = class { get constructor() {} } threw exception SyntaxError: Class constructor may not be a… 24 PASS x = class { set constructor() {} } threw exception SyntaxError: Class constructor may not be a… 25 PASS x = class { constructor() {} static constructor() { return staticMethodValue; } } did not thro… 26 PASS x = class { constructor() {} static constructor() { return staticMethodValue; } }; x.construct… 27 PASS x = class { constructor() {} static prototype() {} } threw exception SyntaxError: Classes may … 28 PASS x = class { constructor() {} static get prototype() {} } threw exception SyntaxError: Classes … 29 PASS x = class { constructor() {} static set prototype() {} } threw exception SyntaxError: Classes … 30 PASS x = class { constructor() {} prototype() { return instanceMethodValue; } } did not throw exce… [all …]
|
D | class-syntax-declaration-expected.txt | 17 PASS A.prototype.constructor is A 24 PASS class X { constructor() {} constructor() {} } threw exception SyntaxError: A class may only ha… 25 PASS class X { get constructor() {} } threw exception SyntaxError: Class constructor may not be an … 26 PASS class X { set constructor() {} } threw exception SyntaxError: Class constructor may not be an … 27 PASS class X { constructor() {} static constructor() { return staticMethodValue; } } did not throw … 28 PASS class X { constructor() {} static constructor() { return staticMethodValue; } }; X.constructor… 29 PASS class X { constructor() {} static prototype() {} } threw exception SyntaxError: Classes may no… 30 PASS class X { constructor() {} static get prototype() {} } threw exception SyntaxError: Classes ma… 31 PASS class X { constructor() {} static set prototype() {} } threw exception SyntaxError: Classes ma… 32 PASS class X { constructor() {} prototype() { return instanceMethodValue; } } did not throw excepti… [all …]
|
D | class-syntax-super-expected.txt | 16 PASS x = class extends Base { constructor() { super(); } super() {} } did not throw exception. 17 PASS x = class extends Base { constructor() { super(); } method() { super() } } threw exception Syn… 18 PASS x = class extends Base { constructor() { super(); } method() { super } } threw exception Synta… 19 PASS x = class extends Base { constructor() { super(); } method() { return new super } } threw exce… 20 PASS x = class extends Base { constructor() { super(); } method1() { delete (super.foo) } method2()… 23 PASS new (class { constructor() { return undefined; } }) instanceof Object is true 24 PASS new (class { constructor() { return 1; } }) instanceof Object is true 25 PASS new (class extends Base { constructor() { return undefined } }) threw exception ReferenceError… 26 PASS new (class extends Base { constructor() { super(); return undefined } }) instanceof Object is … 27 PASS x = { }; new (class extends Base { constructor() { return x } }); is x [all …]
|
/external/v8/test/mjsunit/harmony/ |
D | typedarray-species.js | 21 for (let constructor of typedArrayConstructors) { 22 class MyTypedArray extends constructor { } 23 assertEquals(MyTypedArray, new MyTypedArray().map(()=>0).constructor); 24 assertEquals(MyTypedArray, new MyTypedArray().filter(()=>{}).constructor); 25 assertEquals(MyTypedArray, new MyTypedArray().slice().constructor); 30 for (let constructor of typedArrayConstructors) { 31 class MyTypedArray extends constructor { } 32 class MyOtherTypedArray extends constructor { 35 assertEquals(MyTypedArray, new MyOtherTypedArray().map(()=>0).constructor); 36 assertEquals(MyTypedArray, new MyOtherTypedArray().filter(()=>{}).constructor); [all …]
|
D | array-species.js | 15 assertEquals(MyArray, new MyArray().map(()=>{}).constructor); 16 assertEquals(MyArray, new MyArray().filter(()=>{}).constructor); 17 assertEquals(MyArray, new MyArray().slice().constructor); 18 assertEquals(MyArray, new MyArray().splice().constructor); 26 assertEquals(MyArray, new MyOtherArray().map(()=>{}).constructor); 27 assertEquals(MyArray, new MyOtherArray().filter(()=>{}).constructor); 28 assertEquals(MyArray, new MyOtherArray().slice().constructor); 29 assertEquals(MyArray, new MyOtherArray().splice().constructor); 40 Array.prototype.map.call(new MyNonArray(), ()=>{}).constructor); 42 Array.prototype.filter.call(new MyNonArray(), ()=>{}).constructor); [all …]
|
D | species.js | 18 for (let constructor of classesWithSpecies) { 19 assertEquals(constructor, constructor[Symbol.species]); 20 assertThrows(function() { constructor[Symbol.species] = undefined }, TypeError); 21 let descriptor = Object.getOwnPropertyDescriptor(constructor, Symbol.species); 31 new Set(classesWithSpecies.map(constructor => 33 constructor, Symbol.species).get) 36 for (let constructor of classesWithoutSpecies) 37 assertEquals(undefined, constructor[Symbol.species]);
|
/external/v8/test/webkit/fast/js/ |
D | primitive-property-access-edge-cases.js | 31 delete String.prototype.constructor; method in delete 66 function checkGet(x, constructor) argument 69 …Object.defineProperty(constructor.prototype, "foo", { get: function() { checkOkay = typeof this ==… 71 delete constructor.prototype.foo; 75 function checkSet(x, constructor) argument 78 …Object.defineProperty(constructor.prototype, "foo", { set: function() { checkOkay = typeof this ==… 80 delete constructor.prototype.foo; 84 function checkGetStrict(x, constructor) argument 87 …Object.defineProperty(constructor.prototype, "foo", { get: function() { "use strict"; checkOkay = … 89 delete constructor.prototype.foo; [all …]
|
/external/v8/test/mjsunit/compiler/ |
D | inline-construct.js | 32 function TestInlinedConstructor(constructor, closure) { argument 38 result = closure(constructor, 11, noDeopt, counter); 42 result = closure(constructor, 23, noDeopt, counter); 47 result = closure(constructor, 42, noDeopt, counter); 51 result = closure(constructor, 127, forceDeopt, counter); 57 %ClearFunctionTypeFeedback(constructor); 60 function value_context(constructor, val, deopt, counter) { argument 61 var obj = new constructor(val, deopt, counter); 65 function test_context(constructor, val, deopt, counter) { argument 66 if (!new constructor(val, deopt, counter)) { [all …]
|
/external/guava/guava-tests/test/com/google/common/reflect/ |
D | InvokableTest.java | 45 Prepender.constructor().getReturnType().getType()); in testConstructor_returnType() 57 Constructor<WithConstructorAndTypeParameter> constructor = type.getDeclaredConstructor(); in testConstructor_returnType_hasTypeParameter() local 58 Invokable<?, ?> factory = Invokable.from(constructor); in testConstructor_returnType_hasTypeParameter() 61 assertEquals(constructor.getTypeParameters()[0], factory.getTypeParameters()[1]); in testConstructor_returnType_hasTypeParameter() 70 Prepender.constructor(String.class, int.class).getExceptionTypes()); in testConstructor_exceptionTypes() 75 Prepender.constructor().getTypeParameters(); in testConstructor_typeParameters() 81 Invokable<?, Prepender> delegate = Prepender.constructor(String.class, int.class); in testConstructor_parameters() 95 Invokable<?, Prepender> delegate = Prepender.constructor(String.class, int.class); in testConstructor_call() 102 Invokable<?, Prepender> delegate = Prepender.constructor(String.class, int.class) in testConstructor_returning() 110 Invokable<?, Prepender> delegate = Prepender.constructor(String.class, int.class); in testConstructor_invalidReturning() [all …]
|
/external/mockito/src/org/mockito/internal/util/reflection/ |
D | FieldInitializer.java | 175 Constructor<?> constructor = null; in instantiate() local 177 constructor = field.getType().getDeclaredConstructor(); in instantiate() 178 changer.enableAccess(constructor); in instantiate() 181 Object newFieldInstance = constructor.newInstance(noArg); in instantiate() 194 if(constructor != null) { in instantiate() 195 changer.safelyDisableAccess(constructor); in instantiate() 233 Constructor<?> constructor = null; in instantiate() local 235 constructor = biggestConstructor(field.getType()); in instantiate() 236 changer.enableAccess(constructor); in instantiate() 238 … final Object[] args = argResolver.resolveTypeInstances(constructor.getParameterTypes()); in instantiate() [all …]
|
/external/guice/extensions/assistedinject/src/com/google/inject/assistedinject/ |
D | AssistedConstructor.java | 42 private final Constructor<T> constructor; field in AssistedConstructor 47 Constructor<T> constructor, List<TypeLiteral<?>> parameterTypes) { in create() argument 48 return new AssistedConstructor<T>(constructor, parameterTypes); in create() 51 private AssistedConstructor(Constructor<T> constructor, List<TypeLiteral<?>> parameterTypes) { in AssistedConstructor() argument 52 this.constructor = constructor; in AssistedConstructor() 54 Annotation[][] annotations = constructor.getParameterAnnotations(); in AssistedConstructor() 88 return new HashSet<Class<?>>(Arrays.asList(constructor.getExceptionTypes())); in getDeclaredExceptions() 96 constructor.setAccessible(true); in newInstance() 98 return constructor.newInstance(args); in newInstance() 106 return constructor.toString(); in toString()
|