diff options
| author | Boyang Han | 2021-06-23 17:14:03 +0800 |
|---|---|---|
| committer | Jiuyang Liu | 2021-06-23 17:56:31 +0800 |
| commit | aaccf17799fdbbb9810e424ab8b246d9a5ff5c70 (patch) | |
| tree | 28ca4224c8700f5d34c3d453bdffb97067994991 /src/test/scala/chiselTests | |
| parent | 942218432a80de1546ed53a4cfb10a8683ff4f27 (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.scala | 5 |
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) = { |
