summaryrefslogtreecommitdiff
path: root/test/uint_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/uint_test.c')
-rw-r--r--test/uint_test.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/uint_test.c b/test/uint_test.c
index 89eb2b91833e..3c269daef238 100644
--- a/test/uint_test.c
+++ b/test/uint_test.c
@@ -10,7 +10,7 @@
#include "cbor.h"
-cbor_item_t *number;
+cbor_item_t* number;
struct cbor_load_result res;
unsigned char data1[] = {0x02, 0xFF};
@@ -20,7 +20,7 @@ unsigned char data4[] = {0x1a, 0xa5, 0xf7, 0x02, 0xb3, 0xFF};
unsigned char data5[] = {0x1b, 0xa5, 0xf7, 0x02, 0xb3,
0xa5, 0xf7, 0x02, 0xb3, 0xFF};
-static void test_very_short_int(void **_CBOR_UNUSED(_state)) {
+static void test_very_short_int(void** _state _CBOR_UNUSED) {
number = cbor_load(data1, 2, &res);
assert_true(cbor_typeof(number) == CBOR_TYPE_UINT);
assert_true(cbor_int_get_width(number) == CBOR_INT_8);
@@ -34,13 +34,13 @@ static void test_very_short_int(void **_CBOR_UNUSED(_state)) {
assert_null(number);
}
-static void test_incomplete_data(void **_CBOR_UNUSED(_state)) {
+static void test_incomplete_data(void** _state _CBOR_UNUSED) {
number = cbor_load(data2, 1, &res);
assert_null(number);
assert_true(res.error.code == CBOR_ERR_NOTENOUGHDATA);
}
-static void test_short_int(void **_CBOR_UNUSED(_state)) {
+static void test_short_int(void** _state _CBOR_UNUSED) {
number = cbor_load(data2, 3, &res);
assert_true(cbor_typeof(number) == CBOR_TYPE_UINT);
assert_true(cbor_int_get_width(number) == CBOR_INT_8);
@@ -54,7 +54,7 @@ static void test_short_int(void **_CBOR_UNUSED(_state)) {
assert_null(number);
}
-static void test_half_int(void **_CBOR_UNUSED(_state)) {
+static void test_half_int(void** _state _CBOR_UNUSED) {
number = cbor_load(data3, 5, &res);
assert_true(cbor_typeof(number) == CBOR_TYPE_UINT);
assert_true(cbor_int_get_width(number) == CBOR_INT_16);
@@ -68,7 +68,7 @@ static void test_half_int(void **_CBOR_UNUSED(_state)) {
assert_null(number);
}
-static void test_int(void **_CBOR_UNUSED(_state)) {
+static void test_int(void** _state _CBOR_UNUSED) {
number = cbor_load(data4, 6, &res);
assert_true(cbor_typeof(number) == CBOR_TYPE_UINT);
assert_true(cbor_int_get_width(number) == CBOR_INT_32);
@@ -82,7 +82,7 @@ static void test_int(void **_CBOR_UNUSED(_state)) {
assert_null(number);
}
-static void test_long_int(void **_CBOR_UNUSED(_state)) {
+static void test_long_int(void** _state _CBOR_UNUSED) {
number = cbor_load(data5, 10, &res);
assert_true(cbor_typeof(number) == CBOR_TYPE_UINT);
assert_true(cbor_int_get_width(number) == CBOR_INT_64);
@@ -96,7 +96,7 @@ static void test_long_int(void **_CBOR_UNUSED(_state)) {
assert_null(number);
}
-static void test_refcounting(void **_CBOR_UNUSED(_state)) {
+static void test_refcounting(void** _state _CBOR_UNUSED) {
number = cbor_load(data5, 10, &res);
cbor_incref(number);
assert_true(number->refcount == 2);
@@ -106,13 +106,13 @@ static void test_refcounting(void **_CBOR_UNUSED(_state)) {
assert_null(number);
}
-static void test_empty_input(void **_CBOR_UNUSED(_state)) {
+static void test_empty_input(void** _state _CBOR_UNUSED) {
number = cbor_load(data5, 0, &res);
assert_null(number);
assert_true(res.error.code == CBOR_ERR_NODATA);
}
-static void test_inline_creation(void **_CBOR_UNUSED(_state)) {
+static void test_inline_creation(void** _state _CBOR_UNUSED) {
number = cbor_build_uint8(10);
assert_true(cbor_get_int(number) == 10);
cbor_decref(&number);
@@ -130,7 +130,7 @@ static void test_inline_creation(void **_CBOR_UNUSED(_state)) {
cbor_decref(&number);
}
-static void test_int_creation(void **_CBOR_UNUSED(_state)) {
+static void test_int_creation(void** _state _CBOR_UNUSED) {
WITH_FAILING_MALLOC({ assert_null(cbor_new_int8()); });
WITH_FAILING_MALLOC({ assert_null(cbor_new_int16()); });
WITH_FAILING_MALLOC({ assert_null(cbor_new_int32()); });