Sha256: 311ceee6de1dda724e94e934c9b3008824578106599299468d0ececec2bd5b89

Contents?: true

Size: 841 Bytes

Versions: 132

Compression:

Stored size: 841 Bytes

Contents

#include "vendor/unity.h"
#include "../src/nth_prime.h"

void setUp(void)
{
}

void tearDown(void)
{
}

void test_first_prime(void)
{
   TEST_ASSERT_EQUAL_UINT32(2, nth(1));
}

void test_second_prime(void)
{
   TEST_IGNORE();               // delete this line to run test
   TEST_ASSERT_EQUAL_UINT32(3, nth(2));
}

void test_sixth_prime(void)
{
   TEST_IGNORE();
   TEST_ASSERT_EQUAL_UINT32(13, nth(6));
}

void test_large_prime(void)
{
   TEST_IGNORE();
   TEST_ASSERT_EQUAL_UINT32(104743, nth(10001));
}

void test_weird_case(void)
{
   TEST_IGNORE();
   TEST_ASSERT_EQUAL_UINT32(0, nth(0));
}

int main(void)
{
   UnityBegin("test/test_nth_prime.c");

   RUN_TEST(test_first_prime);
   RUN_TEST(test_second_prime);
   RUN_TEST(test_sixth_prime);
   RUN_TEST(test_large_prime);
   RUN_TEST(test_weird_case);

   UnityEnd();
   return 0;
}

Version data entries

132 entries across 132 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/c/exercises/nth-prime/test/test_nth_prime.c
trackler-2.2.1.179 tracks/c/exercises/nth-prime/test/test_nth_prime.c
trackler-2.2.1.178 tracks/c/exercises/nth-prime/test/test_nth_prime.c
trackler-2.2.1.177 tracks/c/exercises/nth-prime/test/test_nth_prime.c
trackler-2.2.1.176 tracks/c/exercises/nth-prime/test/test_nth_prime.c
trackler-2.2.1.175 tracks/c/exercises/nth-prime/test/test_nth_prime.c
trackler-2.2.1.174 tracks/c/exercises/nth-prime/test/test_nth_prime.c
trackler-2.2.1.173 tracks/c/exercises/nth-prime/test/test_nth_prime.c
trackler-2.2.1.172 tracks/c/exercises/nth-prime/test/test_nth_prime.c
trackler-2.2.1.171 tracks/c/exercises/nth-prime/test/test_nth_prime.c
trackler-2.2.1.170 tracks/c/exercises/nth-prime/test/test_nth_prime.c
trackler-2.2.1.169 tracks/c/exercises/nth-prime/test/test_nth_prime.c
trackler-2.2.1.167 tracks/c/exercises/nth-prime/test/test_nth_prime.c
trackler-2.2.1.166 tracks/c/exercises/nth-prime/test/test_nth_prime.c
trackler-2.2.1.165 tracks/c/exercises/nth-prime/test/test_nth_prime.c
trackler-2.2.1.164 tracks/c/exercises/nth-prime/test/test_nth_prime.c
trackler-2.2.1.163 tracks/c/exercises/nth-prime/test/test_nth_prime.c
trackler-2.2.1.162 tracks/c/exercises/nth-prime/test/test_nth_prime.c
trackler-2.2.1.161 tracks/c/exercises/nth-prime/test/test_nth_prime.c
trackler-2.2.1.160 tracks/c/exercises/nth-prime/test/test_nth_prime.c