Skip to content

Commit 6cf07c6

Browse files
jad-hamzaregb
authored andcommitted
Minor changes and upgrade to Scala 2.13.1
1 parent 0dfbc83 commit 6cf07c6

File tree

9 files changed

+12
-13
lines changed

9 files changed

+12
-13
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ target
22

33
.*.swp
44
*~
5+
6+
.metals

build.sbt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ javaOptions in IntegrationTest ++= Seq("-Xss128M")
1414

1515
fork in IntegrationTest := true
1616

17-
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.1" % "test,it"
17+
libraryDependencies += "org.scalatest" %% "scalatest" % "3.1.0-RC3" % "test"
1818

1919
logBuffered in IntegrationTest := false
2020

@@ -23,8 +23,8 @@ parallelExecution in Test := true
2323
lazy val commonSettings = Seq(
2424
organization := "com.regblanc",
2525
name := "scala-smtlib",
26-
scalaVersion := "2.11.8",
27-
crossScalaVersions := Seq("2.10.4", "2.11.8", "2.12.1")
26+
scalaVersion := "2.13.1",
27+
crossScalaVersions := Seq("2.10.4", "2.11.8", "2.12.1", "2.13.1")
2828
)
2929

3030
lazy val root = (project in file(".")).

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=0.13.7
1+
sbt.version=1.3.3

project/plugins.sbt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.8.5")
2-
3-
// avoids warning from sbt-git, see https://github.com/sbt/sbt-git#known-issues
4-
libraryDependencies += "org.slf4j" % "slf4j-nop" % "1.7.21"
1+
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0")

src/main/scala/smtlib/common/Binary.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Binary private(val digits: List[Boolean]) {
1616

1717
def toLongBits: Long = {
1818
val allReversedBits: List[Boolean] = digits.take(64).reverse.padTo(64, false)
19-
allReversedBits.foldRight(0l)((bit, bits) => ((bits<<1) | (if(bit) 1 else 0)))
19+
allReversedBits.foldRight(0L)((bit, bits) => ((bits<<1) | (if(bit) 1 else 0)))
2020
}
2121

2222
//transform to a 32 bits integer, respecting 2 complements

src/main/scala/smtlib/common/Hexadecimal.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ object Hexadecimal {
113113
while(i < 8) {
114114
val end = rest & 15
115115
rest = rest >> 4
116-
repr = toDigit(end) + repr
116+
repr = s"${toDigit(end)}$repr"
117117
i += 1
118118
}
119119

src/main/scala/smtlib/parser/ParserCommands.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ trait ParserCommands { this: ParserCommon with ParserTerms =>
219219
constructors.append(parseConstructor)
220220
}
221221
eat(Tokens.CParen)
222-
(name, constructors)
222+
(name, constructors.toSeq)
223223
}
224224

225225
def parseConstructor: Constructor = {

src/main/scala/smtlib/printer/PrintingContext.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class PrintingContext(writer: Writer) {
103103

104104
protected def printString(value: String): Unit = {
105105
print("\"")
106-
print(value.flatMap(c => if (c == '"') "\"\"" else List(c)))
106+
print(value.replaceAll("\"", "\"\""))
107107
print("\"")
108108
}
109109

src/test/scala/smtlib/parser/CommandsResponsesParserTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ class CommandsResponsesParserTests extends FunSuite {
341341
/*
342342
* TODO: the standard requires at least one value, currently we return empty list
343343
*/
344-
ignore("get-value response must contains at least one valuation pair") {
344+
ignore("get-value response must contain at least one valuation pair") {
345345
intercept[UnexpectedTokenException] {
346346
Parser.fromString("()").parseGetValueResponse
347347
}

0 commit comments

Comments
 (0)