Sha256: bc54689402626f4b11470fc58f4f8eede9114af629d934a0b41850891fea28d5

Contents?: true

Size: 726 Bytes

Versions: 59

Compression:

Stored size: 726 Bytes

Contents

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

void setUp(void)
{
}

void tearDown(void)
{
}

void test_palindromes_list(void)
{
   product_t product = get_palindrome_product(1, 9);
   TEST_ASSERT_EQUAL_INT(1, product.smallest);
   TEST_ASSERT_EQUAL_INT(9, product.largest);
}

void test_palindromes_list2(void)
{
   TEST_IGNORE();               // delete this line to run test
   product_t product = get_palindrome_product(10, 99);
   TEST_ASSERT_EQUAL_INT(121, product.smallest);
   TEST_ASSERT_EQUAL_INT(9009, product.largest);
}

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

   RUN_TEST(test_palindromes_list);
   RUN_TEST(test_palindromes_list2);

   UnityEnd();
   return 0;
}

Version data entries

59 entries across 59 versions & 1 rubygems

Version Path
trackler-2.2.1.105 tracks/c/exercises/palindrome-products/test/test_palindrome_products.c
trackler-2.2.1.104 tracks/c/exercises/palindrome-products/test/test_palindrome_products.c
trackler-2.2.1.103 tracks/c/exercises/palindrome-products/test/test_palindrome_products.c
trackler-2.2.1.102 tracks/c/exercises/palindrome-products/test/test_palindrome_products.c
trackler-2.2.1.101 tracks/c/exercises/palindrome-products/test/test_palindrome_products.c
trackler-2.2.1.100 tracks/c/exercises/palindrome-products/test/test_palindrome_products.c
trackler-2.2.1.99 tracks/c/exercises/palindrome-products/test/test_palindrome_products.c
trackler-2.2.1.98 tracks/c/exercises/palindrome-products/test/test_palindrome_products.c
trackler-2.2.1.97 tracks/c/exercises/palindrome-products/test/test_palindrome_products.c
trackler-2.2.1.96 tracks/c/exercises/palindrome-products/test/test_palindrome_products.c
trackler-2.2.1.95 tracks/c/exercises/palindrome-products/test/test_palindrome_products.c
trackler-2.2.1.94 tracks/c/exercises/palindrome-products/test/test_palindrome_products.c
trackler-2.2.1.93 tracks/c/exercises/palindrome-products/test/test_palindrome_products.c
trackler-2.2.1.92 tracks/c/exercises/palindrome-products/test/test_palindrome_products.c
trackler-2.2.1.91 tracks/c/exercises/palindrome-products/test/test_palindrome_products.c
trackler-2.2.1.90 tracks/c/exercises/palindrome-products/test/test_palindrome_products.c
trackler-2.2.1.89 tracks/c/exercises/palindrome-products/test/test_palindrome_products.c
trackler-2.2.1.88 tracks/c/exercises/palindrome-products/test/test_palindrome_products.c
trackler-2.2.1.87 tracks/c/exercises/palindrome-products/test/test_palindrome_products.c
trackler-2.2.1.86 tracks/c/exercises/palindrome-products/test/test_palindrome_products.c