Skip to content

Commit

Permalink
Update test_pig_latin.c
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanplusplus authored Jan 12, 2025
1 parent a80d44a commit cb76c1a
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions exercises/practice/pig-latin/test_pig_latin.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,148 +14,148 @@ void tearDown(void)
res = NULL;
}

static void check_transate(const char *phrase, const char *expected)
static void check_translate(const char *phrase, const char *expected)
{
res = translate(phrase);
TEST_ASSERT_EQUAL_STRING(expected, res);
}

static void test_word_beginning_with_a(void)
{
check_transate("apple", "appleay");
check_translate("apple", "appleay");
}

static void test_word_beginning_with_e(void)
{
TEST_IGNORE(); // delete this line to run test
check_transate("ear", "earay");
check_translate("ear", "earay");
}

static void test_word_beginning_with_i(void)
{
TEST_IGNORE();
check_transate("igloo", "iglooay");
check_translate("igloo", "iglooay");
}

static void test_word_beginning_with_o(void)
{
TEST_IGNORE();
check_transate("object", "objectay");
check_translate("object", "objectay");
}

static void test_word_beginning_with_u(void)
{
TEST_IGNORE();
check_transate("under", "underay");
check_translate("under", "underay");
}

static void test_word_beginning_with_a_vowel_and_followed_by_a_qu(void)
{
TEST_IGNORE();
check_transate("equal", "equalay");
check_translate("equal", "equalay");
}

static void test_word_beginning_with_p(void)
{
TEST_IGNORE();
check_transate("pig", "igpay");
check_translate("pig", "igpay");
}

static void test_word_beginning_with_k(void)
{
TEST_IGNORE();
check_transate("koala", "oalakay");
check_translate("koala", "oalakay");
}

static void test_word_beginning_with_x(void)
{
TEST_IGNORE();
check_transate("xenon", "enonxay");
check_translate("xenon", "enonxay");
}

static void test_word_beginning_with_q_without_a_following_u(void)
{
TEST_IGNORE();
check_transate("qat", "atqay");
check_translate("qat", "atqay");
}

static void test_word_beginning_with_consonant_and_vowel_containing_qu(void)
{
TEST_IGNORE();
check_transate("liquid", "iquidlay");
check_translate("liquid", "iquidlay");
}

static void test_word_beginning_with_ch(void)
{
TEST_IGNORE();
check_transate("chair", "airchay");
check_translate("chair", "airchay");
}

static void test_word_beginning_with_qu(void)
{
TEST_IGNORE();
check_transate("queen", "eenquay");
check_translate("queen", "eenquay");
}

static void test_word_beginning_with_qu_and_a_preceding_consonant(void)
{
TEST_IGNORE();
check_transate("square", "aresquay");
check_translate("square", "aresquay");
}

static void test_word_beginning_with_th(void)
{
TEST_IGNORE();
check_transate("therapy", "erapythay");
check_translate("therapy", "erapythay");
}

static void test_word_beginning_with_thr(void)
{
TEST_IGNORE();
check_transate("thrush", "ushthray");
check_translate("thrush", "ushthray");
}

static void test_word_beginning_with_sch(void)
{
TEST_IGNORE();
check_transate("school", "oolschay");
check_translate("school", "oolschay");
}

static void test_word_beginning_with_yt(void)
{
TEST_IGNORE();
check_transate("yttria", "yttriaay");
check_translate("yttria", "yttriaay");
}

static void test_word_beginning_with_xr(void)
{
TEST_IGNORE();
check_transate("xray", "xrayay");
check_translate("xray", "xrayay");
}

static void test_y_is_treated_like_a_consonant_at_the_beginning_of_a_word(void)
{
TEST_IGNORE();
check_transate("yellow", "ellowyay");
check_translate("yellow", "ellowyay");
}

static void
test_y_is_treated_like_a_vowel_at_the_end_of_a_consonant_cluster(void)
{
TEST_IGNORE();
check_transate("rhythm", "ythmrhay");
check_translate("rhythm", "ythmrhay");
}

static void test_y_as_second_letter_in_two_letter_word(void)
{
TEST_IGNORE();
check_transate("my", "ymay");
check_translate("my", "ymay");
}

static void test_a_whole_phrase(void)
{
TEST_IGNORE();
check_transate("quick fast run", "ickquay astfay unray");
check_translate("quick fast run", "ickquay astfay unray");
}

int main(void)
Expand Down

0 comments on commit cb76c1a

Please sign in to comment.