| /arkcompiler/runtime_core/static_core/plugins/ets/tests/stdlib-templates/std/core/ |
| D | list.std_core_value.yaml | 64 …init_values: {"Char.valueOf(0 as char)", "Char.valueOf(1 as char)", "Char.valueOf(Char.MIN_VALUE a… 70 init_values: {"Boolean.valueOf(false)", "Boolean.valueOf(true)"}, 76 …ues: {"Byte.valueOf(0 as byte)", "Byte.valueOf(1 as byte)", "Byte.valueOf(-1 as byte)", "Byte.valu… 82 …"Short.valueOf(0 as short)", "Short.valueOf(1 as short)", "Short.valueOf(-1 as short)", "Short.val… 88 …t_values: {"Int.valueOf(0 as int)", "Int.valueOf(1 as int)", "Int.valueOf(-1 as int)", "Int.valueO… 94 …ues: {"Long.valueOf(0 as long)", "Long.valueOf(1 as long)", "Long.valueOf(-1 as long)", "Long.valu… 100 …oat.valueOf(0.0 as float)", "Float.valueOf(1.0 as float)", "Float.valueOf(-1.0 as float)", "Float.… 106 …valueOf(0.0 as double)", "Double.valueOf(1.0 as double)", "Double.valueOf(-1.0 as double)", "Doubl… 166 …lues: {"[Char.valueOf(0 as char)]", "[Char.valueOf(0 as char), Char.valueOf(1 as char), Char.value… 172 init_values: {"[Boolean.valueOf(false)]", "[Boolean.valueOf(false), Boolean.valueOf(true)]"}, [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/11.enumerations/01.enumeration_integer_values/ |
| D | enum_int.params.yaml | 19 assert Enum.first.valueOf() == 0 20 assert Enum.second.valueOf() == 1 21 assert Enum.third.valueOf() == 2 26 assert Enum.first.valueOf() == 0 27 assert Enum.second.valueOf() == -2147483648 28 assert Enum.third.valueOf() == -2147483647 33 assert Enum.first.valueOf() == 2147483645 34 assert Enum.second.valueOf() == 2147483646 35 assert Enum.third.valueOf() == 2147483647 // Int.MAX_VALUE 42 assert Enum.first.valueOf() == a [all …]
|
| D | enum_int_n.params.yaml | 22 assert Enum.first.valueOf() == a 23 assert Enum.second.valueOf() == b 24 assert Enum.third.valueOf() == c 29 assert Enum.first.valueOf() == 1.0 34 assert Enum.first.valueOf() == 100 43 enum Enum2 { first = Enum1.first.valueOf(), second } // not a constant expression 45 assert Enum2.first.valueOf() == 42 46 assert Enum2.second.valueOf() == 43
|
| /arkcompiler/ets_frontend/ets2panda/test/runtime/ets/ |
| D | local-class-capture-boxing.sts | 25 return Int.valueOf(this.v).toString(); 126 assert(l_Number == Number.valueOf(11)); 127 assert(l_Byte == Byte.valueOf(12 as byte)); 128 assert(l_Short == Short.valueOf(13 as short)); 129 assert(l_Int == Int.valueOf(14 as int)); 130 assert(l_Long == Long.valueOf(15 as long)); 131 assert(l_Float == Float.valueOf(16 as float)); 132 assert(l_Double == Double.valueOf(17 as double)); 133 assert(l_Boolean == Boolean.valueOf(false)); 134 assert(l_Char == Char.valueOf(c'X')); [all …]
|
| D | Enum4.sts | 31 let x: int = Color.Red.valueOf(); 48 assert(red2.valueOf() == 0) 51 …//cons.print("\nDefault ordinal = " + red2 as int + ", value = " + red2.valueOf() + ", name: '" + … 60 …lor.Red: '" + Color.Red.getName() + "', = Red: '" + red1.getName() + "', ValueOf(Red): '" + red2.g… 61 …"GetValue: Color.Red = " + Color.Red.valueOf() + ", = Red = " + red1.valueOf() + ", ValueOf(Red) =… 62 …int): Color.Red = " + Color.Red as int + ", = Red = " + red1 as int + ", ValueOf(Red) = " + red2 a… 63 …Red = '" + Color.Red.toString() + "', = Red = '" + red1.toString() + "', ValueOf(Red) = '" + red2.… 66 assert(red1.valueOf() == 2) 71 assert(red2.valueOf() == 2) 82 assert(blue.valueOf() == 3)
|
| D | enums_01.sts | 28 assert(E1.e1_item1.valueOf() == 0); 30 assert(E1.e1_item2.valueOf() == 7); 32 assert(E1.e1_item3.valueOf() == 8); 38 assert(test1.valueOf() == 0); 40 assert(test2.valueOf() == 7); 42 assert(test3.valueOf() == 8);
|
| D | Enum5.sts | 31 let x = Color.Red.valueOf(); 38 assert blue.valueOf() == blue.toString() 49 assert(red2.valueOf() == "red") 52 …//cons.print("\nDefault ordinal = " + red2 as int + ", value = " + red2.valueOf() + ", name: '" + … 61 …lor.Red: '" + Color.Red.getName() + "', = Red: '" + red1.getName() + "', ValueOf(Red): '" + red2.g… 62 …GetValue: Color.Red = " + Color.Red.valueOf() + ", = Red = " + red1.valueOf() + ", getValueOf(Red)… 67 assert(red1.valueOf() == "blue") 72 assert(red2.valueOf() == "blue") 83 assert(blue.valueOf() == "green")
|
| D | local-class-capture-not-boxing.sts | 25 return Int.valueOf(this.v).toString(); 121 assert(l_Number == Number.valueOf(11)); 122 assert(l_Byte == Byte.valueOf(12 as byte)); 123 assert(l_Short == Short.valueOf(13 as short)); 124 assert(l_Int == Int.valueOf(14 as int)); 125 assert(l_Long == Long.valueOf(15 as long)); 126 assert(l_Float == Float.valueOf(16 as float)); 127 assert(l_Double == Double.valueOf(17 as double)); 128 assert(l_Boolean == Boolean.valueOf(false)); 129 assert(l_Char == Char.valueOf(c'X'));
|
| D | Enum2.sts | 28 public static valueOf(name: String): Color { 37 public static valueOf(ordinal: int): Color { 54 assert ColorEnumDelegate.valueOf(2) == Color.Blue; 55 assert ColorEnumDelegate.valueOf(ColorEnumDelegate.ordinal(Color.Red)) == red; 57 assert ColorEnumDelegate.valueOf("Green") == Color.Green; 58 assert ColorEnumDelegate.valueOf(ColorEnumDelegate.toString(Color.Blue)) == Color.Blue;
|
| D | const_enum.sts | 21 assert(c1.valueOf() == -1); 25 assert(c2.valueOf() == 0); 29 assert(c3.valueOf() == 1);
|
| D | local-enum-int-min.sts | 19 assert Enum.first.valueOf() == -2147483648 20 assert Enum.second.valueOf() == -2147483647
|
| D | enum-int-min.sts | 19 assert Enum.first.valueOf() == -2147483648 20 assert Enum.second.valueOf() == -2147483647
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_func_tests/escompat/ |
| D | ReadonlyArrayTest.sts | 83 return arr[index] == elem && elem.valueOf() == 12 && index > 0; 87 return arr[index] == elem && elem.valueOf() < 0 && index > 0; 111 …: ReadonlyArray<Number>): boolean => { return obj[index] == elem && elem.valueOf() < 0 && index > … 126 … (index < 4) && (index < arr.length) ? Number.valueOf(arr[index] * arr[index]) : Number.valueOf(0); 137 const expected = i < 4 ? Number.valueOf(arr[i] * arr[i]) : Number.valueOf(0); 138 if (res[i].valueOf() != expected.valueOf()) { 158 return arr[index].valueOf() == v.valueOf() && v.valueOf() > -1000; 177 return Number.valueOf(-1); 195 if (res.valueOf() != 996) return RESULT_FAILURE; 196 if (res.valueOf() == -1) return RESULT_FAILURE; [all …]
|
| D | ArrayTest_disabled.sts | 57 // if (arr[0].valueOf() != first.valueOf()) { return fail; } 74 …: ReadonlyArray<Number>): boolean => { return obj[index] == elem && elem.valueOf() == 12 && index … 75 …: ReadonlyArray<Number>): boolean => { return obj[index] == elem && elem.valueOf() < 0 && index > … 92 …: ReadonlyArray<Number>): boolean => { return obj[index] == elem && elem.valueOf() == 12 && index … 93 …: ReadonlyArray<Number>): boolean => { return obj[index] == elem && elem.valueOf() < 0 && index > … 108 // return new Number(arr[index].valueOf() * arr[index].valueOf()); 126 // tmp = new Number(arr[i].valueOf() * arr[i].valueOf()); 130 // if (res[i].valueOf() != tmp.valueOf()) { 142 // return new Number(arr[index].valueOf() * arr[index].valueOf()); 160 // tmp = new Number(arr[i].valueOf() * arr[i].valueOf()); [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_func_tests/std/core/ |
| D | BooleanCtorTest.sts | 23 failure += ((new Boolean()).valueOf() == false) ? 0 : 1 24 failure += ((new Boolean(undefined)).valueOf() == false) ? 0 : 1 25 failure += ((new Boolean(false)).valueOf() == false) ? 0 : 1 26 failure += ((new Boolean(true)).valueOf() == true) ? 0 : 1
|
| /arkcompiler/ets_frontend/ets2panda/test/ast/parser/ets/ |
| D | enum13.sts | 19 let red: Color = Color.valueOf("Red"); 20 let redFail: Color = c.valueOf("Red"); 27 /* @@? 19:26 Error TypeError: No enum type method called 'valueOf' */ 29 /* @@? 20:24 Error TypeError: No matching call signature for valueOf("Red") */
|
| /arkcompiler/runtime_core/static_core/plugins/ets/stdlib/escompat/ |
| D | deepcopy.sts | 44 return Boolean.valueOf(src) as T 46 return Byte.valueOf(src) as T 48 return Char.valueOf(src) as T 50 return Short.valueOf(src) as T 52 return Int.valueOf(src) as T 54 return Long.valueOf(src) as T 56 return Float.valueOf(src) as T 58 return Double.valueOf(src) as T
|
| /arkcompiler/ets_runtime/ecmascript/builtins/ |
| D | builtins_bigint.h | 40 /* BigInt.valueOf ( ) */ \ 41 V("valueOf", ValueOf, 0, INVALID) 58 static JSTaggedValue ValueOf(EcmaRuntimeCallInfo *argv);
|
| /arkcompiler/ets_frontend/ets2panda/test/compiler/ets/import_tests/ |
| D | enum_import.sts | 19 console.log(Color.Blue.valueOf()); 20 console.log(Commands.Open.valueOf());
|
| /arkcompiler/ets_runtime/test/aottest/pgo_class_update/ |
| D | pgo_class_update.js | 18 this.valueOf = 1.0; 20 static valueOf() { } method in C3
|
| /arkcompiler/ets_runtime/test/aottest/vtable/not_inherit_info/not_meet_rule5/ |
| D | not_meet_rule5.ts | 99 valueOf:number; property in C6 101 this.valueOf = 6; 106 print(c6.valueOf);
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/17.experimental_features/14.enumeration_methods/ |
| D | enum_type_methods_getvalue_tostring_1.sts | 17 desc: c.toString() returns the same value as c.valueOf().toString(). 24 assert c.toString() == (c.valueOf() as Int).toString()
|
| D | enum_type_methods_getvalue_tostring.sts | 17 desc: c.toString() returns the same value as c.valueOf().toString(). 24 assert c.toString() == c.valueOf().toString()
|
| D | enum_type_methods_pipeline.sts | 19 …Method valueOf() returns an int or string value of an enumeration constant depending on the type o… 26 assert( Color.Red.valueOf() == 777 );
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_func_tests/std/time/ |
| D | DateConstructorTest.sts | 71 if(cd.valueOf() as long != longYears[i]) failures++; 89 … if(utc as long != (cd.valueOf() - cd.getTimezoneOffset() * msPerMinute) as long) failures++; 109 … if(utc as long != (cd.valueOf() - cd.getTimezoneOffset() * msPerMinute) as long) failures++; 130 … if(utc as long != (cd.valueOf() - cd.getTimezoneOffset() * msPerMinute) as long) failures++; 152 … if(utc as long != (cd.valueOf() - cd.getTimezoneOffset() * msPerMinute) as long) failures++; 175 … if(utc as long != (cd.valueOf() - cd.getTimezoneOffset() * msPerMinute) as long) failures++; 199 … if(utc as long != (cd.valueOf() - cd.getTimezoneOffset() * msPerMinute) as long) failures++; 217 if(Double.valueOf(id[i]).intValue() != cd.valueOf()) failures++; 236 … if(utc as long != (cd.valueOf() - cd.getTimezoneOffset() * msPerMinute) as long) failures++; 256 … if(utc as long != (cd.valueOf() - cd.getTimezoneOffset() * msPerMinute) as long) failures++; [all …]
|