mirror of
https://github.com/KarolS/millfork.git
synced 2025-01-03 19:31:02 +00:00
Better error reporting in arithmetic tests
This commit is contained in:
parent
b0df56c8c0
commit
0af9bc4696
@ -194,7 +194,7 @@ class ByteMathSuite extends FunSuite with Matchers with AppendedClues {
|
||||
| output = a * $y
|
||||
| }
|
||||
""".
|
||||
stripMargin)(_.readByte(0xc000) should equal(x * y) withClue s"$x * $y")
|
||||
stripMargin)(_.readByte(0xc000) should equal(x * y) withClue s"= $x * $y")
|
||||
}
|
||||
|
||||
test("Byte multiplication 2") {
|
||||
@ -326,10 +326,10 @@ class ByteMathSuite extends FunSuite with Matchers with AppendedClues {
|
||||
| byte f() {return $x}
|
||||
""".
|
||||
stripMargin) { m =>
|
||||
m.readByte(0xc000) should equal(x / y) withClue s"$x / $y"
|
||||
m.readByte(0xc001) should equal(x % y) withClue s"$x %% $y"
|
||||
m.readByte(0xc002) should equal(x / y) withClue s"$x / $y"
|
||||
m.readByte(0xc003) should equal(x % y) withClue s"$x %% $y"
|
||||
m.readByte(0xc000) should equal(x / y) withClue s"= $x / $y"
|
||||
m.readByte(0xc001) should equal(x % y) withClue s"= $x %% $y"
|
||||
m.readByte(0xc002) should equal(x / y) withClue s"= $x / $y"
|
||||
m.readByte(0xc003) should equal(x % y) withClue s"= $x %% $y"
|
||||
}
|
||||
}
|
||||
|
||||
@ -371,10 +371,10 @@ class ByteMathSuite extends FunSuite with Matchers with AppendedClues {
|
||||
| noinline byte g() = $y
|
||||
""".
|
||||
stripMargin) { m =>
|
||||
m.readByte(0xc000) should equal(x / y) withClue s"$x / $y"
|
||||
m.readByte(0xc001) should equal(x % y) withClue s"$x %% $y"
|
||||
m.readByte(0xc002) should equal(x / y) withClue s"$x / $y"
|
||||
m.readByte(0xc003) should equal(x % y) withClue s"$x %% $y"
|
||||
m.readByte(0xc000) should equal(x / y) withClue s"= $x / $y"
|
||||
m.readByte(0xc001) should equal(x % y) withClue s"= $x %% $y"
|
||||
m.readByte(0xc002) should equal(x / y) withClue s"= $x / $y"
|
||||
m.readByte(0xc003) should equal(x % y) withClue s"= $x %% $y"
|
||||
}
|
||||
}
|
||||
|
||||
@ -430,10 +430,10 @@ class ByteMathSuite extends FunSuite with Matchers with AppendedClues {
|
||||
| noinline byte g() {return $x}
|
||||
""".
|
||||
stripMargin) { m =>
|
||||
m.readByte(0xc000) should equal(x / y) withClue s"$x / $y"
|
||||
m.readByte(0xc001) should equal(x % y) withClue s"$x %% $y"
|
||||
m.readByte(0xc002) should equal(x / y) withClue s"$x / $y"
|
||||
m.readByte(0xc003) should equal(x % y) withClue s"$x %% $y"
|
||||
m.readByte(0xc000) should equal(x / y) withClue s"= $x / $y"
|
||||
m.readByte(0xc001) should equal(x % y) withClue s"= $x %% $y"
|
||||
m.readByte(0xc002) should equal(x / y) withClue s"= $x / $y"
|
||||
m.readByte(0xc003) should equal(x % y) withClue s"= $x %% $y"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -401,7 +401,7 @@ class WordMathSuite extends FunSuite with Matchers with AppendedClues {
|
||||
| output *= $y
|
||||
| }
|
||||
""".
|
||||
stripMargin)(_.readWord(0xc000) should equal(x * y) withClue s"$x * $y")
|
||||
stripMargin)(_.readWord(0xc000) should equal(x * y) withClue s"= $x * $y")
|
||||
}
|
||||
|
||||
test("Not-in-place word/byte multiplication") {
|
||||
@ -443,8 +443,8 @@ class WordMathSuite extends FunSuite with Matchers with AppendedClues {
|
||||
| }
|
||||
""".
|
||||
stripMargin) { m =>
|
||||
m.readWord(0xc000) should equal(x * y) withClue s"$y * $x"
|
||||
m.readWord(0xc004) should equal(x * y) withClue s"$x * $y"
|
||||
m.readWord(0xc000) should equal(x * y) withClue s"= $y * $x"
|
||||
m.readWord(0xc004) should equal(x * y) withClue s"= $x * $y"
|
||||
}
|
||||
}
|
||||
|
||||
@ -581,10 +581,10 @@ class WordMathSuite extends FunSuite with Matchers with AppendedClues {
|
||||
| noinline word g() {return $x}
|
||||
""".
|
||||
stripMargin) { m =>
|
||||
m.readWord(0xc000) should equal(x / y) withClue s"$x / $y"
|
||||
m.readByte(0xc002) should equal(x % y) withClue s"$x %% $y"
|
||||
m.readWord(0xc004) should equal(x / y) withClue s"$x / $y"
|
||||
m.readByte(0xc006) should equal(x % y) withClue s"$x %% $y"
|
||||
m.readWord(0xc000) should equal(x / y) withClue s"= $x / $y"
|
||||
m.readByte(0xc002) should equal(x % y) withClue s"= $x %% $y"
|
||||
m.readWord(0xc004) should equal(x / y) withClue s"= $x / $y"
|
||||
m.readByte(0xc006) should equal(x % y) withClue s"= $x %% $y"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user