diff options
author | EuAndreh <eu@euandre.org> | 2024-06-04 16:27:05 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2024-06-04 16:27:05 -0300 |
commit | 5cb65ccdbda6c2d1e316e2fed10d97f978ab1f54 (patch) | |
tree | be5ae995868c61f9765f125e79cbf2aacce84e92 /tests | |
parent | src/set.c: Implement set_new() and set_free() (diff) | |
download | pindaiba-5cb65ccdbda6c2d1e316e2fed10d97f978ab1f54.tar.gz pindaiba-5cb65ccdbda6c2d1e316e2fed10d97f978ab1f54.tar.xz |
tests/vector.c: Add simple test for next_size()
Diffstat (limited to 'tests')
-rw-r--r-- | tests/vector.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/vector.c b/tests/vector.c index c93e793..7fae776 100644 --- a/tests/vector.c +++ b/tests/vector.c @@ -325,7 +325,18 @@ test_next_size(void) { { testing("same as multiplication"); - // FIXME: + + const struct Vector v = { + .value_size = 12U, + }; + + size_t out1; + size_t out2; + assert(next_size(&v, 3U, &out1) == 0); + assert( mul_size(v.value_size, 3U, &out2) == 0); + assert(out1 == 36U); + assert(out1 == out2); + test_ok(); } } |