Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
Replace hard coded line separators with system specific ones
Browse files Browse the repository at this point in the history
  • Loading branch information
yqszxx committed Jul 7, 2021
1 parent 11128d9 commit 2563e48
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import org.scalatest.matchers.must.Matchers
import os._

import scala.sys.process._
import scala.util.Properties

class EndToEndSMTSpec extends EndToEndSMTBaseSpec with LazyLogging {
"we" should "check if Z3 is available" taggedAs (RequiresZ3) in {
Expand Down Expand Up @@ -186,8 +187,11 @@ 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) = {
Expand Down

0 comments on commit 2563e48

Please sign in to comment.