Skip to content

Commit

Permalink
Update scheduler_test.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
dumganhar committed Aug 16, 2024
1 parent dce2e37 commit 88e0adc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions native/tests/unit-test/src/scheduler_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
using namespace cc;

TEST(schedulerTest, performInCocosThreadOrder) {
auto scheduler = std::make_shared<Scheduler>();
auto *scheduler = new Scheduler();

std::vector<int> orderResult;

Expand Down Expand Up @@ -62,5 +62,8 @@ TEST(schedulerTest, performInCocosThreadOrder) {
scheduler->runFunctionsToBePerformedInCocosThread();

const std::vector<int> expectedResult{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
EXPECT_EQ(orderResult, expectedResult);
EXPECT_TRUE(orderResult == expectedResult);

delete scheduler;
scheduler = nullptr;
}

0 comments on commit 88e0adc

Please sign in to comment.