File: test.c

package info (click to toggle)
rcheevos 12.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,372 kB
  • sloc: ansic: 57,087; makefile: 300
file content (113 lines) | stat: -rw-r--r-- 2,319 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#include "rc_internal.h"

#ifdef RC_CLIENT_SUPPORTS_RAINTEGRATION
#include "rc_client_raintegration.h"
#endif

#include "test_framework.h"

#include <assert.h>

#define TIMING_TEST 0

extern void test_timing();

extern void test_condition();
extern void test_memref();
extern void test_operand();
extern void test_condset();
extern void test_trigger();
extern void test_value();
extern void test_format();
extern void test_lboard();
extern void test_richpresence();
extern void test_runtime();
extern void test_runtime_progress();

extern void test_client();
#ifdef RC_CLIENT_SUPPORTS_EXTERNAL
extern void test_client_external();
#endif
#ifdef RC_CLIENT_SUPPORTS_RAINTEGRATION
extern void test_client_raintegration();
#endif

extern void test_consoleinfo();
extern void test_rc_libretro();
extern void test_rc_validate();

extern void test_hash();
#ifndef RC_HASH_NO_ROM
extern void test_hash_rom();
#endif
#ifndef RC_HASH_NO_DISC
extern void test_cdreader();
extern void test_hash_disc();
#endif
#ifndef RC_HASH_NO_ZIP
extern void test_hash_zip();
#endif

extern void test_rapi_common();
extern void test_rapi_user();
extern void test_rapi_runtime();
extern void test_rapi_info();
extern void test_rapi_editor();

TEST_FRAMEWORK_DECLARATIONS()

int main(void) {
  TEST_FRAMEWORK_INIT();

#if TIMING_TEST
  test_timing();
#else
  test_memref();
  test_operand();
  test_condition();
  test_condset();
  test_trigger();
  test_value();
  test_format();
  test_lboard();
  test_richpresence();
  test_runtime();
  test_runtime_progress();

  test_consoleinfo();
  test_rc_validate();

  test_rapi_common();
  test_rapi_user();
  test_rapi_runtime();
  test_rapi_info();
  test_rapi_editor();

  test_client();
#ifdef RC_CLIENT_SUPPORTS_EXTERNAL
  test_client_external();
#endif
#ifdef RC_CLIENT_SUPPORTS_RAINTEGRATION
  test_client_raintegration();
#endif
#ifdef RC_CLIENT_SUPPORTS_HASH
  /* no direct compile option for hash support, so leverage RC_CLIENT_SUPPORTS_HASH */
  test_rc_libretro(); /* libretro extensions require hash support */
  test_hash();
 #ifndef RC_HASH_NO_ROM
  test_hash_rom();
 #endif
 #ifndef RC_HASH_NO_DISC
  test_cdreader();
  test_hash_disc();
 #endif
 #ifndef RC_HASH_NO_ZIP
  test_hash_zip();
 #endif
#endif
#endif

  TEST_FRAMEWORK_SHUTDOWN();

  return TEST_FRAMEWORK_PASSED() ? 0 : 1;
}