Sha256: 25d85f97deb5bf7225f1c06412da22e452adbcae5a67a0070f417765694112ab

Contents?: true

Size: 755 Bytes

Versions: 187

Compression:

Stored size: 755 Bytes

Contents

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

void test_a_known_leap_year(void)
{
   TEST_ASSERT_TRUE(is_leap_year(1996));
}

void test_any_old_year(void)
{
   TEST_ASSERT_FALSE(is_leap_year(1997));
}

void test_turn_of_the_20th_century(void)
{
   TEST_ASSERT_FALSE(is_leap_year(1900));
}

void test_turn_of_the_21st_century(void)
{
   TEST_ASSERT_TRUE(is_leap_year(2000));
}

void test_turn_of_the_25th_century(void)
{
   TEST_ASSERT_TRUE(is_leap_year(2400));
}

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

   RUN_TEST(test_a_known_leap_year);
   RUN_TEST(test_any_old_year);
   RUN_TEST(test_turn_of_the_20th_century);
   RUN_TEST(test_turn_of_the_21st_century);
   RUN_TEST(test_turn_of_the_25th_century);

   UnityEnd();
   return 0;
}

Version data entries

187 entries across 187 versions & 1 rubygems

Version Path
trackler-2.2.1.42 tracks/c/exercises/leap/test/test_leap.c
trackler-2.2.1.41 tracks/c/exercises/leap/test/test_leap.c
trackler-2.2.1.40 tracks/c/exercises/leap/test/test_leap.c
trackler-2.2.1.39 tracks/c/exercises/leap/test/test_leap.c
trackler-2.2.1.38 tracks/c/exercises/leap/test/test_leap.c
trackler-2.2.1.37 tracks/c/exercises/leap/test/test_leap.c
trackler-2.2.1.36 tracks/c/exercises/leap/test/test_leap.c
trackler-2.2.1.35 tracks/c/exercises/leap/test/test_leap.c
trackler-2.2.1.34 tracks/c/exercises/leap/test/test_leap.c
trackler-2.2.1.33 tracks/c/exercises/leap/test/test_leap.c
trackler-2.2.1.32 tracks/c/exercises/leap/test/test_leap.c
trackler-2.2.1.31 tracks/c/exercises/leap/test/test_leap.c
trackler-2.2.1.30 tracks/c/exercises/leap/test/test_leap.c
trackler-2.2.1.29 tracks/c/exercises/leap/test/test_leap.c
trackler-2.2.1.28 tracks/c/exercises/leap/test/test_leap.c
trackler-2.2.1.27 tracks/c/exercises/leap/test/test_leap.c
trackler-2.2.1.26 tracks/c/exercises/leap/test/test_leap.c
trackler-2.2.1.25 tracks/c/exercises/leap/test/test_leap.c
trackler-2.2.1.24 tracks/c/exercises/leap/test/test_leap.c
trackler-2.2.1.23 tracks/c/exercises/leap/test/test_leap.c