Skip to content

Commit

Permalink
Fix RuntimeScheduler tests on iOS
Browse files Browse the repository at this point in the history
Summary:
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
  • Loading branch information
rubennorte authored and facebook-github-bot committed Oct 18, 2023
1 parent 87dbe44 commit 2f9aadf
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 2f9aadf

Please sign in to comment.