Bitcoin ABC  0.26.3
P2P Digital Currency
Macros | Functions | Variables
unitester.cpp File Reference
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <cassert>
#include <string>
#include "univalue.h"
Include dependency graph for unitester.cpp:

Go to the source code of this file.

Macros

#define ARRAY_SIZE(arr)   (sizeof(arr) / sizeof((arr)[0]))
 
#define d_assert(expr)   { if (!(expr)) { test_failed = true; fprintf(stderr, "%s failed\n", filename.c_str()); } }
 
#define f_assert(expr)   { if (!(expr)) { test_failed = true; fprintf(stderr, "%s failed\n", __func__); } }
 

Functions

std::string srcdir (JSON_TEST_SRC)
 
static std::string rtrim (std::string s)
 
static void runtest (std::string filename, const std::string &jdata)
 
static void runtest_file (const char *filename_)
 
void unescape_unicode_test ()
 
int main (int argc, char *argv[])
 

Variables

static bool test_failed = false
 
static const char * filenames []
 

Macro Definition Documentation

◆ ARRAY_SIZE

#define ARRAY_SIZE (   arr)    (sizeof(arr) / sizeof((arr)[0]))

Definition at line 17 of file unitester.cpp.

◆ d_assert

#define d_assert (   expr)    { if (!(expr)) { test_failed = true; fprintf(stderr, "%s failed\n", filename.c_str()); } }

Definition at line 23 of file unitester.cpp.

◆ f_assert

#define f_assert (   expr)    { if (!(expr)) { test_failed = true; fprintf(stderr, "%s failed\n", __func__); } }

Definition at line 24 of file unitester.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 161 of file unitester.cpp.

Here is the call graph for this function:

◆ rtrim()

static std::string rtrim ( std::string  s)
static

Definition at line 26 of file unitester.cpp.

Here is the caller graph for this function:

◆ runtest()

static void runtest ( std::string  filename,
const std::string &  jdata 
)
static

Definition at line 32 of file unitester.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ runtest_file()

static void runtest_file ( const char *  filename_)
static

Definition at line 56 of file unitester.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ srcdir()

std::string srcdir ( JSON_TEST_SRC  )
Here is the caller graph for this function:

◆ unescape_unicode_test()

void unescape_unicode_test ( )

Definition at line 139 of file unitester.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ filenames

const char* filenames[]
static

Definition at line 80 of file unitester.cpp.

◆ test_failed

bool test_failed = false
static

Definition at line 21 of file unitester.cpp.