Home
last modified time | relevance | path

Searched refs:ViewBstr (Results 1 – 4 of 4) sorted by relevance

/external/libcppbor/tests/
Dcppbor_test.cpp157 EXPECT_EQ("\x40", ViewBstr("").toString()); in TEST()
158 EXPECT_EQ("\x41\x61", ViewBstr("a").toString()); in TEST()
159 EXPECT_EQ("\x41\x41", ViewBstr("A").toString()); in TEST()
160 EXPECT_EQ("\x44\x49\x45\x54\x46", ViewBstr("IETF").toString()); in TEST()
161 EXPECT_EQ("\x42\x22\x5c", ViewBstr("\"\\").toString()); in TEST()
162 EXPECT_EQ("\x42\xc3\xbc", ViewBstr("\xc3\xbc").toString()); in TEST()
163 EXPECT_EQ("\x43\xe6\xb0\xb4", ViewBstr("\xe6\xb0\xb4").toString()); in TEST()
164 EXPECT_EQ("\x44\xf0\x90\x85\x91", ViewBstr("\xf0\x90\x85\x91").toString()); in TEST()
165 EXPECT_EQ("\x44\x01\x02\x03\x04", ViewBstr("\x01\x02\x03\x04").toString()); in TEST()
166 EXPECT_EQ("\x44\x40\x40\x40\x40", ViewBstr("@@@@").toString()); in TEST()
[all …]
/external/libcppbor/include/cppbor/
Dcppbor.h71 class ViewBstr; variable
138 virtual ViewBstr* asViewBstr() { return nullptr; } in asViewBstr()
139 const ViewBstr* asViewBstr() const { return const_cast<Item*>(this)->asViewBstr(); } in asViewBstr()
426 class ViewBstr : public Item {
431 explicit ViewBstr() {} in ViewBstr() function
434 explicit ViewBstr(std::basic_string_view<uint8_t> v) : mView(std::move(v)) {} in ViewBstr() function
437 explicit ViewBstr(std::string_view v) in ViewBstr() function
444 ViewBstr(I1 begin, I2 end) : mView(begin, end) {} in ViewBstr() function
447 ViewBstr(const uint8_t* begin, const uint8_t* end) in ViewBstr() function
450 bool operator==(const ViewBstr& other) const& { return mView == other.mView; }
[all …]
/external/libcppbor/src/
Dcppbor.cpp132 const ViewBstr* viewBstr = item->asViewBstr(); in prettyPrintInternal()
393 uint8_t* ViewBstr::encode(uint8_t* pos, const uint8_t* end) const { in encode()
399 void ViewBstr::encodeValue(EncodeCallback encodeCallback) const { in encodeValue()
Dcppbor_parse.cpp248 … return handleString<ViewBstr>(addlData, begin, pos, end, "byte string", parseClient); in parseRecursively()