Skip to content

Commit 63fdd1d

Browse files
rubennortefacebook-github-bot
authored andcommitted
Fix RuntimeScheduler tests on iOS (#41063)
Summary: Pull Request resolved: #41063 Some tests for RuntimeScheduler broke because we used uninitialized values incorrectly (they're initialized with 0 on Android but with something like `0101010101...` on iOS). This fixes the tests by assigning the right initial value. Changelog: [internal] Reviewed By: sammy-SC Differential Revision: D50413220 fbshipit-source-id: e1fc223e795e2ae01d6e3ba3bc32bd052c8fc2f3
1 parent 9050bcb commit 63fdd1d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/react-native/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ TEST_P(RuntimeSchedulerTest, scheduleTwoTasksWithSamePriority) {
170170
runtimeScheduler_->scheduleTask(
171171
SchedulerPriority::NormalPriority, std::move(callbackOne));
172172

173-
uint secondTaskCallOrder;
173+
uint secondTaskCallOrder = 0;
174174
auto callbackTwo = createHostFunctionFromLambda(
175175
[this, &secondTaskCallOrder](bool /*unused*/) {
176176
secondTaskCallOrder = hostFunctionCallCount_;
@@ -203,7 +203,7 @@ TEST_P(RuntimeSchedulerTest, scheduleTwoTasksWithDifferentPriorities) {
203203
runtimeScheduler_->scheduleTask(
204204
SchedulerPriority::LowPriority, std::move(callbackOne));
205205

206-
uint userBlockingPriorityTaskCallOrder;
206+
uint userBlockingPriorityTaskCallOrder = 0;
207207
auto callbackTwo = createHostFunctionFromLambda(
208208
[this, &userBlockingPriorityTaskCallOrder](bool /*unused*/) {
209209
userBlockingPriorityTaskCallOrder = hostFunctionCallCount_;

0 commit comments

Comments
 (0)