Skip to content

Commit

Permalink
Fix RuntimeScheduler tests on iOS (#41063)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rubennorte authored and facebook-github-bot committed Oct 18, 2023
1 parent 9050bcb commit 63fdd1d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
Expand Down Expand Up @@ -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_;
Expand Down

0 comments on commit 63fdd1d

Please sign in to comment.