Created
February 5, 2017 06:22
-
-
Save braydonf/1428d5d91c08f5c381d4e6cb83529484 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From f9e4e11063bb7ddda4c05c061e1f8b4ee29a1be4 Mon Sep 17 00:00:00 2001 | |
From: Braydon Fuller <[email protected]> | |
Date: Sun, 5 Feb 2017 01:20:23 -0500 | |
Subject: [PATCH] tests with mingw | |
--- | |
tests/test1.c | 16 ++++++++-------- | |
1 file changed, 8 insertions(+), 8 deletions(-) | |
diff --git a/tests/test1.c b/tests/test1.c | |
index 68706cb..2058c7b 100644 | |
--- a/tests/test1.c | |
+++ b/tests/test1.c | |
@@ -87,7 +87,7 @@ void test_array_del_idx() | |
for(ii = 0; ii < json_object_array_length(my_array); ii++) | |
{ | |
json_object *obj = json_object_array_get_idx(my_array, ii); | |
- printf("\t[%llu]=%s\n", (unsigned long long)ii, json_object_to_json_string(obj)); | |
+ printf("\t[%i]=%s\n", (int)ii, json_object_to_json_string(obj)); | |
} | |
printf("my_array.to_string()=%s\n", json_object_to_json_string(my_array)); | |
@@ -108,16 +108,16 @@ void test_array_del_idx() | |
/* Delete all array indexes at once */ | |
my_array = make_array(); | |
rc = json_object_array_del_idx(my_array, 0, orig_array_len); | |
- printf("after del_idx(0,%llu)=%d, my_array.to_string()=%s\n", | |
- (unsigned long long)orig_array_len, rc, json_object_to_json_string(my_array)); | |
+ printf("after del_idx(0,%i)=%d, my_array.to_string()=%s\n", | |
+ (int)orig_array_len, rc, json_object_to_json_string(my_array)); | |
json_object_put(my_array); | |
/* Delete *more* than all array indexes at once */ | |
my_array = make_array(); | |
rc = json_object_array_del_idx(my_array, 0, orig_array_len + 1); | |
- printf("after del_idx(0,%llu)=%d, my_array.to_string()=%s\n", | |
- (unsigned long long)(orig_array_len + 1), rc, json_object_to_json_string(my_array)); | |
+ printf("after del_idx(0,%i)=%d, my_array.to_string()=%s\n", | |
+ (int)(orig_array_len + 1), rc, json_object_to_json_string(my_array)); | |
json_object_put(my_array); | |
} | |
@@ -175,7 +175,7 @@ int main(int argc, char **argv) | |
for(i=0; i < json_object_array_length(my_array); i++) | |
{ | |
json_object *obj = json_object_array_get_idx(my_array, i); | |
- printf("\t[%llu]=%s\n", (unsigned long long)i, json_object_to_json_string(obj)); | |
+ printf("\t[%i]=%s\n", (int)i, json_object_to_json_string(obj)); | |
} | |
printf("my_array.to_string()=%s\n", json_object_to_json_string(my_array)); | |
@@ -192,7 +192,7 @@ int main(int argc, char **argv) | |
for(i=0; i < json_object_array_length(my_array); i++) | |
{ | |
json_object *obj = json_object_array_get_idx(my_array, i); | |
- printf("\t[%llu]=%s\n", (unsigned long long)i, json_object_to_json_string(obj)); | |
+ printf("\t[%i]=%s\n", (int)i, json_object_to_json_string(obj)); | |
} | |
printf("my_array.to_string()=%s\n", json_object_to_json_string(my_array)); | |
json_object_array_sort(my_array, sort_fn); | |
@@ -200,7 +200,7 @@ int main(int argc, char **argv) | |
for(i=0; i < json_object_array_length(my_array); i++) | |
{ | |
json_object *obj = json_object_array_get_idx(my_array, i); | |
- printf("\t[%llu]=%s\n", (unsigned long long)i, json_object_to_json_string(obj)); | |
+ printf("\t[%i]=%s\n", (int)i, json_object_to_json_string(obj)); | |
} | |
printf("my_array.to_string()=%s\n", json_object_to_json_string(my_array)); | |
-- | |
2.7.4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment