Skip to content

Commit d50ca45

Browse files
aspizuadazem009
authored andcommitted
Fix tests for randomBackdrop.
1 parent a92fe8f commit d50ca45

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

test/blocks/looks_blocks_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2507,7 +2507,7 @@ TEST_F(LooksBlocksTest, RandomBackdrop)
25072507

25082508
stage.addCostume(std::make_shared<Costume>("backdrop4", "b4", "svg"));
25092509

2510-
EXPECT_CALL(rng, randint(0, 3)).WillOnce(Return(2));
2510+
EXPECT_CALL(rng, randintExcept(0, 3, 1)).WillOnce(Return(2));
25112511
EXPECT_CALL(m_engineMock, startBackdropScripts(stage.costumeAt(2)->broadcast(), &thread, false));
25122512
vm->reset();
25132513
vm->run();

test/mocks/randomgeneratormock.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ class RandomGeneratorMock : public IRandomGenerator
1010
public:
1111
MOCK_METHOD(long, randint, (long, long), (const, override));
1212
MOCK_METHOD(double, randintDouble, (double, double), (const, override));
13+
MOCK_METHOD(long, randintExcept, (long, long, long), (const, override));
1314
};

0 commit comments

Comments
 (0)