-
Notifications
You must be signed in to change notification settings - Fork 0
/
TestNiceString.kt
170 lines (115 loc) · 3.78 KB
/
TestNiceString.kt
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
package nicestring
import org.junit.Assert
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runners.MethodSorters
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
class TestNiceString {
private fun testNiceString(string: String, expected: Boolean) {
Assert.assertEquals("Wrong result for \"$string\".isNice()", expected, string.isNice())
}
@Test
fun testExample1() = testNiceString("bac", false)
@Test
fun testExample2() = testNiceString("aza", false)
@Test
fun testExample3() = testNiceString("abaca", false)
@Test
fun testExample4() = testNiceString("baaa", true)
@Test
fun testExample5() = testNiceString("aaab", true)
@Test
fun testNice01() = testNiceString("geaa", true)
@Test
fun testNice02() = testNiceString("ynzz", true)
@Test
fun testNice03() = testNiceString("ijao", true)
@Test
fun testNice04() = testNiceString("nn", true)
@Test
fun testNice05() = testNiceString("zuu", true)
@Test
fun testNice06() = testNiceString("uaa", true)
@Test
fun testNice07() = testNiceString("upui", true)
@Test
fun testNice08() = testNiceString("oouh", true)
@Test
fun testNice09() = testNiceString("wddf", true)
@Test
fun testNice10() = testNiceString("baii", true)
@Test
fun testNice11() = testNiceString("obee", true)
@Test
fun testNice12() = testNiceString("beiuu", true)
@Test
fun testNice13() = testNiceString("uyyxqptkvbtz", true)
@Test
fun testNice14() = testNiceString("limseelx", true)
@Test
fun testNice15() = testNiceString("zwhueqe", true)
@Test
fun testNice16() = testNiceString("iwuvevd", true)
@Test
fun testNice17() = testNiceString("qcdpogyeti", true)
@Test
fun testNice18() = testNiceString("ygmuuyuj", true)
@Test
fun testNice19() = testNiceString("cuimjyyakh", true)
@Test
fun testNice20() = testNiceString("eufalmmwwbnid", true)
@Test
fun testNice21() = testNiceString("kbzstzwhjeestb", true)
@Test
fun testNice22() = testNiceString("rdfieknqrwxx", true)
@Test
fun testNice23() = testNiceString("mzhevzkmmz", true)
@Test
fun testNice24() = testNiceString("mzhevzkmmz", true)
@Test
fun testNice25() = testNiceString("jootdvhbesdns", true)
@Test
fun testNice26() = testNiceString("crncuotgburrcv", true)
@Test
fun testNice27() = testNiceString("burppqqeivsrw", true)
@Test
fun testNotNice1() = testNiceString("", false)
@Test
fun testNotNice2() = testNiceString("hfrcnykh", false)
@Test
fun testNotNice3() = testNiceString("qc", false)
@Test
fun testNotNice4() = testNiceString("ymsetecw", false)
@Test
fun testNotNice5() = testNiceString("bei", false)
@Test
fun testNotNice6() = testNiceString("mbalqw", false)
@Test
fun testNotNice7() = testNiceString("bekqe", false)
@Test
fun testNotNice8() = testNiceString("luosbaqzdh", false)
@Test
fun testNotNice9() = testNiceString("zcgsdbuxeo", false)
@Test
fun testNotNice10() = testNiceString("bukipcmju", false)
@Test
fun testNotNice11() = testNiceString("sisxxjwlkbu", false)
@Test
fun testNotNice12() = testNiceString("bawbxffum", false)
@Test
fun testNotNice13() = testNiceString("bbau", false)
@Test
fun testNotNice14() = testNiceString("ax", false)
@Test
fun testNotNice15() = testNiceString("baa", false)
@Test
fun testNotNice16() = testNiceString("aebe", false)
@Test
fun testNotNice17() = testNiceString("bbau", false)
@Test
fun testNotNice18() = testNiceString("uibe", false)
@Test
fun testNotNice19() = testNiceString("srxn", false)
@Test
fun testNotNice20() = testNiceString("wvad", false)
}