diff options
author | Constantin Michael <constantin@codesynthesis.com> | 2011-10-20 20:49:42 +0200 |
---|---|---|
committer | Constantin Michael <constantin@codesynthesis.com> | 2011-10-21 13:29:10 +0200 |
commit | 77012915e5755f82982ceb18035bb8e56878848d (patch) | |
tree | 20393fb2dbb0623eb9ab64ec1cd5fce53d7e1a81 /oracle/types/test.hxx | |
parent | 33615c685523e5f282bc585efa0ff31df7dd3742 (diff) |
Add 64 bit integer tests to Oracle types test
Diffstat (limited to 'oracle/types/test.hxx')
-rw-r--r-- | oracle/types/test.hxx | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/oracle/types/test.hxx b/oracle/types/test.hxx index d137a1d..bfb06f9 100644 --- a/oracle/types/test.hxx +++ b/oracle/types/test.hxx @@ -161,39 +161,42 @@ struct object }; #pragma db object -struct big_ints +struct big_uint { - big_ints (bool init = false) + big_uint (unsigned int id = 0, unsigned long long v = 0) + : id_ (id), value (v) { - if (init) - { - signed_zero = 0; - signed_min = 0x8000000000000000; // –9223372036854775808 - signed_max = 0x7FFFFFFFFFFFFFFFLL; // 9223372036854775807 - unsigned_zero = 0; - unsigned_max = 0xFFFFFFFFFFFFFFFFULL; - } } #pragma db id - unsigned int id; + unsigned int id_; + + unsigned long long value; + + bool + operator== (const big_uint& y) const + { + return id_ == y.id_ && value == y.value; + } +}; - long long signed_zero; - long long signed_min; - long long signed_max; +#pragma db object +struct big_int +{ + big_int (unsigned int id = 0, long long v = 0) + : id_ (id), value (v) + { + } + + #pragma db id + unsigned int id_; - unsigned long long unsigned_zero; - unsigned long long unsigned_max; + long long value; bool - operator== (const big_ints& y) const + operator== (const big_int& y) const { - return id == y.id && - signed_zero == y.signed_zero && - signed_min == y.signed_min && - signed_max == y.signed_max && - unsigned_zero == y.unsigned_zero && - unsigned_max == y.unsigned_max; + return id_ == y.id_ && value == y.value; } }; |