2 * Copyright (c) 2009-2011 Petri Lehtinen <petri@digip.org>
4 * Jansson is free software; you can redistribute it and/or modify
5 * it under the terms of the MIT license. See LICENSE for details.
23 #define failhdr fprintf(stderr, "%s:%s:%d: ", __FILE__, __FUNCTION__, __LINE__)
28 fprintf(stderr, "%s\n", msg); \
32 /* Assumes json_error_t error */
33 #define check_error(text_, source_, line_, column_, position_) \
35 if(strcmp(error.text, text_) != 0) { \
37 fprintf(stderr, "text: \"%s\" != \"%s\"\n", error.text, text_); \
40 if(strcmp(error.source, source_) != 0) { \
43 fprintf(stderr, "source: \"%s\" != \"%s\"\n", error.source, source_); \
46 if(error.line != line_) { \
48 fprintf(stderr, "line: %d != %d\n", error.line, line_); \
51 if(error.column != column_) { \
53 fprintf(stderr, "column: %d != %d\n", error.column, column_); \
56 if(error.position != position_) { \
58 fprintf(stderr, "position: %d != %d\n", error.position, position_); \
64 static void run_tests();
68 setlocale(LC_ALL, "");