GrafX2 2.9.3227
The ultimate 256-color painting program
|
Unit tests. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
#include <errno.h>
#include <sys/time.h>
#include "../struct.h"
#include "../global.h"
#include "../io.h"
#include "../gfx2log.h"
#include "tests.h"
#include "testlist.h"
Macros | |
#define | TEST(func) { Test_ ## func, # func }, |
#define | TEST_COUNT (sizeof(tests) / sizeof(tests[0])) |
#define | ESC_GREEN "\033[32m" |
#define | ESC_RED "\033[31m" |
#define | ESC_RESET "\033[0m" |
Functions | |
int | init (void) |
Initializations for test program. More... | |
void | finish (void) |
Releases resources. More... | |
int | main (int argc, char **argv) |
Test program entry point. More... | |
Variables | |
signed char | File_error |
T_Config | Config |
T_Document | Main |
T_Document | Spare |
byte * | Screen_backup |
byte * | Main_Screen |
short | Screen_width |
short | Screen_height |
short | Original_screen_X |
short | Original_screen_Y |
byte | Menu_factor_X |
byte | Menu_factor_Y |
int | Pixel_ratio |
byte | First_color_in_palette |
byte | Back_color |
byte | MC_Dark |
byte | MC_Light |
T_Window | Window_stack [8] |
byte | Windows_open |
dword | Key |
char | tmpdir [256] |
path to directory where tests can write files More... | |
struct { | |
int(* test_func )(char *errmsg) | |
const char * test_name | |
} | tests [] |
Unit tests.
#define TEST | ( | func | ) | { Test_ ## func, # func }, |
#define ESC_GREEN "\033[32m" |
#define ESC_RED "\033[31m" |
#define ESC_RESET "\033[0m" |
int init | ( | void | ) |
Initializations for test program.
References NULL, PATH_SEPARATOR, and tmpdir.
Referenced by main().
int main | ( | int | argc, |
char ** | argv | ||
) |
Test program entry point.
References ERRMSG_LENGTH, ESC_GREEN, ESC_RED, ESC_RESET, finish(), GFX2_DEBUG, GFX2_verbosity_level, init(), NULL, TEST_COUNT, test_name, and tests.
signed char File_error |
T_Config Config |
T_Document Main |
T_Document Spare |
byte* Screen_backup |
byte* Main_Screen |
short Screen_width |
short Screen_height |
short Original_screen_X |
short Original_screen_Y |
byte Menu_factor_X |
byte Menu_factor_Y |
int Pixel_ratio |
byte First_color_in_palette |
byte Back_color |
byte MC_Dark |
byte MC_Light |
T_Window Window_stack[8] |
byte Windows_open |
dword Key |
char tmpdir[256] |
path to directory where tests can write files
Referenced by finish(), init(), Test_C64_Formats(), Test_Calculate_relative_path(), Test_File_exists(), Test_Packbits(), Test_Read_Write_byte(), Test_Read_Write_bytes(), Test_Read_Write_dword(), Test_Read_Write_word(), Test_Realpath(), and Test_Save().
int(* test_func) (char *errmsg) | ( | char * | errmsg | ) |
const char* test_name |
Referenced by main().
const struct { ... } tests[] |
Referenced by main(), Test_MOTO_MAP_pack(), and Test_Packbits().