| /arkcompiler/ets_frontend/ets2panda/test/parser/ets/import_tests/relative_import/ |
| D | Point-expected.txt | 9 "name": "Point", 15 "program": "Point.ets" 20 "program": "Point.ets" 37 "program": "Point.ets" 42 "program": "Point.ets" 58 "program": "Point.ets" 63 "program": "Point.ets" 73 "program": "Point.ets" 78 "program": "Point.ets" 92 "program": "Point.ets" [all …]
|
| D | Line.ets | 16 import { Point } from './Point' 19 start: Point; 20 end: Point; 22 constructor(start: Point, end: Point) {
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_func_tests/escompat/ |
| D | JsonParseTest.ets | 19 class Point { 35 return `Point(x=${this.x},y=${this.y})` 40 point: Nullish<Point> 43 this.point = undefined 46 constructor(point: Point) { 47 this.point = point 77 const POINT_TYPE = typeFor([] as FixedArray<Point>) 80 const point = new Point(1, 2) 82 const parsedPoint: Point = JSON.parse<Point>(JSON.stringify(point), undefined, POINT_TYPE)! 84 Assertions.assertEquals(point.x, parsedPoint.x) [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_func_tests/algorithms/ |
| D | SampleAppTest.ets | 22 class Point { 39 getOrigin(): Point; 50 start: Point | null; // bottom-left 51 end: Point | null; // top-right 57 constructor(start: Point, end: Point) { 62 override getOrigin(): Point { 63 return this.start ?? new Point(); 66 let s = this.start ?? new Point(); 67 let e = this.end ?? new Point(); 71 let s = this.start ?? new Point(); [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ani/tests/class_ops/ |
| D | class_find_field_test.ets | 16 class Point { 19 getRadius: (p: Point) => number = (p: Point) => Math.sqrt(p.x * p.x + p.y * p.y); 22 class ExtendedPoint extends Point { 27 private p1: Point | ExtendedPoint | null = null; 28 private p2: Point | ExtendedPoint | null = null; 41 protected center: Point | ExtendedPoint = new Point(); 47 objects: [Circle, Sphere, Vector, ExtendedPoint, Point]; 49 constructor(objects: [Circle, Sphere, Vector, ExtendedPoint, Point]) {
|
| /arkcompiler/ets_frontend/ets2panda/linter/docs/rules/ |
| D | recipe74.md | 17 class Point { 22 function returnZeroPoint(): Point { 23 return new Point() 35 class Point { 40 function returnZeroPoint(): Point { 41 return new Point()
|
| D | recipe38.md | 55 class Point { 60 function id_x_y(o: Point): Point { 64 // Structural typing is used to deduce that p is Point: 68 // A literal can be contextually (i.e., implicitly) typed as Point: 118 class Point { 123 // to create a valid object. Since there is no other Point constructors, 127 function id_x_y(o: Point): Point { 132 let p: Point = {x: 5, y: 10} 135 // id_x_y expects Point explicitly 136 // New instance of Point is initialized with the literal
|
| D | recipe126.md | 17 export = Point 19 class Point { 21 static origin = new Point(0, 0) 37 export class Point { 39 static origin = new Point(0, 0)
|
| D | recipe59.md | 16 class Point { 21 let p = new Point() 34 class Point { 39 let p = new Point()
|
| D | recipe28.md | 15 type Point = {x: number, y: number} 16 type N = Point["x"] // is equal to number 25 class Point {x: number = 0; y: number = 0}
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/04.casting_contexts_and_conversions/04.casting_conversions_from_type_parameter/ |
| D | objectto_interface_3.ets | 20 interface Point { 25 const point: Point = { x: 10, y: 20 }; 28 const obj1: object = point; 29 assertTrue(obj1 == point);
|
| /arkcompiler/ets_frontend/ets2panda/linter/test/rules/ |
| D | rule74.ets | 16 class Point { 21 function returnZeroPoint(): Point { 22 return new Point() 29 function returnZeroPoint2(): Point { 30 return new Point()
|
| D | rule38.ets.migrate.ets | 52 class Point { 56 function id_x_y(o: Point): Point { 60 // Structural typing is used to deduce that p is Point: 68 // A literal can be contextually (i.e., implicitly) typed as Point:
|
| D | rule38.ets | 48 class Point { 52 function id_x_y(o: Point): Point { 56 // Structural typing is used to deduce that p is Point: 60 // A literal can be contextually (i.e., implicitly) typed as Point:
|
| D | rule126.ets | 17 export = Point 19 class Point { 21 static origin = new Point(0, 0)
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/interop_js/tests/proxies/ets_function_proxy/ |
| D | ets_function_proxy.ets | 19 class Point { 28 function point_create(x: double, y: double): Point { 29 return new Point(x, y) 32 function point_get_x(p: Point): double { 36 function point_get_y(p: Point): double {
|
| /arkcompiler/ets_frontend/ets2panda/test/ast/parser/ets/import_tests/ |
| D | import_name_conflict_6.ets | 16 import {Point} from /* @@ label */"import_tests/relative_import/Point"; 18 class Point {} 21 /* @@@ label Error TypeError: Class 'Point' is already defined. */
|
| D | import_name_conflict_12.ets | 16 import {Point} from /* @@ label */"import_tests/relative_import/Point"; 18 function Point(): int { 23 /* @@@ label Error TypeError: Class 'Point' is already defined with different type. */
|
| D | import_name_conflict_9.ets | 16 import {Point} from /* @@ label */"import_tests/relative_import/Point"; 18 let Point: int = 1; 21 /* @@@ label Error TypeError: Class 'Point' is already defined with different type. */
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ani/tests/find_ops/ |
| D | find_class_test.cpp | 25 ASSERT_EQ(env_->FindClass("Lfind_class_test/Point;", &cls), ANI_OK); in TEST_F() 36 ASSERT_EQ(env_->FindClass("Lfind_class_test/Point;", nullptr), ANI_INVALID_ARGS); in TEST_F() 47 ASSERT_EQ(env_->FindNamespace("Lfind_class_test/Point;", &ns), ANI_NOT_FOUND); in TEST_F() 58 ASSERT_FALSE(IsRuntimeClassInitialized("find_class_test.Point")); in TEST_F() 60 ASSERT_EQ(env_->FindClass("find_class_test.Point", &cls), ANI_OK); in TEST_F() 61 ASSERT_FALSE(IsRuntimeClassInitialized("find_class_test.Point")); in TEST_F()
|
| /arkcompiler/runtime_core/static_core/verification/util/ |
| D | range.h | 115 Range BasedAt(Int point) const in BasedAt() argument 117 return Range {point, point + to_ - from_}; in BasedAt() 119 bool Contains(Int point) const in Contains() argument 121 return point >= from_ && point <= to_; in Contains() 123 Int PutInBounds(Int point) const in PutInBounds() argument 125 if (point < from_) { in PutInBounds() 128 if (point > to_) { in PutInBounds() 131 return point; in PutInBounds()
|
| /arkcompiler/runtime_core/libark_defect_scan_aux/tests/unittest/ |
| D | callee_info_test.js | 54 class Point { class 77 class ColorPoint extends Point { 98 let point = new Point(2, 3); 101 let x = point.getCoordinateX(); 102 point.setCoordinateX(x); 103 let point2 = point;
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_func_tests/std/core/ |
| D | TypeFieldTest.ets | 29 class Point implements Serializable { 37 add(oth: Point): Point { 38 let res = new Point() 45 class Point3D extends Point { 59 test(xf.getOwnerType().equals(Type.of(new Point())), " OwnerType: Point") +
|
| D | TypeClassTypeTest.ets | 27 class Point implements Serializable { 44 add(oth: Point): Point { 45 let res = new Point() 52 class Point3D extends Point { 216 let pt = Type.of(new Point()) as ClassType 222 return test(pt.getName() == "TypeClassTypeTest.Point", "ClassName: Point") + 233 test(addMethod != null, " Point.add method") + 254 …test(pt.getBaseType().getName() == "TypeClassTypeTest.Point", " base type is Poin… 268 test(addMethod != null, " Point.add method") + 306 let pt = Type.of(new Point()) as ClassType [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/doc/cookbook/ |
| D | summary.rst | 112 class Point { 124 all Point objects have the property x: 126 let p1 = new Point(1.0, 1.0) 130 /* Class Point does not define any property 134 let p2 = new Point(2.0, 2.0) 138 /* It is guaranteed that all Point objects 143 let p3 = new Point(3.0, 3.0) 148 /* It is guaranteed that all Point objects 153 let p4 = new Point(4.0, 4.0) 157 // Usage of Point objects which is compliant with the class definition: [all …]
|