Browse Source

Unittest: generateRandom

remotes/origin/bmidev
Lennart Goetze 11 months ago
parent
commit
90524a80f5
  1. 1
      src/SchereSteinPapier.h
  2. 11
      test/test_SchereSteinPapier.c

1
src/SchereSteinPapier.h

@ -1,5 +1,6 @@
#ifndef SCHERESTEINPAPIER_H
#define SCHERESTEINPAPIER_H
int generateRandom();
#endif // SCHERESTEINPAPIER_H

11
test/test_SchereSteinPapier.c

@ -12,9 +12,14 @@ void tearDown(void)
{
}
void test_SchereSteinPapier_NeedToImplement(void)
{
TEST_IGNORE_MESSAGE("Need to Implement SchereSteinPapier");
void test_Scheresteinpapier_generateRandom(void) {
srand(42);
for (int i = 0; i < 100; ++i) {
int result = generateRandom();
TEST_ASSERT_TRUE(result >= 0 && result <= 2);
}
}
#endif // TEST
Loading…
Cancel
Save