/third_party/skia/third_party/externals/tint/src/ |
H A D | castable_test.cc | 25 struct Animal : public tint::Castable<Animal> { struct 26 explicit Animal(std::string n) : name(n) {} in Animal() function 30 struct Amphibian : public tint::Castable<Amphibian, Animal> { 34 struct Mammal : public tint::Castable<Mammal, Animal> { 38 struct Reptile : public tint::Castable<Reptile, Animal> { 59 ASSERT_TRUE(frog->Is<Animal>()); in TEST() 60 ASSERT_TRUE(bear->Is<Animal>()); in TEST() 61 ASSERT_TRUE(gecko->Is<Animal>()); in TEST() 83 ASSERT_TRUE((frog->Is<Animal, kDontErrorOnImpossibleCas in TEST() [all...] |
/third_party/typescript/tests/baselines/reference/ |
H A D | stringLiteralTypesOverloads05.js | 2 interface Animal { animal: {} }; 3 interface Dog extends Animal { dog: {} } 4 interface Cat extends Animal { cat: {} } 5 interface Moose extends Animal { moose: {} } 9 function doThing(x: string): Animal; 22 interface Animal {
25 interface Dog extends Animal {
28 interface Cat extends Animal {
31 interface Moose extends Animal {
36 declare function doThing(x: string): Animal;
[all...] |
H A D | exhaustiveSwitchStatements1.js | 200 enum Animal { DOG, CAT } 202 declare const zoo: { animal: Animal } | undefined; 204 function expression(): Animal { 205 switch (zoo?.animal ?? Animal.DOG) { 206 case Animal.DOG: return Animal.DOG 207 case Animal.CAT: return Animal.CAT 436 var Animal;
variable 437 (function (Animal) {
[all...] |
H A D | typeParameterExtendingUnion1.js | 2 class Animal { run() { } } 3 class Cat extends Animal { meow } 4 class Dog extends Animal { woof } 6 function run(a: Animal) { 31 var Animal = /** @class */ (function () {
32 function Animal() {
34 Animal.prototype.run = function () { };
35 return Animal;
43 }(Animal));
50 }(Animal));
[all...] |
H A D | typeParameterExtendingUnion2.js | 2 class Animal { run() { } } 3 class Cat extends Animal { meow } 4 class Dog extends Animal { woof } 31 var Animal = /** @class */ (function () {
32 function Animal() {
34 Animal.prototype.run = function () { };
35 return Animal;
43 }(Animal));
50 }(Animal));
|
H A D | strictFunctionTypesErrors.js | 91 interface Animal { animal: void } 92 interface Dog extends Animal { dog: void } 93 interface Cat extends Animal { cat: void } 99 declare let animalComparer1: Comparer1<Animal>; 109 declare let animalComparer2: Comparer2<Animal>; 122 declare let animalCrate: Crate<Animal>; 132 declare let fc1: (f: (x: Animal) => Animal) => void; 142 static f1(x: Animal): Animal { thro [all...] |
H A D | contextualSignatureInstatiationCovariance.js | 2 interface Animal { x } 4 interface Giraffe extends Animal, TallThing { y } 8 var g2: (a: Animal, t: TallThing) => void; 9 g2 = f2; // While neither Animal nor TallThing satisfy the constraint, T is at worst a Giraffe and compatible with both via covariance. 11 var h2: (a1: Animal, a2: Animal) => void; 12 h2 = f2; // Animal does not satisfy the constraint, but T is at worst a Giraffe and compatible with Animal via covariance.
17 g2 = f2; // While neither Animal nor TallThing satisfy the constraint, T is at worst a Giraffe and compatible with both via covariance.
19 h2 = f2; // Animal doe [all...] |
H A D | typeMatch2.js | 10 class Animal { private a; } 11 class Giraffe extends Animal { private g; } 14 var a = new Animal(); 70 var Animal = /** @class */ (function () {
71 function Animal() {
73 return Animal;
81 }(Animal));
83 var a = new Animal();
|
H A D | instanceOfAssignability.js | 17 class Animal { 20 class Mammal extends Animal { milk; } 63 function fn6(x: Animal|Mammal) { 120 var Animal = /** @class */ (function () {
121 function Animal() {
123 return Animal;
131 }(Animal));
|
H A D | contextualSignatureInstatiationContravariance.js | 2 interface Animal { x } 3 interface Giraffe extends Animal { y } 4 interface Elephant extends Animal { y2 } 6 var f2: <T extends Animal>(x: T, y: T) => void;
|
H A D | typeArgumentInferenceWithConstraintAsCommonRoot.js | 2 interface Animal { x } 3 interface Giraffe extends Animal { y } 4 interface Elephant extends Animal { z } 5 function f<T extends Animal>(x: T, y: T): T { return undefined; } 8 f(g, e); // valid because both Giraffe and Elephant satisfy the constraint. T is Animal
14 f(g, e); // valid because both Giraffe and Elephant satisfy the constraint. T is Animal
|
H A D | functionOverloads44.js | 2 interface Animal { animal } 3 interface Dog extends Animal { dog } 4 interface Cat extends Animal { cat } 7 function foo1(bar: { a:string }[]): Animal;
|
H A D | functionOverloads45.js | 2 interface Animal { animal } 3 interface Dog extends Animal { dog } 4 interface Cat extends Animal { cat } 8 function foo1([x]: { a:number | string }[]): Animal {
|
H A D | assertionFunctionsCanNarrowByDiscriminant.js | 12 type Animal = Cat | Dog; 16 const animal = { type: 'cat', canMeow: true } as Animal; 21 const animalOrUndef = { type: 'cat', canMeow: true } as Animal | undefined;
|
H A D | spreadIdenticalTypesRemoved.js | 2 interface Animal { 10 function clonePet(pet: Animal, fullCopy?: boolean) {
|
/third_party/typescript/tests/baselines/reference/tscWatch/sourceOfProjectReferenceRedirect/ |
H A D | with-simple-project-when-solution-is-already-built.js | 56 export default interface Animal {
62 import Animal from '.';
65 export interface Dog extends Animal {
83 import Animal from './animal';
85 export default Animal;
177 export default interface Animal { 191 import Animal from './animal'; 192 export default Animal; 215 import Animal from '.'; 216 export interface Dog extends Animal { [all...] |
/third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.02/ |
H A D | 11.02.02-006.js | 15 function Animal(name) class 25 var animal = new Animal("animal"); 26 var bird = new Animal("bird");
|
H A D | 11.02.02-007.js | 15 function Animal(name) class 25 var animal = new Animal("animal"); 26 var bird = new Animal("bird");
|
/third_party/python/Lib/test/ |
H A D | test_typing.py | 6615 class Animal(BaseAnimal, total=False): class 6619 class Cat(Animal): 6626 self.assertEqual(Animal.__required_keys__, frozenset(['name'])) 6627 self.assertEqual(Animal.__optional_keys__, frozenset(['tail', 'voice'])) 6628 self.assertEqual(Animal.__annotations__, {
|