diff options
Diffstat (limited to 'src/tests')
| -rw-r--r-- | src/tests/int.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/tests/int.cpp b/src/tests/int.cpp new file mode 100644 index 0000000..5d5b7d2 --- /dev/null +++ b/src/tests/int.cpp | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | #include "gats/integer.h" | ||
| 2 | |||
| 3 | #include <bu/sio.h> | ||
| 4 | #include <bu/membuf.h> | ||
| 5 | |||
| 6 | using namespace Bu; | ||
| 7 | |||
| 8 | int main() | ||
| 9 | { | ||
| 10 | MemBuf mb; | ||
| 11 | int64_t i = -53954321995838ll; | ||
| 12 | |||
| 13 | sio << "Before: " << i << sio.nl; | ||
| 14 | Gats::Integer::writePackedInt( mb, i ); | ||
| 15 | mb.setPos( 0 ); | ||
| 16 | Gats::Integer::readPackedInt( mb, i ); | ||
| 17 | sio << "After: " << i << sio.nl; | ||
| 18 | |||
| 19 | return 0; | ||
| 20 | } | ||
| 21 | |||
