1
exercism fetch rust pig-latin

tests/pig-latin.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
extern crate pig_latin as pl;

#[test]
fn test_word_beginning_with_a() {
    assert_eq!(pl::translate("apple"), "appleay");
}

#[test]
#[ignore]
fn test_word_beginning_with_e() {
    assert_eq!(pl::translate("ear"), "earay");
}

#[test]
#[ignore]
fn test_word_beginning_with_i() {
    assert_eq!(pl::translate("igloo"), "iglooay");
}

#[test]
#[ignore]
fn test_word_beginning_with_o() {
    assert_eq!(pl::translate("object"), "objectay");
}

#[test]
#[ignore]
fn test_word_beginning_with_u() {
    assert_eq!(pl::translate("under"), "underay");
}

#[test]
#[ignore]
fn test_word_beginning_with_a_vowel_and_followed_by_a_qu() {
    assert_eq!(pl::translate("equal"), "equalay");
}

#[test]
#[ignore]
fn test_word_beginning_with_p() {
    assert_eq!(pl::translate("pig"), "igpay");
}

#[test]
#[ignore]
fn test_word_beginning_with_k() {
    assert_eq!(pl::translate("koala"), "oalakay");
}

#[test]
#[ignore]
fn test_word_beginning_with_y() {
    assert_eq!(pl::translate("yellow"), "ellowyay");
}

#[test]
#[ignore]
fn test_word_beginning_with_x() {
    assert_eq!(pl::translate("xenon"), "enonxay");
}

#[test]
#[ignore]
fn test_word_beginning_with_q_without_a_following_u() {
    assert_eq!(pl::translate("qat"), "atqay");
}

#[test]
#[ignore]
fn test_word_beginning_with_ch() {
    assert_eq!(pl::translate("chair"), "airchay");
}

#[test]
#[ignore]
fn test_word_beginning_with_qu() {
    assert_eq!(pl::translate("queen"), "eenquay");
}

#[test]
#[ignore]
fn test_word_beginning_with_qu_and_a_preceding_consonant() {
    assert_eq!(pl::translate("square"), "aresquay");
}

#[test]
#[ignore]
fn test_word_beginning_with_th() {
    assert_eq!(pl::translate("therapy"), "erapythay");
}

#[test]
#[ignore]
fn test_word_beginning_with_thr() {
    assert_eq!(pl::translate("thrush"), "ushthray");
}

#[test]
#[ignore]
fn test_word_beginning_with_sch() {
    assert_eq!(pl::translate("school"), "oolschay");
}

#[test]
#[ignore]
fn test_word_beginning_with_yt() {
    assert_eq!(pl::translate("yttria"), "yttriaay");
}

#[test]
#[ignore]
fn test_word_beginning_with_xr() {
    assert_eq!(pl::translate("xray"), "xrayay");
}

#[test]
#[ignore]
fn test_a_whole_phrase() {
    assert_eq!(pl::translate("quick fast run"), "ickquay astfay unray");
}