Sha256: 3eb422eefedd98e6c7d11a9dceccb8be679d557266597849b472e7794a029555

Contents?: true

Size: 1.32 KB

Versions: 57

Compression:

Stored size: 1.32 KB

Contents

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

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

void test_lower_case_only(void)
{
   TEST_ASSERT_TRUE(isIsogram("isogram"));
}

void test_duplicated_letter(void)
{
   TEST_ASSERT_FALSE(isIsogram("eleven"));
}

void test_longest_known_isogram(void)
{
   TEST_ASSERT_TRUE(isIsogram("subdermatoglyphic"));
}

void test_duplicated_letter_mixed_case(void)
{
   TEST_ASSERT_FALSE(isIsogram("Alphabet"));
}

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

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

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

void test_duplicated_letter_within_word(void)
{
   TEST_ASSERT_FALSE(isIsogram("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

57 entries across 57 versions & 1 rubygems

Version Path
trackler-2.2.1.22 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.21 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.20 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.19 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.18 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.17 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.16 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.15 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.14 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.13 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.12 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.11 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.10 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.9 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.8 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.7 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.6 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.5 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.4 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.3 tracks/c/exercises/isogram/test/test_isogram.c