project_files/hwc/rtl/tests/check_check.c
author sheepluva
Mon, 05 Aug 2019 00:20:45 +0200
changeset 15295 f382ec6dba11
parent 10015 4feced261c68
permissions -rw-r--r--
In hindsight my emscripten-ifdef (70d416a8f63f) is nonsense. As fpcrtl_glShaderSource() would not be defined and lead to compiling issues. So either it's 3 ifdefs (in pas2cRedo, pas2cSystem and misc.c), in order to toggle between fpcrtl_ and the native function, or alternatively have no ifdef for it at all. I'm going with none at all, which means emscripten will compile with the original (const) function prototype, being wrapped by the fpcrtl_ function, same as non-emscripten builds.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7983
02f36c3e7f6c add xymeng's rtl port
koda
parents:
diff changeset
     1
#include <check.h>
02f36c3e7f6c add xymeng's rtl port
koda
parents:
diff changeset
     2
#include <stdlib.h>
02f36c3e7f6c add xymeng's rtl port
koda
parents:
diff changeset
     3
#include "check_check.h"
02f36c3e7f6c add xymeng's rtl port
koda
parents:
diff changeset
     4
02f36c3e7f6c add xymeng's rtl port
koda
parents:
diff changeset
     5
int main(void)
02f36c3e7f6c add xymeng's rtl port
koda
parents:
diff changeset
     6
{
10015
4feced261c68 partial merge of the webgl branch
koda
parents: 7983
diff changeset
     7
    int number_failed;
7983
02f36c3e7f6c add xymeng's rtl port
koda
parents:
diff changeset
     8
10015
4feced261c68 partial merge of the webgl branch
koda
parents: 7983
diff changeset
     9
    Suite *s1 = system_suite();
4feced261c68 partial merge of the webgl branch
koda
parents: 7983
diff changeset
    10
    Suite *s2 = misc_suite();
4feced261c68 partial merge of the webgl branch
koda
parents: 7983
diff changeset
    11
    Suite *s3 = sysutils_suite();
4feced261c68 partial merge of the webgl branch
koda
parents: 7983
diff changeset
    12
    Suite *s4 = fileio_suite();
7983
02f36c3e7f6c add xymeng's rtl port
koda
parents:
diff changeset
    13
10015
4feced261c68 partial merge of the webgl branch
koda
parents: 7983
diff changeset
    14
    SRunner *sr = srunner_create(s1);
4feced261c68 partial merge of the webgl branch
koda
parents: 7983
diff changeset
    15
    srunner_add_suite(sr, s2);
4feced261c68 partial merge of the webgl branch
koda
parents: 7983
diff changeset
    16
    srunner_add_suite(sr, s3);
4feced261c68 partial merge of the webgl branch
koda
parents: 7983
diff changeset
    17
    srunner_add_suite(sr, s4);
7983
02f36c3e7f6c add xymeng's rtl port
koda
parents:
diff changeset
    18
10015
4feced261c68 partial merge of the webgl branch
koda
parents: 7983
diff changeset
    19
    srunner_run_all(sr, CK_NORMAL);
4feced261c68 partial merge of the webgl branch
koda
parents: 7983
diff changeset
    20
    number_failed = srunner_ntests_failed(sr);
4feced261c68 partial merge of the webgl branch
koda
parents: 7983
diff changeset
    21
    srunner_free(sr);
4feced261c68 partial merge of the webgl branch
koda
parents: 7983
diff changeset
    22
    return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
7983
02f36c3e7f6c add xymeng's rtl port
koda
parents:
diff changeset
    23
}