diff options
Diffstat (limited to 'cxxtest/sample/mock/Dice.cpp')
| -rw-r--r-- | cxxtest/sample/mock/Dice.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cxxtest/sample/mock/Dice.cpp b/cxxtest/sample/mock/Dice.cpp new file mode 100644 index 000000000..161b80fa2 --- /dev/null +++ b/cxxtest/sample/mock/Dice.cpp @@ -0,0 +1,14 @@ +#include <T/stdlib.h> +#include "Dice.h" + +Dice::Dice() +{ + T::srand( T::time( 0 ) ); +} + +unsigned Dice::roll() +{ + return (T::rand() % 6) + 1; +} + + |
