|
|
@@ -41,7 +41,7 @@ TEST_F(RollTest, CanConstructNoThrow) {
|
|
|
}
|
|
|
|
|
|
TEST_F(RollTest, RollsOncePerDie) {
|
|
|
- dice::dice mydice{1, {{dice::ZERO, 3, 4}}, {{dice::PLUS, 1}}};
|
|
|
+ dice::dice mydice{1, {{dice::sign::ZERO, 3, 4}}, {{dice::sign::PLUS, 1}}};
|
|
|
EXPECT_CALL(*pRandom, exclusive(4)).WillOnce(Return(2)).WillOnce(Return(1))
|
|
|
.WillOnce(Return(3));
|
|
|
|
|
|
@@ -52,7 +52,7 @@ TEST_F(RollTest, RollsOncePerDie) {
|
|
|
}
|
|
|
|
|
|
TEST_F(RollTest, DoesNotRollForConstants) {
|
|
|
- dice::dice mydice{1, {}, {{dice::PLUS, 1}}};
|
|
|
+ dice::dice mydice{1, {}, {{dice::sign::PLUS, 1}}};
|
|
|
EXPECT_CALL(*pRandom, exclusive(_)).Times(0);
|
|
|
|
|
|
auto roll = dice::roller{pRandom}(mydice);
|
|
|
@@ -63,7 +63,7 @@ TEST_F(RollTest, DoesNotRollForConstants) {
|
|
|
}
|
|
|
|
|
|
TEST_F(RollTest, OperatorInSumsElements) {
|
|
|
- dice::dice mydice{1, {{dice::ZERO, 3, 4}}, {{dice::PLUS, 1}}};
|
|
|
+ dice::dice mydice{1, {{dice::sign::ZERO, 3, 4}}, {{dice::sign::PLUS, 1}}};
|
|
|
EXPECT_CALL(*pRandom, exclusive(4)).WillOnce(Return(2)).WillOnce(Return(1))
|
|
|
.WillOnce(Return(3));
|
|
|
|
|
|
@@ -80,14 +80,14 @@ TEST(RollSerialTest, CanPrint0dN) {
|
|
|
}
|
|
|
|
|
|
TEST(RollSerialTest, Prints1dNAsRollNumber) {
|
|
|
- dice::dice_roll roll{{{dice::ZERO, {3}}}};
|
|
|
+ dice::dice_roll roll{{{dice::sign::ZERO, {3}}}};
|
|
|
std::stringstream ss;
|
|
|
ss << roll;
|
|
|
EXPECT_THAT(ss.str(), Eq("3"));
|
|
|
}
|
|
|
|
|
|
TEST(RollSerialTest, PrintsNdMAsList) {
|
|
|
- dice::dice_roll roll{{{dice::ZERO, {3, 2, 4}}}};
|
|
|
+ dice::dice_roll roll{{{dice::sign::ZERO, {3, 2, 4}}}};
|
|
|
std::stringstream ss;
|
|
|
ss << roll;
|
|
|
EXPECT_THAT(ss.str(), Eq("[ 3, 2, 4 ]"));
|