Home
last modified time | relevance | path

Searched full:sum (Results 1 – 25 of 552) sorted by relevance

12345678910>>...23

/arkcompiler/ets_runtime/test/aottest/forloop/
Dforloop.ts28 let sum = 0;
30 sum++;
32 return sum;
36 let sum = 0;
38 if (sum >= 5) {
39 sum++;
41 sum--;
45 return sum;
49 let sum = 0;
51 if (sum >= 5) {
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_sdk/arkts/@arkts/math/Decimal/
DsumTests.ets21 const suite = new arktest.ArkTestsuite("Decimal sum API tests");
22 suite.addTest("Decimal sum with default config that the sum is 0", testSumExpectedZero);
23 suite.addTest("Decimal sum with default config that the sum is 10", testSumExpectedTen);
24 suite.addTest("Decimal sum with default config that the sum is 600", testSumExpectedSixHundred);
25 suite.addTest("Decimal sum with default config that the sum is NaN", testSumExpectedNaN);
26 …suite.addTest("Decimal sum with default config that the sum is Infinity", testSumExpectedInfinity);
27 …suite.addTest("Decimal sum with default config that the sum is -Infinity", testSumExpectedNegative…
33 arktest.assertEQ(Decimal.sum('0').valueOf(), expected.valueOf());
34 arktest.assertEQ(Decimal.sum('0', new Decimal(0)).valueOf(), expected.valueOf());
39 arktest.assertEQ(Decimal.sum('10').valueOf(), expected.valueOf());
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ani/tests/object_ops/
Dobject_call_method_by_name_long_test.cpp51 ani_long sum {}; in TEST_F() local
52 … ASSERT_EQ(env_->Object_CallMethodByName_Long_A(object, "longMethod", "JJ:J", &sum, args), ANI_OK); in TEST_F()
53 ASSERT_EQ(sum, VAL1 + VAL2); in TEST_F()
64 ani_long sum {}; in TEST_F() local
65 …ASSERT_EQ(env_->Object_CallMethodByName_Long_A(object, "longMethod", nullptr, &sum, args), ANI_OK); in TEST_F()
66 ASSERT_EQ(sum, VAL1 + VAL2); in TEST_F()
77 ani_long sum {}; in TEST_F() local
78 …ASSERT_EQ(env_->Object_CallMethodByName_Long_A(object, "xxxxxxxxxx", "JJ:J", &sum, args), ANI_NOT_… in TEST_F()
79 …ASSERT_EQ(env_->Object_CallMethodByName_Long_A(object, "longMethod", "JJ:I", &sum, args), ANI_NOT_… in TEST_F()
87 ani_long sum {}; in TEST_F() local
[all …]
Dobject_call_method_by_name_double_test.cpp50 ani_double sum = 0.0; in TEST_F() local
52 …ASSERT_EQ(env_->Object_CallMethodByName_Double_A(object, "doubleMethod", "DD:D", &sum, args), ANI_… in TEST_F()
53 ASSERT_EQ(sum, VAL1 + VAL2); in TEST_F()
64 ani_double sum = 0.0; in TEST_F() local
66 …ASSERT_EQ(env_->Object_CallMethodByName_Double_A(object, "doubleMethod", nullptr, &sum, args), ANI… in TEST_F()
67 ASSERT_EQ(sum, VAL1 + VAL2); in TEST_F()
78 ani_double sum = 0.0; in TEST_F() local
79 …ASSERT_EQ(env_->Object_CallMethodByName_Double_A(object, "xxxxxxx", "DD:D", &sum, args), ANI_NOT_F… in TEST_F()
80 …ASSERT_EQ(env_->Object_CallMethodByName_Double_A(object, "doubleMethod", "DD:I", &sum, args), ANI_… in TEST_F()
88 ani_double sum = 0.0; in TEST_F() local
[all …]
Dobject_call_method_by_name_float_test.cpp50 ani_float sum = 0.0F; in TEST_F() local
51 …ASSERT_EQ(env_->Object_CallMethodByName_Float_A(object, "floatMethod", "FF:F", &sum, args), ANI_OK… in TEST_F()
52 ASSERT_EQ(sum, VAL1 + VAL2); in TEST_F()
63 ani_float sum = 0.0F; in TEST_F() local
64 …ASSERT_EQ(env_->Object_CallMethodByName_Float_A(object, "floatMethod", nullptr, &sum, args), ANI_O… in TEST_F()
65 ASSERT_EQ(sum, VAL1 + VAL2); in TEST_F()
76 ani_float sum = 0.0F; in TEST_F() local
77 …ASSERT_EQ(env_->Object_CallMethodByName_Float_A(object, "xxxxxxxxx", "FF:F", &sum, args), ANI_NOT_… in TEST_F()
78 …ASSERT_EQ(env_->Object_CallMethodByName_Float_A(object, "floatMethod", "FF:I", &sum, args), ANI_NO… in TEST_F()
86 ani_float sum = 0.0F; in TEST_F() local
[all …]
Dobject_call_method_by_name_short_test.cpp139 ani_short sum {}; in TEST_F() local
140 …ASSERT_EQ(env_->Object_CallMethodByName_Short(obj, "shortMethod", "SS:S", &sum, VAL1, VAL2), ANI_O… in TEST_F()
141 ASSERT_EQ(sum, VAL0); in TEST_F()
146 … ASSERT_EQ(env_->Object_CallMethodByName_Short_A(obj, "shortMethod", "SS:S", &sum, args), ANI_OK); in TEST_F()
147 ASSERT_EQ(sum, VAL0); in TEST_F()
162 ani_short sum {}; in TEST_F() local
163 ASSERT_EQ(env_->Object_CallMethodByName_Short(obj, "shortMethod", "S:S", &sum, VAL1), ANI_OK); in TEST_F()
164 ASSERT_EQ(sum, VAL0); in TEST_F()
168 ASSERT_EQ(env_->Object_CallMethodByName_Short_A(obj, "shortMethod", "S:S", &sum, args), ANI_OK); in TEST_F()
169 ASSERT_EQ(sum, VAL0); in TEST_F()
[all …]
Dobject_call_method_by_name_int_test.cpp136 ani_int sum = 0; in TEST_F() local
137 … ASSERT_EQ(env_->Object_CallMethodByName_Int(obj, "intMethod", "II:I", &sum, VAL1, VAL2), ANI_OK); in TEST_F()
138 ASSERT_EQ(sum, arg); in TEST_F()
143 ASSERT_EQ(env_->Object_CallMethodByName_Int_A(obj, "intMethod", "II:I", &sum, args), ANI_OK); in TEST_F()
144 ASSERT_EQ(sum, arg); in TEST_F()
160 ani_int sum = 0; in TEST_F() local
162 ASSERT_EQ(env_->Object_CallMethodByName_Int(obj, "intMethod", "I:I", &sum, value), ANI_OK); in TEST_F()
163 ASSERT_EQ(sum, arg); in TEST_F()
167 ASSERT_EQ(env_->Object_CallMethodByName_Int_A(obj, "intMethod", "I:I", &sum, args), ANI_OK); in TEST_F()
168 ASSERT_EQ(sum, arg); in TEST_F()
[all …]
Dobject_call_method_by_name_char_test.cpp137 ani_char sum = VAL; in TEST_F() local
138 …ASSERT_EQ(env_->Object_CallMethodByName_Char(obj, "charMethod", "CC:C", &sum, VAL2, VAL1), ANI_OK); in TEST_F()
139 ASSERT_EQ(sum, VAL1); in TEST_F()
144 ASSERT_EQ(env_->Object_CallMethodByName_Char_A(obj, "charMethod", "CC:C", &sum, args), ANI_OK); in TEST_F()
145 ASSERT_EQ(sum, VAL1); in TEST_F()
160 ani_char sum = VAL; in TEST_F() local
162 ASSERT_EQ(env_->Object_CallMethodByName_Char(obj, "charMethod", "C:C", &sum, value1), ANI_OK); in TEST_F()
163 ASSERT_EQ(sum, VAL3); in TEST_F()
168 ASSERT_EQ(env_->Object_CallMethodByName_Char_A(obj, "charMethod", "C:C", &sum, args), ANI_OK); in TEST_F()
169 ASSERT_EQ(sum, value2); in TEST_F()
[all …]
Dobject_call_method_by_name_byte_test.cpp137 ani_byte sum {}; in TEST_F() local
138 …ASSERT_EQ(env_->Object_CallMethodByName_Byte(obj, "byteMethod", "BB:B", &sum, VAL1, VAL2), ANI_OK); in TEST_F()
139 ASSERT_EQ(sum, arg); in TEST_F()
144 ASSERT_EQ(env_->Object_CallMethodByName_Byte_A(obj, "byteMethod", "BB:B", &sum, args), ANI_OK); in TEST_F()
145 ASSERT_EQ(sum, arg); in TEST_F()
161 ani_byte sum {}; in TEST_F() local
163 ASSERT_EQ(env_->Object_CallMethodByName_Byte(obj, "byteMethod", "B:B", &sum, value), ANI_OK); in TEST_F()
164 ASSERT_EQ(sum, arg); in TEST_F()
168 ASSERT_EQ(env_->Object_CallMethodByName_Byte_A(obj, "byteMethod", "B:B", &sum, args), ANI_OK); in TEST_F()
169 ASSERT_EQ(sum, arg); in TEST_F()
[all …]
/arkcompiler/ets_runtime/test/aottest/global_value_numbering_ts/
Dglobal_value_numbering_ts.ts29 let sum = 0;
32 sum += k;
36 sum += k;
38 return sum;
43 let sum = 0;
46 sum += k;
50 sum += k;
52 return sum;
57 let sum = 0;
60 sum += k;
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/interop_js/tests/function/ets_to_ts/
Dets_functions.ets36 let sum: number = 0;
38 sum += items[i];
40 return sum;
43 class Sum implements Function {
45 let sum: number = 0;
47 sum += (items[i] as number);
49 return sum;
52 return 'Sum';
56 let sum: Sum = new Sum();
59 let sum: number = 0;
[all …]
/arkcompiler/ets_runtime/test/moduletest/icnotfoundtest/
Dicnotfoundtest.js26 let sum = 0;
29 sum += obj.x;
39 print("Test1 ans:", sum);
49 let sum = 0;
52 sum += obj.x;
65 print("Test2 ans:", sum);
75 let sum = 0;
78 sum += obj.x;
94 print("Test3 ans:", sum);
105 let sum = 0;
[all …]
/arkcompiler/ets_runtime/test/aottest/icnotfound/
Dicnotfound.js26 let sum = 0;
29 sum += obj.x;
39 print("Test1 ans:", sum);
49 let sum = 0;
52 sum += obj.x;
65 print("Test2 ans:", sum);
75 let sum = 0;
78 sum += obj.x;
94 print("Test3 ans:", sum);
105 let sum = 0;
[all …]
/arkcompiler/runtime_core/tests/cts-assembly/
Darrays-06.pa37 # int sum = 0;
39 # return sum;
43 # sum += arr[i];
45 # return sum + foo4(n - 1);
49 # int sum = 0;
53 # sum += arr[i];
56 # sum += foo4(n);
57 # return sum;
61 # int sum = 0;
65 # sum += arr[i];
[all …]
/arkcompiler/runtime_core/static_core/tests/cts-assembly/
Darrays-06.pa37 # int sum = 0;
39 # return sum;
43 # sum += arr[i];
45 # return sum + foo4(n - 1);
49 # int sum = 0;
53 # sum += arr[i];
56 # sum += foo4(n);
57 # return sum;
61 # int sum = 0;
65 # sum += arr[i];
[all …]
/arkcompiler/ets_frontend/ets2panda/test/runtime/ets/
DForOfBoxing.ets17 let sum = 0;
23 sum += b;
25 sum += 0;
29 assertEQ(sum, 6)
61 let sum = 0;
66 sum += b4;
70 assertEQ(sum, 1887)
74 let sum = 0;
78 sum += b5;
81 assertEQ(sum, 33)
[all …]
Dconversion-binary.ets21 let sum: long = 0;
22 sum += x;
23 return sum;
27 let sum: long = 0;
28 sum = x;
29 return sum;
DfuncRefWithRestArguments.ets17 let sum: int = 0
19 sum += n as Int
21 return sum
28 let sum: int = 0
30 sum += v as Int
32 return sum
/arkcompiler/runtime_core/static_core/plugins/ets/tests/checked/
Dchecks_elimination_actual_length.ets104 let sum : int = 0
107 sum += this.$_get_unsafe(i)
109 return sum
113 let sum : int = 0
116 sum += this.$_get_unsafe(i)
118 return sum
122 let sum : int = 0
125 sum += this.$_get_unsafe(i)
127 return sum
131 let sum : int = 0
[all …]
/arkcompiler/ets_runtime/test/aottest/proxy/
Dproxy.ts19 function sum(a:number, b:number):number {
25 print(`Calculate sum: ${argumentsList}`);
26 // expected output: "Calculate sum: 1,2"
31 print(sum(1, 2));
33 const proxy0 = new Proxy(sum, handler);
38 const proxy1 = new Proxy(sum, handler);
42 const proxy2 = new Proxy(sum, {});
46 const proxy3 = new Proxy(sum, {});
50 const proxy4 = new Proxy(sum.bind({}, 3), {});
58 ArkTools.removeAOTFlag(sum);
[all …]
/arkcompiler/ets_runtime/test/jittest/icnotfound/
Dicnotfound.js26 let sum = 0;
29 sum += obj.x;
39 print("Test1 ans:", sum);
49 let sum = 0;
52 sum += obj.x;
65 print("Test2 ans:", sum);
75 let sum = 0;
78 sum += obj.x;
94 print("Test3 ans:", sum);
105 let sum = 0;
[all …]
/arkcompiler/runtime_core/static_core/tests/checked/
Dmove_nullcheck_out_of_loop.pa21 # if (sum(a) != 15) {
27 # int sum(A a) {
28 # int sum = 0;
31 # sum += arr[i];
33 # return sum;
37 #! RUN options: "--compiler-hotness-threshold=0 --no-async-jit=true --compiler-regex=.*sum
38 #! METHOD "sum"
51 #! RUN_PAOC options: "--compiler-regex=.*sum.*"
52 #! METHOD "sum"
66 #! RUN_LLVM options: "--compiler-regex=.*sum.*"
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ani/tests/function_ops/
Dfunction_call_void_test.cpp37 ASSERT_EQ(env_->Namespace_FindFunction(ns, "sum", "II:V", &fn1), ANI_OK); in GetMethod()
57 ani_int sum = 0; in TEST_F() local
59 ASSERT_EQ(env_->c_api->Function_Call_Int(env_, fn2, &sum, nullptr), ANI_OK); in TEST_F()
60 ASSERT_EQ(sum, INT_VAL1 + INT_VAL2); in TEST_F()
70 ani_int sum = 0; in TEST_F() local
72 ASSERT_EQ(env_->c_api->Function_Call_Int(env_, fn2, &sum, nullptr), ANI_OK); in TEST_F()
73 ASSERT_EQ(sum, INT_VAL1 + INT_VAL2); in TEST_F()
87 ani_int sum = 0; in TEST_F() local
89 ASSERT_EQ(env_->c_api->Function_Call_Int(env_, fn2, &sum, nullptr), ANI_OK); in TEST_F()
90 ASSERT_EQ(sum, args[0U].i + args[1U].i); in TEST_F()
[all …]
/arkcompiler/ets_frontend/ets2panda/test/ast/parser/ets/
Drest_parameter_08.ets16 function sum(a: int, ...numbers: [number, number, number]): number {
20 /* @@ label1 */sum()
21 /* @@ label2 */sum(11)
22 /* @@ label3 */sum(11,12,13)
23 /* @@ label4 */sum(11,12,13,15,16)
29 /* @@@ label2 Error TypeError: No matching call signature for sum(int) */
31 /* @@@ label3 Error TypeError: No matching call signature for sum(int, int, int) */
33 /* @@@ label4 Error TypeError: No matching call signature for sum(int, int, int, int, int) */
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ani/tests/class_ops/
Dclass_call_static_method_by_name_int_test.cpp65 ani_int sum = 0; in TEST_F() local
66 …ASSERT_EQ(env_->c_api->Class_CallStaticMethodByName_Int(env_, cls, "sum", nullptr, &sum, VAL3, VAL… in TEST_F()
67 ASSERT_EQ(sum, VAL3 + VAL4); in TEST_F()
75 ani_int sum = 0; in TEST_F() local
76 … ASSERT_EQ(env_->Class_CallStaticMethodByName_Int(cls, "sum", nullptr, &sum, VAL3, VAL4), ANI_OK); in TEST_F()
77 ASSERT_EQ(sum, VAL3 + VAL4); in TEST_F()
89 ani_int sum = 0; in TEST_F() local
90 ASSERT_EQ(env_->Class_CallStaticMethodByName_Int_A(cls, "sum", nullptr, &sum, args), ANI_OK); in TEST_F()
91 ASSERT_EQ(sum, VAL3 + VAL4); in TEST_F()
96 ani_int sum = 0; in TEST_F() local
[all …]

12345678910>>...23