unitTest.cpp 530 B

12345678910
  1. Describe(profitable_gamble)
  2. {
  3. It(test1){Assert::That(profitableGamble(0.2, 50, 9), Equals(true));}
  4. It(test2){Assert::That(profitableGamble(0.9, 1, 2), Equals(false));}
  5. It(test3){Assert::That(profitableGamble(0.9, 3, 2), Equals(true));}
  6. It(test4){Assert::That(profitableGamble(0.33, 10, 3.30), Equals(true));}
  7. It(test5){Assert::That(profitableGamble(0, 1000, 0.01), Equals(false));}
  8. It(test6){Assert::That(profitableGamble(0.1, 1000, 7), Equals(true));}
  9. It(test7){Assert::That(profitableGamble(0, 0, 0), Equals(false));}
  10. };