File tree Expand file tree Collapse file tree
main/resources/rules/weight
test/kotlin/xyz/javecs/tools/text2expr/test/kotlin/rules/weight Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ x=P2?数(1)
2+ SF:ポンド|"lb"
3+ SF?キログラム|"kg"|"kg"
4+
5+ kg = x * 0.45359237
6+ format(kg, 5)
Original file line number Diff line number Diff line change 1+ package xyz.javecs.tools.text2expr.test.kotlin.rules.weight
2+
3+ import org.junit.Test
4+ import xyz.javecs.tools.text2expr.Text2Expr
5+ import kotlin.test.assertEquals
6+
7+ class WeightTest {
8+
9+ val text2Expr = Text2Expr ()
10+
11+ @Test fun poundToKilogram1 () {
12+ assertEquals(" 0.45359" , text2Expr.eval(" 1ポンドは、なんキログラム?" ))
13+ assertEquals(" 0.45359" , text2Expr.eval(" ポンドは、なんキログラム?" ))
14+ assertEquals(" 0.45359" , text2Expr.eval(" 1lbは、なんkg?" ))
15+ assertEquals(" 0.45359" , text2Expr.eval(" 1lbをkgにしたら" ))
16+ assertEquals(" 0.45359" , text2Expr.eval(" 1ポンド?" ))
17+ }
18+
19+ }
You can’t perform that action at this time.
0 commit comments