mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Use std::vector to manage MapBuffer storage
Summary: Replaces raw array pointer inside `MapBuffer` with `std::vector`, which is more conventional "safer" way of storing dynamically sized arrays. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D33512115 fbshipit-source-id: d875a2240f7938fd35c4c3ae0e7e91dc7456ff32
This commit is contained in:
committed by
Facebook GitHub Bot
parent
efc56b2790
commit
aaff15c2c8
@@ -108,6 +108,18 @@ TEST(MapBufferTest, testUTFStringEntry) {
|
||||
EXPECT_EQ(map.getString(0), "Let's count: 的, 一, 是");
|
||||
}
|
||||
|
||||
TEST(MapBufferTest, testEmojiStringEntry) {
|
||||
auto builder = MapBufferBuilder();
|
||||
|
||||
builder.putString(
|
||||
0, "Let's count: 1️⃣, 2️⃣, 3️⃣, 🤦🏿♀️");
|
||||
auto map = builder.build();
|
||||
|
||||
EXPECT_EQ(
|
||||
map.getString(0),
|
||||
"Let's count: 1️⃣, 2️⃣, 3️⃣, 🤦🏿♀️");
|
||||
}
|
||||
|
||||
TEST(MapBufferTest, testUTFStringEntries) {
|
||||
auto builder = MapBufferBuilder();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user