mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add some more helper methods to Value
Reviewed By: mhorowitz Differential Revision: D4197278 fbshipit-source-id: 9a538ff2747d32a54d42627a9f78e4a348dce639
This commit is contained in:
committed by
Facebook Github Bot
parent
1604f10889
commit
674d86cdcb
@@ -28,8 +28,8 @@ static void prepare() {
|
||||
TEST(Value, Undefined) {
|
||||
prepare();
|
||||
JSGlobalContextRef ctx = JSGlobalContextCreateInGroup(nullptr, nullptr);
|
||||
Value v(ctx, JSValueMakeUndefined(ctx));
|
||||
auto s = react::String::adopt(JSValueToStringCopy(ctx, v, nullptr));
|
||||
auto v = Value::makeUndefined(ctx);
|
||||
auto s = String::adopt(JSValueToStringCopy(ctx, v, nullptr));
|
||||
EXPECT_EQ("undefined", s.str());
|
||||
JSGlobalContextRelease(ctx);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user