File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/test/scala/test/integration Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import tyql.Dialect.ansi.given
1111class PrecedenceTests extends FunSuite {
1212 def expectB (expected : Boolean )(rs : ResultSet ) = assertEquals(rs.getBoolean(1 ), expected)
1313 def expectI (expected : Int )(rs : ResultSet ) = assertEquals(rs.getInt(1 ), expected)
14+ def expectD (expected : Double )(rs : ResultSet ) = assertEquals(rs.getDouble(1 ), expected)
1415
1516 val t = tyql.True
1617 val f = tyql.False
@@ -71,11 +72,10 @@ class PrecedenceTests extends FunSuite {
7172 checkExprDialect[Boolean ](t ^ t || f, expectB(false ))(withDB.all)
7273 }
7374
74- test(" integer precedence -- division and subtraction" .ignore) {
75- // TODO we currently do not handle / as it's very dialect specific and not yet implemented
76- // checkExprDialect[Int](i3 / i1 - i2, expectI(2))(withDB.all)
77- // checkExprDialect[Int](i3 - i1 / i2, expectI(2))(withDB.all)
78- // checkExprDialect[Int](i3 / (i1 - i2), expectI(-3))(withDB.all)
75+ test(" integer precedence -- division and subtraction" ) {
76+ checkExprDialect[Double ](i3 / i1 - i2.asDouble, expectD(1.0 ))(withDB.all)
77+ checkExprDialect[Double ](i3.asDouble - i1 / i2, expectD(2.5 ))(withDB.all)
78+ checkExprDialect[Double ](i3 / (i1 - i2), expectD(- 3.0 ))(withDB.all)
7979 }
8080
8181 test(" mixed precedence -- arithmetic with boolean" ) {
You can’t perform that action at this time.
0 commit comments