Sha256: 0a3141253c18956ad7c921af9c4b8cccf50fb8eb36862825e0caab2eddb7cc16

Contents?: true

Size: 1.82 KB

Versions: 132

Compression:

Stored size: 1.82 KB

Contents

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

void setUp(void)
{
}

void tearDown(void)
{
}

void test_square_of_sum_up_to_5(void)
{
   TEST_ASSERT_EQUAL(225, square_of_sum(5));
}

void test_square_of_sum_up_to_10(void)
{
   TEST_IGNORE();               // delete this line to run test
   TEST_ASSERT_EQUAL(3025, square_of_sum(10));
}

void test_square_of_sum_up_to_100(void)
{
   TEST_IGNORE();
   TEST_ASSERT_EQUAL(25502500, square_of_sum(100));
}

void test_sum_of_squares_up_to_5(void)
{
   TEST_IGNORE();
   TEST_ASSERT_EQUAL(55, sum_of_squares(5));
}

void test_sum_of_squares_up_to_10(void)
{
   TEST_IGNORE();
   TEST_ASSERT_EQUAL(385, sum_of_squares(10));
}

void test_sum_of_squares_up_to_100(void)
{
   TEST_IGNORE();
   TEST_ASSERT_EQUAL(338350, sum_of_squares(100));
}

void test_difference_of_squares_up_to_0(void)
{
   TEST_IGNORE();
   TEST_ASSERT_EQUAL(0, difference_of_squares(0));
}

void test_difference_of_squares_up_to_5(void)
{
   TEST_IGNORE();
   TEST_ASSERT_EQUAL(170, difference_of_squares(5));
}

void test_difference_of_squares_up_to_10(void)
{
   TEST_IGNORE();
   TEST_ASSERT_EQUAL(2640, difference_of_squares(10));
}

void test_difference_of_squares_up_to_100(void)
{
   TEST_IGNORE();
   TEST_ASSERT_EQUAL(25164150, difference_of_squares(100));
}

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

   RUN_TEST(test_square_of_sum_up_to_5);
   RUN_TEST(test_square_of_sum_up_to_10);
   RUN_TEST(test_square_of_sum_up_to_100);
   RUN_TEST(test_sum_of_squares_up_to_5);
   RUN_TEST(test_sum_of_squares_up_to_10);
   RUN_TEST(test_sum_of_squares_up_to_100);
   RUN_TEST(test_difference_of_squares_up_to_0);
   RUN_TEST(test_difference_of_squares_up_to_5);
   RUN_TEST(test_difference_of_squares_up_to_10);
   RUN_TEST(test_difference_of_squares_up_to_100);

   UnityEnd();
   return 0;
}

Version data entries

132 entries across 132 versions & 1 rubygems

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