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.42 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.41 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.40 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.39 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.38 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.37 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.36 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.35 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.34 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.33 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.32 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.31 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.30 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.29 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.28 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.27 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.26 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.25 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.24 tracks/c/exercises/isogram/test/test_isogram.c
trackler-2.2.1.23 tracks/c/exercises/isogram/test/test_isogram.c