From 615c18797b556e8498b5611a967dfd99cd95e142 Mon Sep 17 00:00:00 2001 From: jules Ivanic Date: Wed, 20 Sep 2023 14:50:01 +0400 Subject: [PATCH] Fix test --- quill-sql/src/test/scala-2.12/io.getquill/Versions.scala | 8 ++++++++ quill-sql/src/test/scala-2.13/io.getquill/Versions.scala | 8 ++++++++ .../context/sql/idiom/BooleanLiteralSupportSpec.scala | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 quill-sql/src/test/scala-2.12/io.getquill/Versions.scala create mode 100644 quill-sql/src/test/scala-2.13/io.getquill/Versions.scala diff --git a/quill-sql/src/test/scala-2.12/io.getquill/Versions.scala b/quill-sql/src/test/scala-2.12/io.getquill/Versions.scala new file mode 100644 index 0000000000..b9802f192f --- /dev/null +++ b/quill-sql/src/test/scala-2.12/io.getquill/Versions.scala @@ -0,0 +1,8 @@ +package io.getquill + +/** + * Comes from https://discord.com/channels/632150470000902164/632150470000902166/1154004784806891571 + */ +object Versions { + val scala = "2.12" +} \ No newline at end of file diff --git a/quill-sql/src/test/scala-2.13/io.getquill/Versions.scala b/quill-sql/src/test/scala-2.13/io.getquill/Versions.scala new file mode 100644 index 0000000000..007c6a0eff --- /dev/null +++ b/quill-sql/src/test/scala-2.13/io.getquill/Versions.scala @@ -0,0 +1,8 @@ +package io.getquill + +/** + * Comes from https://discord.com/channels/632150470000902164/632150470000902166/1154004784806891571 + */ +object Versions { + val scala = "2.13" +} \ No newline at end of file diff --git a/quill-sql/src/test/scala/io/getquill/context/sql/idiom/BooleanLiteralSupportSpec.scala b/quill-sql/src/test/scala/io/getquill/context/sql/idiom/BooleanLiteralSupportSpec.scala index 722a76729f..d77f2f9519 100644 --- a/quill-sql/src/test/scala/io/getquill/context/sql/idiom/BooleanLiteralSupportSpec.scala +++ b/quill-sql/src/test/scala/io/getquill/context/sql/idiom/BooleanLiteralSupportSpec.scala @@ -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)"