summaryrefslogtreecommitdiffstats
path: root/test/digest_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/digest_test.c')
-rw-r--r--test/digest_test.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/test/digest_test.c b/test/digest_test.c
index 59d28b3..c1a16a8 100644
--- a/test/digest_test.c
+++ b/test/digest_test.c
@@ -16,12 +16,12 @@ test_digest(void)
static const uint8_t data[] = {
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- size_t last = 0u;
+ size_t last = 0U;
for (size_t offset = 0; offset < 7; ++offset) {
- const size_t len = 8u - offset;
+ const size_t len = 8U - offset;
for (size_t i = offset; i < 8; ++i) {
- const size_t h = zix_digest(0u, &data[i], len);
+ const size_t h = zix_digest(0U, &data[i], len);
assert(h != last);
last = h;
}
@@ -33,11 +33,11 @@ test_digest32(void)
{
static const uint8_t data[] = {1, 2, 3, 4, 5, 6, 7, 8};
- uint32_t last = 0u;
+ uint32_t last = 0U;
for (size_t offset = 0; offset < 3; ++offset) {
for (size_t i = offset; i < 4; ++i) {
- const uint32_t h = zix_digest32(0u, &data[i], 4);
+ const uint32_t h = zix_digest32(0U, &data[i], 4);
assert(h != last);
last = h;
}
@@ -50,11 +50,11 @@ test_digest64(void)
static const uint8_t data[] = {
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
- uint64_t last = 0u;
+ uint64_t last = 0U;
for (size_t offset = 0; offset < 7; ++offset) {
for (size_t i = offset; i < 8; ++i) {
- const uint64_t h = zix_digest64(0u, &data[i], 8);
+ const uint64_t h = zix_digest64(0U, &data[i], 8);
assert(h != last);
last = h;
}
@@ -66,13 +66,13 @@ test_digest32_aligned(void)
{
static const uint32_t data[] = {1, 2, 3, 4, 5, 6, 7, 8};
- uint32_t last = 0u;
+ uint32_t last = 0U;
for (size_t offset = 0; offset < 3; ++offset) {
- const size_t len = 4u - offset;
+ const size_t len = 4U - offset;
for (size_t i = offset; i < 4; ++i) {
const uint32_t h =
- zix_digest32_aligned(0u, &data[i], len * sizeof(uint32_t));
+ zix_digest32_aligned(0U, &data[i], len * sizeof(uint32_t));
assert(h != last);
last = h;
}
@@ -84,13 +84,13 @@ test_digest64_aligned(void)
{
static const uint64_t data[] = {1, 2, 3, 4, 5, 6, 7, 8};
- uint64_t last = 0u;
+ uint64_t last = 0U;
for (size_t offset = 0; offset < 3; ++offset) {
- const size_t len = 4u - offset;
+ const size_t len = 4U - offset;
for (size_t i = offset; i < 4; ++i) {
const uint64_t h =
- zix_digest64_aligned(0u, &data[i], len * sizeof(uint64_t));
+ zix_digest64_aligned(0U, &data[i], len * sizeof(uint64_t));
assert(h != last);
last = h;
}
@@ -102,12 +102,12 @@ test_digest_aligned(void)
{
static const size_t data[] = {1, 2, 3, 4, 5, 6, 7, 8};
- size_t last = 0u;
+ size_t last = 0U;
for (size_t offset = 0; offset < 3; ++offset) {
- const size_t len = 4u - offset;
+ const size_t len = 4U - offset;
for (size_t i = offset; i < 4; ++i) {
- const size_t h = zix_digest_aligned(0u, &data[i], len * sizeof(size_t));
+ const size_t h = zix_digest_aligned(0U, &data[i], len * sizeof(size_t));
assert(h != last);
last = h;
}