mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix RuntimeScheduler tests on iOS (#41063)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/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
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9050bcb2b5
commit
63fdd1d7e9
+2
-2
@@ -170,7 +170,7 @@ TEST_P(RuntimeSchedulerTest, scheduleTwoTasksWithSamePriority) {
|
||||
runtimeScheduler_->scheduleTask(
|
||||
SchedulerPriority::NormalPriority, std::move(callbackOne));
|
||||
|
||||
uint secondTaskCallOrder;
|
||||
uint secondTaskCallOrder = 0;
|
||||
auto callbackTwo = createHostFunctionFromLambda(
|
||||
[this, &secondTaskCallOrder](bool /*unused*/) {
|
||||
secondTaskCallOrder = hostFunctionCallCount_;
|
||||
@@ -203,7 +203,7 @@ TEST_P(RuntimeSchedulerTest, scheduleTwoTasksWithDifferentPriorities) {
|
||||
runtimeScheduler_->scheduleTask(
|
||||
SchedulerPriority::LowPriority, std::move(callbackOne));
|
||||
|
||||
uint userBlockingPriorityTaskCallOrder;
|
||||
uint userBlockingPriorityTaskCallOrder = 0;
|
||||
auto callbackTwo = createHostFunctionFromLambda(
|
||||
[this, &userBlockingPriorityTaskCallOrder](bool /*unused*/) {
|
||||
userBlockingPriorityTaskCallOrder = hostFunctionCallCount_;
|
||||
|
||||
Reference in New Issue
Block a user