Run API tests against the sandbox runtime (#42264)

Summary:
X-link: https://github.com/facebook/hermes/pull/1248

Pull Request resolved: https://github.com/facebook/react-native/pull/42264

Add a buck build for the sandbox, and run our existing API tests
against it.

Reviewed By: avp

Differential Revision: D48086019

fbshipit-source-id: 2ee2eca93e27557d2609eaaec2fce3218d8b873f
This commit is contained in:
Neil Dhar
2024-01-15 16:25:42 -08:00
committed by Facebook GitHub Bot
parent bac714d877
commit cd6755f272
@@ -1444,8 +1444,13 @@ TEST_P(JSITest, ArrayBufferSizeTest) {
auto ab =
eval("var x = new ArrayBuffer(10); x").getObject(rt).getArrayBuffer(rt);
EXPECT_EQ(ab.size(rt), 10);
// Ensure we can safely write some data to the buffer.
memset(ab.data(rt), 0xab, 10);
try {
// Ensure we can safely write some data to the buffer.
memset(ab.data(rt), 0xab, 10);
} catch (const JSINativeException& ex) {
// data() is unimplemented by some runtimes, ignore such failures.
}
// Ensure that setting the byteLength property does not change the length.
eval("Object.defineProperty(x, 'byteLength', {value: 20})");