aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-11-30 09:21:00 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-11-30 09:21:00 +0200
commitb5ddc0e5b2ccd7c49ad752f8b8adbf91a0418f1a (patch)
tree891481add9e3c9bfa52d165a6569871b1640f404
parent26315ea5ab491aa8ab83de7674c308c871b8f79b (diff)
Add test for fixed-point numbers
-rw-r--r--oracle/types/driver.cxx2
-rw-r--r--oracle/types/test.hxx8
2 files changed, 10 insertions, 0 deletions
diff --git a/oracle/types/driver.cxx b/oracle/types/driver.cxx
index fa056ff..b23a757 100644
--- a/oracle/types/driver.cxx
+++ b/oracle/types/driver.cxx
@@ -40,6 +40,8 @@ main (int argc, char* argv[])
o.float_ = 1.123F;
o.double_ = 1.123;
+ o.num_float_ = 1.123F;
+ o.num_double_ = 1.123;
o.binary_float_ = 1.123F;
o.binary_double_ = 1.123;
diff --git a/oracle/types/test.hxx b/oracle/types/test.hxx
index b496114..3e59594 100644
--- a/oracle/types/test.hxx
+++ b/oracle/types/test.hxx
@@ -136,6 +136,12 @@ struct object
#pragma db type ("FLOAT(53)")
double double_;
+ #pragma db type ("NUMBER(7,3)")
+ float num_float_;
+
+ #pragma db type ("NUMBER(15,5)")
+ double num_double_;
+
#pragma db type ("BINARY_FLOAT")
float binary_float_;
@@ -205,6 +211,8 @@ struct object
ulong_long_ == y.ulong_long_ &&
float_ == y.float_ &&
double_ == y.double_ &&
+ num_float_ == y.num_float_ &&
+ num_double_ == y.num_double_ &&
binary_float_ == y.binary_float_ &&
binary_double_ == y.binary_double_ &&
date_ == y.date_ &&