Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

eosiolib Unit/Regression Tests #424

Merged
merged 55 commits into from
Feb 21, 2019
Merged
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
e703cc3
Add more `name` tests
Dec 28, 2018
f236e89
Merge branch 'release/1.5.x' into cdt-tests
Jan 2, 2019
5d83272
Start tests
Jan 2, 2019
ceab265
Merge remote-tracking branch 'upstream/larryk85-patch-1' into cdt-tests
Jan 3, 2019
cd1def0
Continuation of `name` type tests
Jan 3, 2019
3c16d75
Continuation of `name` type tests
Jan 4, 2019
c0703b0
Start `symbol` type tests
Jan 7, 2019
a536473
Start `asset` type tests
Jan 8, 2019
dfa7b9d
Continuation of `asset` type tests
Jan 9, 2019
09c8222
Continuation of `asset` type tests
Jan 11, 2019
86397cf
Continuation of `asset` type tests
Jan 11, 2019
0b458b2
Start `microseconds`, `time_point`, and `time_point_sec` type tests
Jan 15, 2019
39845b0
Refactor tests to be more succinct
Jan 17, 2019
e65b747
Continue refactor of tests for clarity and templates for future tests
Jan 18, 2019
897627f
Start varint and print tests
Jan 23, 2019
b486c4d
Update `CMakeLists.txt` files
Jan 24, 2019
65783b9
Add `fixed_bytes` and `crypto` tests
Jan 25, 2019
f5bed23
Add `datastream` tests
Jan 28, 2019
62d5140
Continuation of `datastream` tests
Jan 28, 2019
63c1d9a
Progress on `datastream` tests and `varint` tests almost done
Jan 28, 2019
253297a
Continuing work on `fixed_bytes` tests
Jan 29, 2019
751f9fe
Add `binary_extension` tests
Jan 29, 2019
0aab645
Continuation
Jan 30, 2019
b5d8b43
Continuation of `datastream` tests
Jan 30, 2019
f35f6af
Tidy up tests;
Jan 31, 2019
5e4b003
Continuation of `datastream` tests
Feb 1, 2019
80e9fae
Continuation of `datastream` tests
Feb 4, 2019
23f1734
Continuation of `datastream` tests
Feb 4, 2019
e0484fa
Fix alignment issue
Feb 4, 2019
3e44872
Finishing up `datastream` tests
Feb 5, 2019
1c2935a
Tidy up `datastream` tests
Feb 6, 2019
7993563
Start trying to touch-up `varint` tests
Feb 6, 2019
6140d28
Fix build with `fno-builtins` flag
Feb 7, 2019
d2accfe
Finishing up `datastream` tests
Feb 7, 2019
bef0fca
Delete .#CMakeLists.txt
johndebord Feb 7, 2019
3ccea4d
More edits on `datastream` tests
Feb 8, 2019
14a2e1c
Merge branch 'cdt-tests' of github.com:EOSIO/eosio.cdt into cdt-tests
Feb 8, 2019
bd76516
Finish `datastream` tests
Feb 8, 2019
2bcd19a
Finish `datastream` tests
Feb 8, 2019
0cc99ce
Spruce-up tests
Feb 8, 2019
e1deefb
Fix for `__bzero` behavior
Feb 11, 2019
677d158
Finish `serialize_tests`
Feb 11, 2019
7cb0f54
Nearly finished with `time_tests`; with various other edits
Feb 14, 2019
c87404b
Finish `time_tests` and `varint_tests`
Feb 15, 2019
c717257
Continuation of `fixed_bytes_tests.cpp`
Feb 16, 2019
61df416
Finish tests and get them production ready
Feb 19, 2019
4c2c6b0
merged release/1.6.x
larryk85 Feb 19, 2019
0de3c41
added llp64 fixes and fixed sse issues
larryk85 Feb 20, 2019
bb32d45
remove unneeded code
larryk85 Feb 20, 2019
f29d37e
use size_t and uint64_t for malloc instead of uint32_t and int32_t
larryk85 Feb 21, 2019
33bf11a
Add conr2d's changes and update `asset_tests`
Feb 21, 2019
107fbb2
Clean up
Feb 21, 2019
e969ad9
Fix to silence conversion warning
Feb 21, 2019
25ecd4c
Remove `string` dependency
johndebord Feb 21, 2019
e5be3b2
Expound upon `signed_int` test
Feb 21, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Expound upon signed_int test
johndebord committed Feb 21, 2019
commit e5be3b22ee4b7322efc922a6146de4acc47b9544
17 changes: 11 additions & 6 deletions tests/unit/varint_tests.cpp
Original file line number Diff line number Diff line change
@@ -11,8 +11,9 @@

using std::numeric_limits;

using namespace eosio;
using eosio::datastream;
using eosio::unsigned_int;
using eosio::signed_int;

static constexpr uint32_t u32min = numeric_limits<uint32_t>::min(); // 0
static constexpr uint32_t u32max = numeric_limits<uint32_t>::max(); // 4294967295
@@ -121,7 +122,7 @@ EOSIO_TEST_BEGIN(unsigned_int_type_test)
ds << cui;
ds.seekp(0);
ds >> ui;
CHECK_EQUAL( cui == ui, true)
CHECK_EQUAL( cui, ui)

silence_output(false);
EOSIO_TEST_END
@@ -246,11 +247,15 @@ EOSIO_TEST_BEGIN(signed_int_type_test)
datastream<const char*> ds{datastream_buffer, buffer_size};

static const signed_int csi{-42};
signed_int si{};
ds << csi;
signed_int a{44}, b{(1<<30)+2}, c{-35}, d{-(1<<30)-2}; // Small+, Small-, Large+, Large-
signed_int aa, bb, cc, dd;
ds << a << b << c << d;
ds.seekp(0);
ds >> si;
CHECK_EQUAL( csi == si, true)
ds >> aa >> bb >> cc >> dd;
CHECK_EQUAL( a, aa )
CHECK_EQUAL( b, bb )
CHECK_EQUAL( c, cc )
CHECK_EQUAL( d, dd )

silence_output(false);
EOSIO_TEST_END