Changeset: e4ac4adbfd3d for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e4ac4adbfd3d Modified Files: sql/test/pg_regress/Tests/float8.sql sql/test/pg_regress/Tests/float8.stable.err sql/test/pg_regress/Tests/float8.stable.err.Windows sql/test/pg_regress/Tests/float8.stable.out sql/test/pg_regress/Tests/float8.stable.out.Windows Branch: Jul2015 Log Message:
Improved tests of scalar funtions log() and exp() to produce no more error messages as they appears to be different on different platforms and for different compilers. This should reduce the number of reported differences on testweb diffs (120 lines): diff --git a/sql/test/pg_regress/Tests/float8.sql b/sql/test/pg_regress/Tests/float8.sql --- a/sql/test/pg_regress/Tests/float8.sql +++ b/sql/test/pg_regress/Tests/float8.sql @@ -131,11 +131,11 @@ SELECT '' AS bad, f.f1 * '1e200' from FL SELECT '' AS bad, f.f1 ^ '1e200' from FLOAT8_TBL f; -SELECT '' AS bad, log(f.f1) from FLOAT8_TBL f where f.f1 = '0.0' ; +--SELECT '' AS bad, log(f.f1) from FLOAT8_TBL f where f.f1 = '0.0' ; -SELECT '' AS bad, log(f.f1) from FLOAT8_TBL f where f.f1 < '0.0' ; +SELECT '' AS bad, log(-f.f1) from FLOAT8_TBL f where f.f1 < '0.0' ; -SELECT '' AS bad, exp(f.f1) from FLOAT8_TBL f; +SELECT '' AS bad, exp(-f.f1) from FLOAT8_TBL f where f.f1 > '-1000.0'; SELECT '' AS bad, f.f1 / '0.0' from FLOAT8_TBL f; diff --git a/sql/test/pg_regress/Tests/float8.stable.err b/sql/test/pg_regress/Tests/float8.stable.err --- a/sql/test/pg_regress/Tests/float8.stable.err +++ b/sql/test/pg_regress/Tests/float8.stable.err @@ -114,15 +114,6 @@ MAPI = (monetdb) /var/tmp/mtest-30808/. QUERY = SELECT '' AS bad, f.f1 ^ '1e200' from FLOAT8_TBL f; ERROR = !decimal (1e20) doesn't have format (39.0) MAPI = (monetdb) /var/tmp/mtest-30808/.s.monetdb.35989 -QUERY = SELECT '' AS bad, log(f.f1) from FLOAT8_TBL f where f.f1 = '0.0' ; -ERROR = !Math exception: Numerical result out of range -MAPI = (monetdb) /var/tmp/mtest-30808/.s.monetdb.35989 -QUERY = SELECT '' AS bad, log(f.f1) from FLOAT8_TBL f where f.f1 < '0.0' ; -ERROR = !Math exception: Numerical argument out of domain -MAPI = (monetdb) /var/tmp/mtest-30808/.s.monetdb.35989 -QUERY = SELECT '' AS bad, exp(f.f1) from FLOAT8_TBL f; -ERROR = !Math exception: Numerical result out of range -MAPI = (monetdb) /var/tmp/mtest-30808/.s.monetdb.35989 QUERY = SELECT '' AS bad, f.f1 / '0.0' from FLOAT8_TBL f; ERROR = !division by zero. MAPI = (monetdb) /var/tmp/mtest-30808/.s.monetdb.35989 diff --git a/sql/test/pg_regress/Tests/float8.stable.err.Windows b/sql/test/pg_regress/Tests/float8.stable.err.Windows --- a/sql/test/pg_regress/Tests/float8.stable.err.Windows +++ b/sql/test/pg_regress/Tests/float8.stable.err.Windows @@ -114,12 +114,6 @@ MAPI = (monetdb) /var/tmp/mtest-30808/. QUERY = SELECT '' AS bad, f.f1 ^ '1e200' from FLOAT8_TBL f; ERROR = !decimal (1e20) doesn't have format (19.0) MAPI = (monetdb) /var/tmp/mtest-30808/.s.monetdb.35989 -QUERY = SELECT '' AS bad, log(f.f1) from FLOAT8_TBL f where f.f1 = '0.0' ; -ERROR = !Math exception: Result too large -MAPI = (monetdb) /var/tmp/mtest-30808/.s.monetdb.35989 -QUERY = SELECT '' AS bad, log(f.f1) from FLOAT8_TBL f where f.f1 < '0.0' ; -ERROR = !Math exception: Domain error -MAPI = (monetdb) /var/tmp/mtest-30808/.s.monetdb.35989 QUERY = SELECT '' AS bad, f.f1 / '0.0' from FLOAT8_TBL f; ERROR = !division by zero. MAPI = (monetdb) /var/tmp/mtest-30808/.s.monetdb.35989 diff --git a/sql/test/pg_regress/Tests/float8.stable.out b/sql/test/pg_regress/Tests/float8.stable.out --- a/sql/test/pg_regress/Tests/float8.stable.out +++ b/sql/test/pg_regress/Tests/float8.stable.out @@ -257,6 +257,25 @@ Ready. # SET f1 = FLOAT8_TBL.f1 * '-1' # WHERE FLOAT8_TBL.f1 > '0.0'; [ 3 ] +#SELECT '' AS bad, log(-f.f1) from FLOAT8_TBL f where f.f1 < '0.0' ; +% ., sys. # table_name +# .L, sys.L # table_name +% bad, log_sql_neg_f1 # name +% char, double # type +% 0, 24 # length +[ "", 6.91204606 ] +[ "", 3.550766152 ] +[ "", 460.7277396 ] +[ "", -460.3062976 ] +#SELECT '' AS bad, exp(-f.f1) from FLOAT8_TBL f where f.f1 > '-1000.0'; +% ., sys. # table_name +# .L, sys.L # table_name +% bad, exp_sql_neg_f1 # name +% char, double # type +% 0, 24 # length +[ "", 1 ] +[ "", 1.351511513e+15 ] +[ "", 1 ] #SELECT '' AS five, * FROM FLOAT8_TBL; % .L, sys.float8_tbl # table_name % five, f1 # name diff --git a/sql/test/pg_regress/Tests/float8.stable.out.Windows b/sql/test/pg_regress/Tests/float8.stable.out.Windows --- a/sql/test/pg_regress/Tests/float8.stable.out.Windows +++ b/sql/test/pg_regress/Tests/float8.stable.out.Windows @@ -49,7 +49,7 @@ Ready. % L1 # name % double # type % 24 # length -[ -0 ] +[ 0 ] #SELECT '' AS five, FLOAT8_TBL.* FROM FLOAT8_TBL; % .L, sys.float8_tbl # table_name % five, f1 # name @@ -257,6 +257,25 @@ Ready. # SET f1 = FLOAT8_TBL.f1 * '-1' # WHERE FLOAT8_TBL.f1 > '0.0'; [ 3 ] +#SELECT '' AS bad, log(-f.f1) from FLOAT8_TBL f where f.f1 < '0.0' ; +% ., sys. # table_name +# .L, sys.L # table_name +% bad, log_sql_neg_f1 # name +% char, double # type +% 0, 24 # length +[ "", 6.91204606 ] +[ "", 3.550766152 ] +[ "", 460.7277396 ] +[ "", -460.3062976 ] +#SELECT '' AS bad, exp(-f.f1) from FLOAT8_TBL f where f.f1 > '-1000.0'; +% ., sys. # table_name +# .L, sys.L # table_name +% bad, exp_sql_neg_f1 # name +% char, double # type +% 0, 24 # length +[ "", 1 ] +[ "", 1.351511513e+15 ] +[ "", 1 ] #SELECT '' AS bad, exp(f.f1) from FLOAT8_TBL f; % ., sys. # table_name # .L, sys.L # table_name _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list