Home
last modified time | relevance | path

Searched refs:teststr (Results 1 – 15 of 15) sorted by relevance

/third_party/libcoap/tests/
Dtest_options.c25 coap_str_const_t teststr = { 1, (const uint8_t *)"" }; in t_parse_option1() local
31 result = coap_opt_parse(teststr.s, teststr.length, &option); in t_parse_option1()
41 coap_str_const_t teststr = { 2, (const uint8_t *)"\xc1" }; in t_parse_option2() local
46 result = coap_opt_parse(teststr.s, teststr.length, &option); in t_parse_option2()
50 CU_ASSERT(option.value == teststr.s + 1); in t_parse_option2()
56 coap_str_const_t teststr = { 13, (const uint8_t *)"\x3c\x00\x01\x02\x03\x04" in t_parse_option3() local
62 result = coap_opt_parse(teststr.s, teststr.length, &option); in t_parse_option3()
66 CU_ASSERT(option.value == teststr.s + 1); in t_parse_option3()
73 coap_str_const_t teststr = { 2, (const uint8_t *)"\xf3" }; in t_parse_option4() local
78 result = coap_opt_parse(teststr.s, teststr.length, &option); in t_parse_option4()
[all …]
Dtest_uri.c18 char teststr[] = "coap://[::1]/.well-known/core"; in t_parse_uri1() local
23 result = coap_split_uri((unsigned char *)teststr, strlen(teststr), &uri); in t_parse_uri1()
42 char teststr[] = "coap://[::1]:8000/.well-known/core"; in t_parse_uri2() local
46 result = coap_split_uri((unsigned char *)teststr, strlen(teststr), &uri); in t_parse_uri2()
65 char teststr[] = "coap://localhost/?foo&bla=fasel"; in t_parse_uri3() local
69 result = coap_split_uri((unsigned char *)teststr, strlen(teststr), &uri); in t_parse_uri3()
87 char teststr[] = "coap://:100000"; in t_parse_uri4() local
91 result = coap_split_uri((unsigned char *)teststr, strlen(teststr), &uri); in t_parse_uri4()
97 char teststr[] = "coap://foo:100000"; in t_parse_uri5() local
101 result = coap_split_uri((unsigned char *)teststr, strlen(teststr), &uri); in t_parse_uri5()
[all …]
Dtest_pdu.c27 uint8_t teststr[] = { 0x40, 0x01, 0x93, 0x34 }; in t_parse_pdu1() local
30 result = coap_pdu_parse(COAP_PROTO_UDP, teststr, sizeof(teststr), pdu); in t_parse_pdu1()
33 CU_ASSERT(pdu->used_size == sizeof(teststr) - 4); in t_parse_pdu1()
43 uint8_t teststr[] = { 0x55, 0x69, 0x12, 0x34, 't', 'o', 'k', 'e', 'n' }; in t_parse_pdu2() local
46 result = coap_pdu_parse(COAP_PROTO_UDP, teststr, sizeof(teststr), pdu); in t_parse_pdu2()
49 CU_ASSERT(pdu->used_size == sizeof(teststr) - 4); in t_parse_pdu2()
54 CU_ASSERT(memcmp(pdu->token, teststr + 4, 5) == 0); in t_parse_pdu2()
60 uint8_t teststr[] = { 0x53, 0x69, 0x12, 0x34, 't', 'o', 'k', 'e', 'n' }; in t_parse_pdu3() local
63 result = coap_pdu_parse(COAP_PROTO_UDP, teststr, sizeof(teststr), pdu); in t_parse_pdu3()
70 uint8_t teststr[] = { 0x59, 0x69, 0x12, 0x34, in t_parse_pdu4() local
[all …]
Dtest_encode.c24 const coap_binary_t teststr = { 0, NULL }; in t_decode1() local
27 result = coap_decode_var_bytes(teststr.s, teststr.length); in t_decode1()
35 coap_binary_t teststr = { sizeof(data), data }; in t_decode2() local
38 result = coap_decode_var_bytes8(teststr.s, teststr.length); in t_decode2()
46 coap_binary_t teststr = { sizeof(data), data }; in t_decode3() local
49 result = coap_decode_var_bytes(teststr.s, teststr.length); in t_decode3()
57 coap_binary_t teststr = { sizeof(data), data }; in t_decode4() local
60 result = coap_decode_var_bytes(teststr.s, teststr.length); in t_decode4()
67 const coap_binary_t teststr = { 0, NULL }; in t_decode5() local
70 result = coap_decode_var_bytes8(teststr.s, teststr.length); in t_decode5()
[all …]
Dtest_error_response.c30 uint8_t teststr[] = { in t_error_response1() local
46 CU_ASSERT(response->used_size == sizeof(teststr) - 4); in t_error_response1()
52 CU_ASSERT(memcmp(response->token - 4, teststr, sizeof(teststr)) == 0); in t_error_response1()
58 uint8_t teststr[] = { in t_error_response2() local
76 CU_ASSERT(response->used_size == sizeof(teststr) - 4); in t_error_response2()
81 CU_ASSERT(memcmp(response->token - 4, teststr, sizeof(teststr)) == 0); in t_error_response2()
88 uint8_t teststr[] = { in t_error_response3() local
109 CU_ASSERT(response->used_size == sizeof(teststr) - 4); in t_error_response3()
114 CU_ASSERT(memcmp(response->token - 4, teststr, sizeof(teststr)) == 0); in t_error_response3()
125 uint8_t teststr[] = { in t_error_response4() local
[all …]
Dtest_wellknown.c37 char teststr[] = { /* </>;title="some attribute";ct=0 (31 chars) */ in t_wellknown1() local
51 for (offset = 0; offset < sizeof(teststr); offset++) { in t_wellknown1()
57 CU_ASSERT(result == sizeof(teststr) - offset); in t_wellknown1()
58 CU_ASSERT(buflen == sizeof(teststr)); in t_wellknown1()
59 CU_ASSERT(memcmp(buf, teststr + offset, sizeof(teststr) - offset) == 0); in t_wellknown1()
68 CU_ASSERT(buflen == sizeof(teststr)); in t_wellknown1()
76 CU_ASSERT(buflen == sizeof(teststr)); in t_wellknown1()
86 char teststr[] = { /* ,</abcd>;if="one";obs (21 chars) */ in t_wellknown2() local
98 for (offset = 0; offset < sizeof(teststr) - sizeof(buf); offset++) { in t_wellknown2()
105 CU_ASSERT(buflen == sizeof(teststr)); in t_wellknown2()
[all …]
/third_party/rust/crates/unicode-width/
DREADME.md18 let teststr = "Hello, world!";
19 let width = UnicodeWidthStr::width(teststr);
20 println!("{}", teststr);
22 let width = teststr.width_cjk();
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/util/
DGlobalizationPreferences.java590 String teststr = result; in getDisplayName() local
594 teststr = result.substring(sidx+1, eidx); in getDisplayName()
596 if (teststr.length() == 2) { in getDisplayName()
599 char c = teststr.charAt(i); in getDisplayName()
/third_party/icu/icu4j/main/classes/collate/src/com/ibm/icu/util/
DGlobalizationPreferences.java588 String teststr = result; in getDisplayName() local
592 teststr = result.substring(sidx+1, eidx); in getDisplayName()
594 if (teststr.length() == 2) { in getDisplayName()
597 char c = teststr.charAt(i); in getDisplayName()
/third_party/icu/icu4c/source/test/cintltst/
Dcitertst.c946 UChar teststr[500]; in TestSmallBuffer() local
954 teststr[count ++] = 0x300; in TestSmallBuffer()
957 teststr[count ++] = 0x31A; in TestSmallBuffer()
963 testiter = ucol_openElements(coll, teststr, 500, &status); in TestSmallBuffer()
Dcapitst.c455 UChar teststr[10]; in TestRuleBasedColl() local
513 teststr[0] = 0x0e40; in TestRuleBasedColl()
514 teststr[1] = 0x0e01; in TestRuleBasedColl()
515 teststr[2] = 0x0e2d; in TestRuleBasedColl()
526 iter1 = ucol_openElements(col1, teststr, 3, &status); in TestRuleBasedColl()
527 iter2 = ucol_openElements(col2, teststr, 3, &status); in TestRuleBasedColl()
/third_party/python/Lib/test/
Dtest_imp.py68 for modname, encoding, teststr in self.test_strings:
71 self.assertEqual(teststr, mod.test)
Dtest_array.py179 teststr = "Bonne Journ\xe9e \U0002030a\U00020347"
188 a = array.array('u', teststr)
190 array.array, 'u', mformat_code, teststr.encode(encoding))
Dtest_smtplib.py76 teststr = "abc\n.jkl\rfoo\r\n..blue"
78 self.assertEqual(expected, smtplib.quotedata(teststr))
/third_party/python/Lib/test/test_email/
Dtest_email.py1732 teststr = '\u043a\u0438\u0440\u0438\u043b\u0438\u0446\u0430'
1734 msg = MIMEText(teststr, _charset='utf-8')
1737 eq(msg.get_payload(decode=True), teststr.encode('utf-8'))
1742 teststr = '\u043a\u0438\u0440\u0438\u043b\u0438\u0446\u0430'
1743 self.assertRaises(UnicodeEncodeError, MIMEText, teststr)