Home
last modified time | relevance | path

Searched refs:ToCString (Results 1 – 25 of 50) sorted by relevance

12

/arkcompiler/ets_runtime/ecmascript/base/tests/
Derror_helper_test.cpp93 EXPECT_STREQ(errorStrAcc.ToCString().c_str(), "Error"); in HWTEST_F_L0()
94 EXPECT_STREQ(evalErrorStrAcc.ToCString().c_str(), "EvalError"); in HWTEST_F_L0()
95 EXPECT_STREQ(typeErrorStrAcc.ToCString().c_str(), "TypeError"); in HWTEST_F_L0()
96 EXPECT_STREQ(rangeErrorStrAcc.ToCString().c_str(), "RangeError"); in HWTEST_F_L0()
151 EXPECT_STREQ(uriErrorStrAcc.ToCString().c_str(), "URIError"); in HWTEST_F_L0()
152 EXPECT_STREQ(oomErrorStrAcc.ToCString().c_str(), "OutOfMemoryError"); in HWTEST_F_L0()
153 EXPECT_STREQ(syntaxErrorStrAcc.ToCString().c_str(), "SyntaxError"); in HWTEST_F_L0()
154 EXPECT_STREQ(referenceErrorStrAcc.ToCString().c_str(), "ReferenceError"); in HWTEST_F_L0()
155 EXPECT_STREQ(aggregateErrorStrAcc.ToCString().c_str(), "AggregateError"); in HWTEST_F_L0()
179 EXPECT_STREQ(EcmaStringAccessor(JSHandle<EcmaString>::Cast(errorMsgValue)).ToCString().c_str(), in HWTEST_F_L0()
[all …]
Djson_stringifier_test.cpp116 EXPECT_STREQ("false", EcmaStringAccessor(handleEcmaStr1).ToCString().c_str()); in HWTEST_F_L0()
122 EXPECT_STREQ("10.12", EcmaStringAccessor(handleEcmaStr2).ToCString().c_str()); in HWTEST_F_L0()
146 … EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
213 …EXPECT_STREQ("{\ntttt\"z\": 1,\ntttt\"x\": 3.6\n}", EcmaStringAccessor(handleEcmaStr).ToCString().… in HWTEST_F_L0()
236 …EXPECT_STREQ("{\"z\":1,\"x\":3.6,\"y\":\"abc\"}", EcmaStringAccessor(handleEcmaStr).ToCString().c_… in HWTEST_F_L0()
278 …\ntttt\"json\",\ntttt100,\ntttt\"abc\"\n]", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
317 EXPECT_STREQ("[1,3.6,\"abc\"]", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
346 …EXPECT_STREQ("\"\\\"\\\\\\b\\f\\n\\r\\t\"", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
Dbuiltins_base_test.cpp131 EXPECT_STREQ(EcmaStringAccessor(handleEcmaStr1).ToCString().c_str(), "BuiltinsBase"); in HWTEST_F_L0()
137 EXPECT_STREQ(EcmaStringAccessor(handleEcmaStr2).ToCString().c_str(), ""); in HWTEST_F_L0()
/arkcompiler/ets_runtime/ecmascript/tests/
Dlocale_helper_test.cpp74 EXPECT_STREQ("GMT-12:00", EcmaStringAccessor(ecmaString).ToCString().c_str()); in HWTEST_F_L0()
78 EXPECT_STREQ("周日16:00:00–周五23:00:00", EcmaStringAccessor(ecmaString).ToCString().c_str()); in HWTEST_F_L0()
82 EXPECT_STREQ("$654K", EcmaStringAccessor(ecmaString).ToCString().c_str()); in HWTEST_F_L0()
86 EXPECT_STREQ("1 ", EcmaStringAccessor(ecmaString).ToCString().c_str()); in HWTEST_F_L0()
110 EXPECT_STREQ("fr-Latn-FR", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
128 EXPECT_STREQ("en-US", EcmaStringAccessor(resultEcmaStr1).ToCString().c_str()); in HWTEST_F_L0()
130 EXPECT_STREQ("en-GB", EcmaStringAccessor(resultEcmaStr2).ToCString().c_str()); in HWTEST_F_L0()
147 EXPECT_STREQ("en-US", EcmaStringAccessor(canonicalizeLocaleId).ToCString().c_str()); in HWTEST_F_L0()
151 EXPECT_STREQ("ko-Kore-KR", EcmaStringAccessor(canonicalizeLocaleId).ToCString().c_str()); in HWTEST_F_L0()
155 …EXPECT_STREQ("id-u-co-pinyin-de-id", EcmaStringAccessor(canonicalizeLocaleId).ToCString().c_str()); in HWTEST_F_L0()
[all …]
Decma_string_table_test.cpp83 EXPECT_STREQ(EcmaStringAccessor(ecmaStrGetPtr).ToCString().c_str(), "hello"); in HWTEST_F_L0()
105 EXPECT_STREQ(EcmaStringAccessor(ecmaStrGetPtr).ToCString().c_str(), "编码解码"); in HWTEST_F_L0()
126 EXPECT_STREQ(EcmaStringAccessor(ecmaStrGetPtr).ToCString().c_str(), "hello world"); in HWTEST_F_L0()
Djs_displaynames_test.cpp90 EXPECT_STREQ(EcmaStringAccessor(localeStr).ToCString().c_str(), "en"); in HWTEST_F_L0()
168 EXPECT_STREQ(EcmaStringAccessor(setlocale).ToCString().c_str(), "en-US"); in HWTEST_F_L0()
203 EXPECT_STREQ(EcmaStringAccessor(resultDisplay).ToCString().c_str(), "片假名"); in HWTEST_F_L0()
209 EXPECT_STREQ(EcmaStringAccessor(resultDisplay).ToCString().c_str(), "法文"); in HWTEST_F_L0()
215 EXPECT_STREQ(EcmaStringAccessor(resultDisplay).ToCString().c_str(), "美國"); in HWTEST_F_L0()
Djs_list_format_test.cpp210 EXPECT_STREQ(EcmaStringAccessor(valueStr).ToCString().c_str(), "Zero, One, and Two"); in HWTEST_F_L0()
241 EXPECT_STREQ(EcmaStringAccessor(valueStr).ToCString().c_str(), "Zero One Two"); in HWTEST_F_L0()
271 EXPECT_STREQ(EcmaStringAccessor(valueStr).ToCString().c_str(), "苹果、梨子或桃"); in HWTEST_F_L0()
311 EXPECT_STREQ(EcmaStringAccessor(valueStr).ToCString().c_str(), "苹果、梨子和桃"); in HWTEST_F_L0()
354 EXPECT_STREQ(EcmaStringAccessor(resValue0.GetTaggedValue()).ToCString().c_str(), "one"); in HWTEST_F_L0()
355 EXPECT_STREQ(EcmaStringAccessor(resValue1.GetTaggedValue()).ToCString().c_str(), "two"); in HWTEST_F_L0()
356 EXPECT_STREQ(EcmaStringAccessor(resValue2.GetTaggedValue()).ToCString().c_str(), "three"); in HWTEST_F_L0()
Djs_number_format_test.cpp91 EXPECT_STREQ("-123,456", EcmaStringAccessor(stringValue).ToCString().c_str()); in HWTEST_F_L0()
117 EXPECT_STREQ("zh-Hans-CN", EcmaStringAccessor(localeStr).ToCString().c_str()); in HWTEST_F_L0()
190 EXPECT_STREQ("123,456,789", EcmaStringAccessor(resultEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
Dglobal_dictionary_test.cpp247 EXPECT_EQ(nameKey[0], EcmaStringAccessor(resultFirstKey).ToCString().c_str()); in HWTEST_F_L0()
248 EXPECT_EQ(nameKey[15], EcmaStringAccessor(resultLastKey).ToCString().c_str()); in HWTEST_F_L0()
291 EXPECT_EQ(nameKey[1], EcmaStringAccessor(resultFirstKey).ToCString().c_str()); in HWTEST_F_L0()
292 EXPECT_EQ(nameKey[15], EcmaStringAccessor(resultLastKey).ToCString().c_str()); in HWTEST_F_L0()
Djs_relative_time_format_test.cpp79 EXPECT_STREQ("latn", EcmaStringAccessor(numberingSystemStr).ToCString().c_str()); in HWTEST_F_L0()
81 EXPECT_STREQ("en", EcmaStringAccessor(localeStr).ToCString().c_str()); in HWTEST_F_L0()
Djs_bigint_test.cpp307 EXPECT_STREQ(EcmaStringAccessor(bigintEcmaStrBin1).ToCString().c_str(), in HWTEST_F_L0()
310 EXPECT_STREQ(EcmaStringAccessor(bigintEcmaStrOct1).ToCString().c_str(), "777777777777777777"); in HWTEST_F_L0()
312 EXPECT_STREQ(EcmaStringAccessor(bigintEcmaStrDec1).ToCString().c_str(), "18014398509481983"); in HWTEST_F_L0()
314 EXPECT_STREQ(EcmaStringAccessor(bigintEcmaStrHex1).ToCString().c_str(), "3fffffffffffff"); in HWTEST_F_L0()
317 EXPECT_STREQ(EcmaStringAccessor(bigintEcmaStrBin2).ToCString().c_str(), in HWTEST_F_L0()
319 EXPECT_STREQ(EcmaStringAccessor(bigintEcmaStrBin2).ToCString().c_str(), in HWTEST_F_L0()
323 … EXPECT_STREQ(EcmaStringAccessor(bigintEcmaStrOct2).ToCString().c_str(), "104420417226133016261"); in HWTEST_F_L0()
324 EXPECT_STREQ(EcmaStringAccessor(bigintEcmaStrOct2).ToCString().c_str(), in HWTEST_F_L0()
328 EXPECT_STREQ(EcmaStringAccessor(bigintEcmaStrDec2).ToCString().c_str(), "1234567890987654321"); in HWTEST_F_L0()
329 EXPECT_STREQ(EcmaStringAccessor(bigintEcmaStrDec2).ToCString().c_str(), in HWTEST_F_L0()
[all …]
Djs_plural_rules_test.cpp129 EXPECT_STREQ("en", EcmaStringAccessor(resultLocaleStr).ToCString().c_str()); in HWTEST_F_L0()
162 EXPECT_STREQ("other", EcmaStringAccessor(resolveRules).ToCString().c_str()); in HWTEST_F_L0()
/arkcompiler/ets_runtime/ecmascript/
Djs_date.cpp654 CString year = StrToTargetLength(ToCString(fields[YEAR]), STR_LENGTH_YEAR); in ToDateString()
655 CString day = StrToTargetLength(ToCString(fields[DAYS]), STR_LENGTH_OTHERS); in ToDateString()
683 …localTime = localTime + StrToTargetLength(ToCString(localMin / MINUTE_PER_HOUR), STR_LENGTH_OTHERS… in ToDateString()
684 …localTime = localTime + StrToTargetLength(ToCString(localMin % MINUTE_PER_HOUR), STR_LENGTH_OTHERS… in ToDateString()
685 CString year = ToCString(fields[YEAR]); in ToDateString()
689 CString day = StrToTargetLength(ToCString(fields[DAYS]), STR_LENGTH_OTHERS); in ToDateString()
690 CString hour = StrToTargetLength(ToCString(fields[HOUR]), STR_LENGTH_OTHERS); in ToDateString()
691 CString minute = StrToTargetLength(ToCString(fields[MIN]), STR_LENGTH_OTHERS); in ToDateString()
692 CString second = StrToTargetLength(ToCString(fields[SEC]), STR_LENGTH_OTHERS); in ToDateString()
704 CString year = ToCString(fields[YEAR]); in ToISOString()
[all …]
/arkcompiler/ets_runtime/ecmascript/dfx/hprof/
Dheap_profiler.cpp263 stamp.append(ToCString(timeData->tm_year + TIME_START)) in GetTimeStamp()
265 .append(ToCString(timeData->tm_mon + 1)) in GetTimeStamp()
267 .append(ToCString(timeData->tm_mday)) in GetTimeStamp()
269 .append(ToCString(timeData->tm_hour)) in GetTimeStamp()
271 .append(ToCString(timeData->tm_min)) in GetTimeStamp()
273 .append(ToCString(timeData->tm_sec)); in GetTimeStamp()
Dheap_snapshot_json_serializer.h66 Write(ToCString(num)); in Write()
/arkcompiler/ets_runtime/ecmascript/builtins/tests/
Dbuiltins_locale_test.cpp186 EXPECT_STREQ("en-Latn-US", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
203 EXPECT_STREQ("h24", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
220 EXPECT_STREQ("chinese", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
237 EXPECT_STREQ("undefined", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
254 EXPECT_STREQ("compat", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
286 EXPECT_STREQ("mong", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
303 EXPECT_STREQ("en", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
320 EXPECT_STREQ("Latn", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
337 EXPECT_STREQ("US", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
393 EXPECT_STREQ("zh-Hans-CN", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
[all …]
Dbuiltins_plural_rules_test.cpp133 EXPECT_STREQ("other", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
157 EXPECT_STREQ("one", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
181 EXPECT_STREQ("other", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
205 EXPECT_STREQ("few", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
229 EXPECT_STREQ("two", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
253 EXPECT_STREQ("other", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
277 EXPECT_STREQ("one", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
300 EXPECT_STREQ("id-u-co-pinyin-de-id", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
Dbuiltins_global_test.cpp79 EXPECT_STREQ("123", EcmaStringAccessor(ecmaStrHandle).ToCString().c_str()); in HWTEST_F_L0()
94 EXPECT_STREQ("123", EcmaStringAccessor(ecmaStrHandle).ToCString().c_str()); in HWTEST_F_L0()
Dbuiltins_intl_test.cpp93 EXPECT_STREQ("ko-Kore-KR", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
120 EXPECT_STREQ("zh-Hans-CN", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
Dbuiltins_number_format_test.cpp148 EXPECT_STREQ("3,500", EcmaStringAccessor(resultEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
179 EXPECT_STREQ("($3,500.00)", EcmaStringAccessor(resultEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
204 EXPECT_STREQ("+55%", EcmaStringAccessor(resultEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
229 EXPECT_STREQ("3,500 L", EcmaStringAccessor(resultEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
250 EXPECT_STREQ("9.9亿", EcmaStringAccessor(resultEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
294 EXPECT_STREQ("3.500,00 €", EcmaStringAccessor(resultEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
Dbuiltins_relative_time_format_test.cpp133 EXPECT_STREQ("tomorrow", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
158 EXPECT_STREQ("today", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
183 EXPECT_STREQ("yesterday", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
208 EXPECT_STREQ("1 day ago", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
233 EXPECT_STREQ("in 1 day", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
Dbuiltins_displaynames_test.cpp144 EXPECT_STREQ("French", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
168 EXPECT_STREQ("Latin America", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
192 EXPECT_STREQ("Euro", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
233 EXPECT_STREQ("id-u-co-pinyin-de-id", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
263 EXPECT_STREQ("de-DE-u-co-phonebk", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
Dbuiltins_list_format_test.cpp131 …EXPECT_STREQ("M, o, t, o, r, c, y, c, l and e", EcmaStringAccessor(handleEcmaStr).ToCString().c_st… in HWTEST_F_L0()
169 EXPECT_STREQ("Motorcycle, Bus and Car", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
207 EXPECT_STREQ("Motorcycle, Bus or Car", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
237 EXPECT_STREQ("中文英文", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
275 EXPECT_STREQ("中文、英文和韩文", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
479 EXPECT_STREQ("id-u-co-pinyin-de-id", EcmaStringAccessor(handleEcmaStr).ToCString().c_str()); in HWTEST_F_L0()
511 EXPECT_STREQ("id-u-co-pinyin-de", EcmaStringAccessor(resultStr).ToCString().c_str()); in HWTEST_F_L0()
/arkcompiler/ets_runtime/ecmascript/snapshot/tests/
Dsnapshot_test.cpp146 EXPECT_EQ(std::strcmp(EcmaStringAccessor(str11).ToCString().c_str(), "str11"), 0); in HWTEST_F_L0()
147 EXPECT_EQ(std::strcmp(EcmaStringAccessor(str22).ToCString().c_str(), "str22"), 0); in HWTEST_F_L0()
148 EXPECT_EQ(std::strcmp(EcmaStringAccessor(str33).ToCString().c_str(), "str11"), 0); in HWTEST_F_L0()
149 EXPECT_EQ(std::strcmp(EcmaStringAccessor(str44).ToCString().c_str(), "str333333333333"), 0); in HWTEST_F_L0()
150 … EXPECT_EQ(std::strcmp(EcmaStringAccessor(str55).ToCString().c_str(), "str11str333333333333"), 0); in HWTEST_F_L0()
151 … EXPECT_EQ(std::strcmp(EcmaStringAccessor(str66).ToCString().c_str(), "str11str333333333333"), 0); in HWTEST_F_L0()
152 EXPECT_EQ(std::strcmp(EcmaStringAccessor(str77).ToCString().c_str(), "str44"), 0); in HWTEST_F_L0()
/arkcompiler/ets_runtime/ecmascript/jspandafile/tests/
Dpanda_file_translator_test.cpp92 …EXPECT_STREQ(EcmaStringAccessor(JSHandle<EcmaString>::Cast(funcName1)).ToCString().c_str(), "func"… in HWTEST_F_L0()
98 …EXPECT_STREQ(EcmaStringAccessor(JSHandle<EcmaString>::Cast(funcName2)).ToCString().c_str(), "func_… in HWTEST_F_L0()

12