Bimba.git

ref: 409f8c666e49deb35b70006171a63b3aaaaae012

app/src/androidTest/java/xyz/apiote/bimba/czwek/units/TGMKtTest.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
package xyz.apiote.bimba.czwek.units

import androidx.test.platform.app.InstrumentationRegistry
import org.junit.Test

class TGMKtTest {
	@Test
	fun toDozenalString0(){
		val i = 0
		val context = InstrumentationRegistry.getInstrumentation().targetContext
		assert(i.toDozenalString(context) == "zero") { "got ${i.toDozenalString(context)}, wanted zero" }
	}

	@Test
	fun toDozenalString1(){
		val i = 1
		val context = InstrumentationRegistry.getInstrumentation().targetContext
		assert(i.toDozenalString(context) == "one") { "got ${i.toDozenalString(context)}, wanted one" }
	}

	@Test
	fun toDozenalString10(){
		val i = 12
		val context = InstrumentationRegistry.getInstrumentation().targetContext
		assert(i.toDozenalString(context) == "one zen") { "got ${i.toDozenalString(context)}, wanted one zen" }
	}

	@Test
	fun toDozenalString100(){
		val i = 144
		val context = InstrumentationRegistry.getInstrumentation().targetContext
		assert(i.toDozenalString(context) == "one duna") { "got ${i.toDozenalString(context)}, wanted one duna" }
	}

	@Test
	fun toDozenalString23(){
		val i = 27
		val context = InstrumentationRegistry.getInstrumentation().targetContext
		assert(i.toDozenalString(context) == "two zen three") { "got ${i.toDozenalString(context)}, wanted two zen three" }
	}

	@Test
	fun toDozenalString234(){
		val i = 328
		val context = InstrumentationRegistry.getInstrumentation().targetContext
		assert(i.toDozenalString(context) == "two duna three zen four") { "got ${i.toDozenalString(context)}, wanted two duna three zen four" }
	}

	@Test
	fun toDozenalString204(){
		val i = 292
		val context = InstrumentationRegistry.getInstrumentation().targetContext
		assert(i.toDozenalString(context) == "two duna four") { "got ${i.toDozenalString(context)}, wanted two duna four" }
	}
}