improve test reporting information a bit
This commit is contained in:
@@ -3281,8 +3281,8 @@ struct
|
|||||||
val {rightLines, rightStrings, ...} = goToStart buffer
|
val {rightLines, rightStrings, ...} = goToStart buffer
|
||||||
|
|
||||||
val textLength = #textLength buffer
|
val textLength = #textLength buffer
|
||||||
val textLengthIsCorrect =
|
val correctTextLength = String.size (String.concat rightStrings)
|
||||||
textLength = String.size (String.concat rightStrings)
|
val textLengthIsCorrect = textLength = correctTextLength
|
||||||
|
|
||||||
val lineLength = #lineLength buffer
|
val lineLength = #lineLength buffer
|
||||||
val correctLineLength = Vector.length (Vector.concat rightLines)
|
val correctLineLength = Vector.length (Vector.concat rightLines)
|
||||||
@@ -3315,7 +3315,24 @@ struct
|
|||||||
, "text length: "
|
, "text length: "
|
||||||
, Int.toString textLength
|
, Int.toString textLength
|
||||||
, "; correct length: "
|
, "; correct length: "
|
||||||
, Int.toString correctIdx
|
, Int.toString correctTextLength
|
||||||
|
, "\n"
|
||||||
|
]
|
||||||
|
in
|
||||||
|
print msg
|
||||||
|
end
|
||||||
|
|
||||||
|
val _ =
|
||||||
|
if lineLengthIsCorrect then
|
||||||
|
print "lineLength is correct\n"
|
||||||
|
else
|
||||||
|
let
|
||||||
|
val msg = String.concat
|
||||||
|
[ "line length is incorrect;"
|
||||||
|
, "line length: "
|
||||||
|
, Int.toString lineLength
|
||||||
|
, "; correct length: "
|
||||||
|
, Int.toString correctLineLength
|
||||||
, "\n"
|
, "\n"
|
||||||
]
|
]
|
||||||
in
|
in
|
||||||
|
|||||||
Reference in New Issue
Block a user