Skip to content

Commit 7eeee32

Browse files
committed
more fixes
1 parent 0d13632 commit 7eeee32

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

quill-core/src/test/scala/io/getquill/context/ContextMacroSpec.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ class ContextMacroSpec extends Spec {
270270
qr1.filter(t => t.s == lift("a"))
271271
}
272272
testContext.translate(q) mustEqual
273-
"""querySchema("TestEntity").filter(t => t.s == 'a')"""
273+
"""querySchema("TestEntity").filter(t => t.s == lift('a'))"""
274274
}
275275

276276
"value class" in {
@@ -279,35 +279,35 @@ class ContextMacroSpec extends Spec {
279279
query[Entity].filter(t => t.x == lift(ValueClass(1)))
280280
}
281281
testContext.translate(q) mustEqual
282-
"""querySchema("Entity").filter(t => t.x == 1)"""
282+
"""querySchema("Entity").filter(t => t.x == lift(ValueClass(1)))"""
283283
}
284284
"generic value class" in {
285285
case class Entity(x: GenericValueClass[Int])
286286
val q = quote {
287287
query[Entity].filter(t => t.x == lift(GenericValueClass(1)))
288288
}
289289
testContext.translate(q) mustEqual
290-
"""querySchema("Entity").filter(t => t.x == 1)"""
290+
"""querySchema("Entity").filter(t => t.x == lift(GenericValueClass(1)))"""
291291
}
292292
"sql" in {
293293
val q = quote {
294294
sql"SELECT ${lift("a")}".as[Query[String]]
295295
}
296-
testContext.translate(q) mustEqual s"""sql"SELECT $${'a'}".map(x => x)"""
296+
testContext.translate(q) mustEqual s"""sql"SELECT $${lift('a')}".map(x => x)"""
297297
}
298298
"dynamic" in {
299299
val q = quote {
300300
qr1.filter(t => t.s == lift("a"))
301301
}
302302
testContext.translate(q.dynamic) mustEqual
303-
"""querySchema("TestEntity").filter(t => t.s == 'a')"""
303+
"""querySchema("TestEntity").filter(t => t.s == lift('a'))"""
304304
}
305305
"dynamic type param" in {
306306
def test[T: SchemaMeta: QueryMeta] = quote {
307307
query[T].map(t => lift(1))
308308
}
309309
testContext.translate(test[TestEntity]) mustEqual
310-
"""querySchema("TestEntity").map(t => 1)"""
310+
"""querySchema("TestEntity").map(t => lift(1))"""
311311
}
312312
}
313313
"aggregated" in {

0 commit comments

Comments
 (0)