From: <dar...@us...> - 2009-06-10 03:03:48
|
Revision: 4438 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4438&view=rev Author: darioquintana Date: 2009-06-10 03:03:46 +0000 (Wed, 10 Jun 2009) Log Message: ----------- Now passing in PostgreSQL, this RDBMS has a different precision. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/HQL/HQLFunctions.cs Modified: trunk/nhibernate/src/NHibernate.Test/HQL/HQLFunctions.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/HQL/HQLFunctions.cs 2009-06-09 23:08:08 UTC (rev 4437) +++ trunk/nhibernate/src/NHibernate.Test/HQL/HQLFunctions.cs 2009-06-10 03:03:46 UTC (rev 4438) @@ -596,7 +596,13 @@ hql = "select cast(7+123-5*a.BodyWeight as Double) from Animal a"; l = s.CreateQuery(hql).List(); Assert.AreEqual(1, l.Count); - Assert.AreEqual(7 + 123 - 5 * 1.3d, l[0]); + + if(Dialect is PostgreSQLDialect) + Assert.AreEqual(123.500000238419d, l[0]); + else + { + Assert.AreEqual(7 + 123 - 5 * 1.3d, l[0]); + } // Rendered in SELECT using a property and nested functions if (!(Dialect is Oracle8iDialect)) @@ -647,7 +653,13 @@ hql = "select cast(7+123-5*a.BodyWeight as Double) from Animal a group by cast(7+123-5*a.BodyWeight as Double)"; l = s.CreateQuery(hql).List(); Assert.AreEqual(1, l.Count); - Assert.AreEqual(7 + 123 - 5 * 1.3d, l[0]); + + if (Dialect is PostgreSQLDialect) + Assert.AreEqual(123.500000238419d, l[0]); + else + { + Assert.AreEqual(7 + 123 - 5 * 1.3d, l[0]); + } // Rendered in GROUP BY using a property and nested functions if (!(Dialect is Oracle8iDialect)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |