Skip to content

Commit

Permalink
Fix another tests
Browse files Browse the repository at this point in the history
  • Loading branch information
deusaquilus committed Dec 5, 2024
1 parent 5dcd45a commit 86fbfc6
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,14 @@ class QueryMacroSpec extends Spec {
qr1.filter(t => t.i == lift(1)).map(t => t.i)
}
testContext.translate(q) mustEqual
"""querySchema("TestEntity").filter(t => t.i == 1).map(t => t.i)"""
"""querySchema("TestEntity").filter(t => t.i == lift(1)).map(t => t.i)"""
}
"two" in {
val q = quote {
qr1.filter(t => t.i == lift(1) && t.s == lift("a")).map(t => t.i)
}
testContext.translate(q) mustEqual
"""querySchema("TestEntity").filter(t => (t.i == 1) && (t.s == 'a')).map(t => t.i)"""
"""querySchema("TestEntity").filter(t => (t.i == lift(1)) && (t.s == lift('a'))).map(t => t.i)"""
}
"nested" in {
val c = quote { (t: TestEntity) =>
Expand All @@ -122,7 +122,7 @@ class QueryMacroSpec extends Spec {
qr1.filter(t => c(t) && t.s == lift("a")).map(t => t.i)
}
testContext.translate(q) mustEqual
"""querySchema("TestEntity").filter(t => (t.i == 1) && (t.s == 'a')).map(t => t.i)"""
"""querySchema("TestEntity").filter(t => (t.i == lift(1)) && (t.s == lift('a'))).map(t => t.i)"""
}
}
"dynamic" - {
Expand All @@ -131,14 +131,14 @@ class QueryMacroSpec extends Spec {
qr1.filter(t => t.i == lift(1)).map(t => t.i)
}
testContext.translate(q.dynamic) mustEqual
"""querySchema("TestEntity").filter(t => t.i == 1).map(t => t.i)"""
"""querySchema("TestEntity").filter(t => t.i == lift(1)).map(t => t.i)"""
}
"two" in {
val q = quote {
qr1.filter(t => t.i == lift(1) && t.s == lift("a")).map(t => t.i)
}
val r = testContext.translate(q.dynamic) mustEqual
"""querySchema("TestEntity").filter(t => (t.i == 1) && (t.s == 'a')).map(t => t.i)"""
"""querySchema("TestEntity").filter(t => (t.i == lift(1)) && (t.s == lift('a'))).map(t => t.i)"""
}
"nested" in {
val c = quote { (t: TestEntity) =>
Expand All @@ -148,7 +148,7 @@ class QueryMacroSpec extends Spec {
qr1.filter(t => c(t) && t.s == lift("a")).map(t => t.i)
}
testContext.translate(q.dynamic) mustEqual
"""querySchema("TestEntity").filter(t => (t.i == 1) && (t.s == 'a')).map(t => t.i)"""
"""querySchema("TestEntity").filter(t => (t.i == lift(1)) && (t.s == lift('a'))).map(t => t.i)"""
}
}
}
Expand Down

0 comments on commit 86fbfc6

Please sign in to comment.