Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
guizmaii committed Sep 20, 2023
1 parent 1c02351 commit 1229821
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
8 changes: 8 additions & 0 deletions quill-sql/src/test/scala-2.12/io/getquill/Versions.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package io.getquill

/**
* Comes from https://discord.com/channels/632150470000902164/632150470000902166/1154004784806891571
*/
object Versions {
val scala = "2.13"
}
8 changes: 8 additions & 0 deletions quill-sql/src/test/scala-2.13/io/getquill/Versions.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package io.getquill

/**
* Comes from https://discord.com/channels/632150470000902164/632150470000902166/1154004784806891571
*/
object Versions {
val scala = "2.13"
}
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ class BooleanLiteralSupportSpec extends Spec {
// - Discord question: https://discord.com/channels/632150470000902164/632150470000902166/1153978338168291369
// - Discord answer: https://discord.com/channels/632150470000902164/632150470000902166/1153991217684697090
// - Be careful with Scala3: https://docs.scala-lang.org/tutorials/FAQ/index.html#i-want-scala-3-why-does-versionnumberstring-say-im-on-213
val isScala212 = scala.util.Properties.versionNumberString.startsWith("2.12")
val isScala212 = io.getquill.Versions.scala.startsWith("2.12")
val expectedQuery =
if (isScala212)
"SELECT t.s, t.i, t.l, t.o, t.b FROM TestEntity t WHERE NOT (1 = 1)"
Expand Down

0 comments on commit 1229821

Please sign in to comment.