summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests
diff options
context:
space:
mode:
authorBoyang Han2021-06-23 17:14:03 +0800
committerJiuyang Liu2021-06-23 17:56:31 +0800
commitaaccf17799fdbbb9810e424ab8b246d9a5ff5c70 (patch)
tree28ca4224c8700f5d34c3d453bdffb97067994991 /src/test/scala/chiselTests
parent942218432a80de1546ed53a4cfb10a8683ff4f27 (diff)
Replace hard coded line separators with system specific ones
Diffstat (limited to 'src/test/scala/chiselTests')
-rw-r--r--src/test/scala/chiselTests/SMTModelCheckingSpec.scala5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/scala/chiselTests/SMTModelCheckingSpec.scala b/src/test/scala/chiselTests/SMTModelCheckingSpec.scala
index 6a24ff10..0a752b10 100644
--- a/src/test/scala/chiselTests/SMTModelCheckingSpec.scala
+++ b/src/test/scala/chiselTests/SMTModelCheckingSpec.scala
@@ -9,6 +9,7 @@ import firrtl.util.BackendCompilationUtilities.timeStamp
import logger.{LazyLogging, LogLevel, LogLevelAnnotation}
import org.scalatest.flatspec.AnyFlatSpec
import os._
+import scala.util.Properties
/** [[SMTModelCheckingSpec]] use z3 and [[firrtl.backends.experimental.smt]] library
* to solve `assert/assume` in [[chisel3.experimental.verification]],
@@ -64,8 +65,8 @@ private object Z3ModelChecker extends LazyLogging {
private def executeStep(path: Path): Boolean = {
val (out, ret) = executeCmd(path.toString)
assert(ret == 0, s"expected success (0), not $ret: `$out`\nz3 ${path.toString}")
- assert(out == "sat\n" || out == "unsat\n", s"Unexpected output: $out")
- out == "unsat\n"
+ assert(out == "sat" + Properties.lineSeparator || out == "unsat" + Properties.lineSeparator, s"Unexpected output: $out")
+ out == "unsat" + Properties.lineSeparator
}
private def executeCmd(cmd: String): (String, Int) = {