Home
last modified time | relevance | path

Searched full:f (Results 1 – 25 of 2260) sorted by relevance

12345678910>>...91

/arkcompiler/ets_frontend/ets2panda/test/runtime/ets/
DUnionAsAndInstanceof.sts16 function assert_ccexc(f: () => void) {
18 f();
26 function assert_nothrow(f: () => void) {
28 f();
42 // let f = ... until inference in form ((p)=>expr)(a) is broken
43 assert_ccexc(() => { let f = ((x: Object | null | undefined) => x as Object); f(null); });
44 assert_ccexc(() => { let f = ((x: Object | null | undefined) => x as Object); f(undefined); });
45 assert_ccexc(() => { let f = ((x: Object | null) => x as Object); f(null); });
46 assert_ccexc(() => { let f = ((x: Object | undefined) => x as Object); f(undefined); });
48 …assert_ccexc(() => { let f = ((x: Object | null | undefined) => x as Object | undefined); f(null);…
[all …]
DSuperCall.sts40 class F {
41 public readonly f: int;
44 this.f = 42;
48 final class G extends F {
52 final class H extends F {
58 final class I extends F {
76 const f: F = new F();
77 assert f.f == 42;
80 assert g.f == 42;
83 assert h.f == 42;
[all …]
DOptionalChains.sts19 function assert_npe(f: () => void) {
21 f();
30 f: Link = this;
35 of: Link | null = this.f;
50 assert_o(l?.f);
53 assert_o(l?.of!.f);
56 assert_u(nl?.f);
59 assert_u(nl?.of!.f);
60 assert_u(nl?.nf!.f);
63 nl?.f.noeval();
[all …]
DobjectLiteralInterfaceType.sts17 f: int
31 return {x: 99, f: 44, s: "sR", iv: {v: 77}} // return statement
34 function test(i: int, f: int, x: int, s: String, ivv: int) {} // should not prevent calling the nex…
36 function test(i: I = {f: -1, x: -2, s: "default", iv: {v: -3}},
37 f: int = -1,
41 assert i.f == f : "\"f\" is not equal \"" + i.f + "\" != \"" + f + "\""
49 f : 1,
57 f: 4,
64 i = {f: 7, x: 8, s: "s3", iv : { v: 9}} // assignment
68 f: 10,
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/05.generics/03.utility_types/01.partial_utility_type/
Dpartial_inherit3.sts34 let f: Partial<B> = { }
35 assert( !f.k )
36 assert( f.i == 0 )
37 assert( f.j == undefined )
39 f = { k: false }
40 assert( !f.k )
41 assert( f.i == 0 )
42 assert( f.j == undefined )
43 f.i = 2;
44 f.j = "new str"
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/09.classes/03.class_members/
Dmember_declared_in_body.params.yaml16 - { decl: "f: int = 2;", call: "", check: "assert y.f == 2;" }
17 …- { decl: "f: int = 3; set F(f: int): void { this.f = f; }; get F(): int { return this.f; }", call…
18 - { decl: "f: int; constructor() { this.f = 1; }; ", call: "", check: "y.f == 1;" }
19 …- { decl: "f: int = 0; constructor() { this.f += 1; }; constructor(f: int) { this.f += f; }", call…
20 - { decl: "static f: int = 5; ", call: "", check: "C.f == 5;" }
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/17.experimental_features/06.statements/02.multiple_catch_clauses_in_try_statements/
Dcatch2.sts34 class F extends Exception {
54 throw new F("1", e);
55 } catch (f: F) {
57 throw new Ex("2", f);
60 throw new F("3", e);
61 } catch (f: F) {
63 throw new Ex("4", f);
66 throw new F("5", e);
67 } catch (f: F) {
69 throw new Ex("6", f);
[all …]
/arkcompiler/ets_runtime/test/
Druntest.py45 parser.add_argument('-f', '--frontend', metavar='opt',
62 help=f'aot compile with pgo, default threshold is {DEFAULT_PGO_THRESHOLD}')
64 help=f'pgo hotness threshold, default is {DEFAULT_PGO_THRESHOLD}')
68 help=f'specify seconds of test timeout, default is {DEFAULT_TIMEOUT}')
89 return (1, '', f'exec command timeout {timeout}s')
100 with open(f'{hap_dir}/module.json') as f:
101 data = json.load(f)
108 with open(f'{hap_dir}/module.json') as f:
109 data = json.load(f)
122 print(f'pls place this script at: {self.place_dir}')
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/17.experimental_features/09.final_classes_and_methods/01.final_classes/
Dfc.params.yaml22 final class F extends A implements I {}
24 let f: F = new F()
25 assert f instanceof F && f instanceof A && f instanceof I && f.fld == ''
26 f = { fld: 'ABC' }
27 assert f.fld == 'ABC'
33 final final class F extends A {} // CTE
41 final abstract class F extends A {} // CTE
50 class F extends B {} // CTE
58 abstract class F extends A {} // CTE
66 final class F extends A {} // CTE
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/04.names_declarations_and_scopes/08.function_declarations/
Dfunction_decl_neg.params.yaml17 - { decl: 'function f(): {}', call: 'f();' }
20 - { decl: 'let f = function (): void {}', call: 'f();' }
28 - { decl: 'function f: void {}', call: 'f();' }
29 - { decl: 'function f(: void {}', call: 'f();' }
30 - { decl: 'function f): void {}', call: 'f();' }
33 - { decl: 'function f() void {}', call: 'f();' }
36 - { decl: 'function f(): void', call: 'f();' }
37 - { decl: 'function f(): void {', call: 'f();' }
38 - { decl: 'function f(): void }', call: 'f();' }
50 let f: BarType[] = foo();
[all …]
/arkcompiler/runtime_core/libabckit/tests/mock/tests/
Dcpp_mock_dyn_isa_1.cpp32 abckit::File f(DEFAULT_PATH); in TEST_F() local
34 abckit::mock::helpers::GetMockGraph(f).DynIsa().CreateSupercallspread( in TEST_F()
35 … abckit::mock::helpers::GetMockInstruction(f), abckit::mock::helpers::GetMockInstruction(f)); in TEST_F()
48 abckit::File f(DEFAULT_PATH); in TEST_F() local
50 …abckit::mock::helpers::GetMockGraph(f).DynIsa().CreateApply(abckit::mock::helpers::GetMockInstruct… in TEST_F()
51 … abckit::mock::helpers::GetMockInstruction(f), in TEST_F()
52 … abckit::mock::helpers::GetMockInstruction(f)); in TEST_F()
65 abckit::File f(DEFAULT_PATH); in TEST_F() local
67 …abckit::mock::helpers::GetMockGraph(f).DynIsa().CreateCallthis0(abckit::mock::helpers::GetMockInst… in TEST_F()
68 … abckit::mock::helpers::GetMockInstruction(f)); in TEST_F()
[all …]
Dcpp_mock_dyn_isa_0.cpp32 abckit::File f(DEFAULT_PATH); in TEST_F() local
34 abckit::mock::helpers::GetMockGraph(f).DynIsa().CreateLoadString(DEFAULT_CONST_CHAR); in TEST_F()
48 abckit::File f(DEFAULT_PATH); in TEST_F() local
50 …abckit::mock::helpers::GetMockGraph(f).DynIsa().CreateSub2(abckit::mock::helpers::GetMockInstructi… in TEST_F()
51 … abckit::mock::helpers::GetMockInstruction(f)); in TEST_F()
64 abckit::File f(DEFAULT_PATH); in TEST_F() local
66 …abckit::mock::helpers::GetMockGraph(f).DynIsa().GetModule(abckit::mock::helpers::GetMockInstructio… in TEST_F()
79 abckit::File f(DEFAULT_PATH); in TEST_F() local
81 …abckit::mock::helpers::GetMockGraph(f).DynIsa().SetModule(abckit::mock::helpers::GetMockInstructio… in TEST_F()
82 … abckit::mock::helpers::GetMockCoreModule(f)); in TEST_F()
[all …]
Dcpp_mock_bb.cpp32 abckit::File f(DEFAULT_PATH); in TEST_F() local
34 abckit::mock::helpers::GetMockBasicBlock(f).VisitSuccBlocks( in TEST_F()
47 abckit::File f(DEFAULT_PATH); in TEST_F() local
49 abckit::mock::helpers::GetMockBasicBlock(f).VisitPredBlocks( in TEST_F()
62 abckit::File f(DEFAULT_PATH); in TEST_F() local
64 abckit::mock::helpers::GetMockBasicBlock(f).GetSuccCount(); in TEST_F()
76 abckit::File f(DEFAULT_PATH); in TEST_F() local
78 abckit::mock::helpers::GetMockBasicBlock(f).GetSuccByIdx(DEFAULT_U32); in TEST_F()
90 abckit::File f(DEFAULT_PATH); in TEST_F() local
92 abckit::mock::helpers::GetMockBasicBlock(f).GetSuccs(); in TEST_F()
[all …]
Dcpp_api_file.cpp32 abckit::File f(DEFAULT_PATH); in TEST_F() local
34 f.CreateValueU1(DEFAULT_BOOL); in TEST_F()
47 abckit::File f(DEFAULT_PATH); in TEST_F() local
49 f.CreateValueDouble(DEFAULT_DOUBLE); in TEST_F()
62 abckit::File f(DEFAULT_PATH); in TEST_F() local
64 f.CreateLiteralBool(DEFAULT_BOOL); in TEST_F()
77 abckit::File f(DEFAULT_PATH); in TEST_F() local
79 f.CreateLiteralU8(DEFAULT_U8); in TEST_F()
92 abckit::File f(DEFAULT_PATH); in TEST_F() local
94 f.CreateLiteralU16(DEFAULT_U16); in TEST_F()
[all …]
Dcpp_mock_instruction.cpp31 abckit::File f(DEFAULT_PATH); in TEST_F() local
33 abckit::mock::helpers::GetMockInstruction(f).GetImmediateSize(DEFAULT_SIZE_T); in TEST_F()
45 abckit::File f(DEFAULT_PATH); in TEST_F() local
47 …abckit::mock::helpers::GetMockInstruction(f).InsertAfter(abckit::mock::helpers::GetMockInstruction… in TEST_F()
59 abckit::File f(DEFAULT_PATH); in TEST_F() local
61 …abckit::mock::helpers::GetMockInstruction(f).InsertBefore(abckit::mock::helpers::GetMockInstructio… in TEST_F()
73 abckit::File f(DEFAULT_PATH); in TEST_F() local
75 abckit::mock::helpers::GetMockInstruction(f).Remove(); in TEST_F()
87 abckit::File f(DEFAULT_PATH); in TEST_F() local
89 abckit::mock::helpers::GetMockInstruction(f).GetConstantValueI64(); in TEST_F()
[all …]
/arkcompiler/ets_frontend/arkguard/test/grammar/in_operator/
DprivateNameInInExpressionTransform.ts16 class F { class
17 #f = 1;
22 #f in a; // expect F's 'f' WeakMap
23 #fun in a; // expect F's 'instances' WeakSet
24 #staticF in a; // expect F's constructor
25 #staticMethod in a; // expect F's constructor
32 a == #f in a || a; // Good precedence: (a == (#f in a)) || a
34 #f in a && #f in a; // Good precedence: (#f in a) && (#f in a)
39 #f = 1;
41 #f in a; // expect Bar's 'f' WeakMap
DprivateNameInInExpression.ts16 class F { class
17 #f = 1;
23 const a = #f in v;
25 const b = #f in v.p1.p2;
27 const c = #f in (v as {});
29 const d = #f in (v as F);
31 const e = #f in (v as never);
33 for (let f in #f in v as any) { /**/ } // unlikely but valid
36 const a = v && /*0*/#f/*1*/
42 class FooSub extends F { subTypeOfFoo = true }
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/04.casting_contexts_and_conversions/01.numeric_casting_conversions/
Dnum_cc.params.yaml237 - { sval: '-65537.0', dval: '-65537.0f' }
238 - { sval: '-65536.0', dval: '-65536.0f' }
239 - { sval: '-65535.0', dval: '-65535.0f' }
240 - { sval: '-32769.0', dval: '-32769.0f' }
241 - { sval: '-32768.0', dval: '-32768.0f' }
242 - { sval: '-32767.0', dval: '-32767.0f' }
243 - { sval: '-129.0', dval: '-129.0f' }
244 - { sval: '-128.0', dval: '-128.0f' }
245 - { sval: '-127.0', dval: '-127.0f' }
246 - { sval: '-3.1415926', dval: '-3.1415925f' }
[all …]
/arkcompiler/runtime_core/verifier/tests/
Dverify_sys_hap_abc.py50 print(f"Error extracting {zip_path}: {e}")
63 memory_usage = f"{line.split(':')[1].strip()} KB"
66 user_time_ms = f"{user_time_seconds * 1000:.2f} ms"
69 …file_size_str = f"{file_size / 1024:.2f} KB" if file_size < 1024**2 else f"{file_size / 1024**2:.2
91 print(f"Verifying file: {abc_path}")
115 print(f"Extracting {zip_path} to {extract_folder}")
124 print(f"Verifying file: {modules_abc_path}")
145 with os.fdopen(os.open(report_file, flags, mode), 'w') as f:
146 f.truncate()
147 f.write("<html><head><title>Verification Report</title>")
[all …]
/arkcompiler/ets_frontend/ets2panda/linter/test/main/
Dfunctions.sts89 function f(a: string): number {
93 foo(f(null));
97 f(null);
101 f(null);
102 }, null, f(null));
106 f(null);
107 }, null, f(null));
108 }, null, foo(f(null)));
116 f(null)
118 f(null)
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/17.experimental_features/05.callable_types/02.callable_types_with_instantiate_method/
Dct_inst.params.yaml26 static instantiate(f: () => C) { return 'abc' }
38 static instantiate(f: () => C) { C.inst = f() }
49 static instantiate(f: () => C): void { C.inst = f() }
60 static instantiate(f: () => C, p: string): string {
61 return f().meth(p)
72 static instantiate(f: () => C): C {
74 C.instance = f()
86 static instantiate(f: () => C): C {
88 C.instance = f()
94 let f: ()=>C = (): C => new C()
[all …]
Dct_inst1.params.yaml18 static instantiate(f: ()=>C): C {
19 return f()
29 static instantiate(f: ()=>C, p: int[]): C {
30 return f()
41 static instantiate(f: ()=>C): C {
42 return f()
53 static instantiate(f: ()=>C, p: ()=>C): C {
54 return f()
68 static instantiate(f: ()=>C): C {
69 return f()
[all …]
Dct_inst_access.params.yaml19 public static instantiate(f: ()=>C, p: number): C { return C('' + p) }
20 private static instantiate(f: ()=>C, p: string): C {
21 let x = f()
33 private static instantiate(f: ()=>C, p: string): C {
34 let x = f()
49 public static instantiate(f: ()=>C, p: number): C { return C('' + p) }
50 protected static instantiate(f: ()=>C, p: string): C {
51 let x = f()
63 protected static instantiate(f: ()=>C, p: string): C {
64 let x = f()
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/04.casting_contexts_and_conversions/04.casting_conversions_from_union/
Dimpl.params.yaml63 - from_type: B|F|C
67 class F implements J {}
71 let f = new F()
75 - { type: J, v: 'f' }
78 - { type: I, v: 'f' }
81 - from_type: A|B|F
87 class F implements J {}
93 - from_type: A|B|F
99 class F implements J {}
131 - { type: Integral, v: '42f' }
[all …]
/arkcompiler/ets_runtime/test/aottest/pgo_fast_call_bridge/
Dpgo_fast_call_bridge.ts16 function f(prn, a1, a2, a3, a4, a5, a6, a7, a8) { function
23 let isAot = ArkTools.isAOTCompiled(f);
28 f(prn, 1); // NaN
29 f(prn, 1, 2); // 3
30 f(prn, 1, 2, 3); // 3
31 f(prn, 1, 2, 3, 4); // 3
32 f(prn, 1, 2, 3, 4, 5); // 3
33 f(prn, 1, 2, 3, 4, 5, 6); // 3
34 f(prn, 1, 2, 3, 4, 5, 6, 7); // 3
35 f(prn, 1, 2, 3, 4, 5, 6, 7, 8); // 3
[all …]

12345678910>>...91