Sha256: ad80a9ec5f3300b6a4462c3a4f24088b92370f2fbf40ac882c3d40fbb49baadf

Contents?: true

Size: 1.56 KB

Versions: 132

Compression:

Stored size: 1.56 KB

Contents

#include "vendor/unity.h"
#include "../src/isogram.h"
#include <stdlib.h>

void setUp(void)
{
}

void tearDown(void)
{
}

void test_empty_string(void)
{
   TEST_ASSERT_TRUE(is_isogram(""));
}

void test_lower_case_only(void)
{
   TEST_IGNORE();               // delete this line to run test
   TEST_ASSERT_TRUE(is_isogram("isogram"));
}

void test_duplicated_letter(void)
{
   TEST_IGNORE();
   TEST_ASSERT_FALSE(is_isogram("eleven"));
}

void test_longest_known_isogram(void)
{
   TEST_IGNORE();
   TEST_ASSERT_TRUE(is_isogram("subdermatoglyphic"));
}

void test_duplicated_letter_mixed_case(void)
{
   TEST_IGNORE();
   TEST_ASSERT_FALSE(is_isogram("Alphabet"));
}

void test_non_letter_char(void)
{
   TEST_IGNORE();
   TEST_ASSERT_TRUE(is_isogram("thumbscrew-japingly"));
}

void test_duplicated_non_letter_char(void)
{
   TEST_IGNORE();
   TEST_ASSERT_TRUE(is_isogram("Hjelmqvist-Gryb-Zock-Pfund-Wax"));
}

void test_multiple_whitespace(void)
{
   TEST_IGNORE();
   TEST_ASSERT_TRUE(is_isogram("Emily Jung Schwartzkopf"));
}

void test_duplicated_letter_within_word(void)
{
   TEST_IGNORE();
   TEST_ASSERT_FALSE(is_isogram("accentor"));
}

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

   RUN_TEST(test_empty_string);
   RUN_TEST(test_lower_case_only);
   RUN_TEST(test_duplicated_letter);
   RUN_TEST(test_longest_known_isogram);
   RUN_TEST(test_duplicated_letter_mixed_case);
   RUN_TEST(test_non_letter_char);
   RUN_TEST(test_duplicated_non_letter_char);
   RUN_TEST(test_multiple_whitespace);
   RUN_TEST(test_duplicated_letter_within_word);

   UnityEnd();
   return 0;
}

Version data entries

132 entries across 132 versions & 1 rubygems

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