mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Make file backed strings dup the provided file descriptor.
Reviewed By: mhorowitz Differential Revision: D4326645 fbshipit-source-id: 2741f1fead4f42ae76787f8a70c1e787445b827d
This commit is contained in:
committed by
Facebook Github Bot
parent
349bbb54f7
commit
fa082796a5
@@ -37,7 +37,6 @@ TEST(JSBigFileString, MapWholeFileTest) {
|
||||
JSBigFileString bigStr {fd, size};
|
||||
|
||||
// Test
|
||||
ASSERT_EQ(fd, bigStr.fd());
|
||||
ASSERT_STREQ(data.c_str(), bigStr.c_str());
|
||||
}
|
||||
|
||||
@@ -53,7 +52,6 @@ TEST(JSBigFileString, MapPartTest) {
|
||||
JSBigFileString bigStr {fd, needle.size(), offset};
|
||||
|
||||
// Test
|
||||
ASSERT_EQ(fd, bigStr.fd());
|
||||
ASSERT_EQ(needle.length(), bigStr.size());
|
||||
for (unsigned int i = 0; i < needle.length(); ++i) {
|
||||
ASSERT_EQ(needle[i], bigStr.c_str()[i]);
|
||||
|
||||
Reference in New Issue
Block a user