diff options
author | Cyril SIX <cyril.six@kalray.eu> | 2018-11-23 18:06:26 +0100 |
---|---|---|
committer | Cyril SIX <cyril.six@kalray.eu> | 2018-11-23 18:06:26 +0100 |
commit | f17faa9e318cb6e6c75b3c22387f13e57a9828f7 (patch) | |
tree | 9bd29c4d2b7a5f2bc4a782656318c69cf67abdde /test/mppa/interop/framework.h | |
parent | 0b9d1deb832dc93ce381f15f8e9774973f45e56e (diff) | |
download | compcert-kvx-f17faa9e318cb6e6c75b3c22387f13e57a9828f7.tar.gz compcert-kvx-f17faa9e318cb6e6c75b3c22387f13e57a9828f7.zip |
Interoperability tests passed (no va_arg yet)
Diffstat (limited to 'test/mppa/interop/framework.h')
-rw-r--r-- | test/mppa/interop/framework.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/mppa/interop/framework.h b/test/mppa/interop/framework.h new file mode 100644 index 00000000..52ba97bc --- /dev/null +++ b/test/mppa/interop/framework.h @@ -0,0 +1,37 @@ +#ifndef __FRAMEWORK_H__ +#define __FRAMEWORK_H__ + +#include "../prng/prng.c" + +#define BEGIN_TEST_N(type, N)\ + int main(void){\ + type t[N], c, i, j, S;\ + srand(0);\ + S = 0;\ + for (i = 0 ; i < 100 ; i++){\ + c = randlong();\ + for (j = 0 ; j < N ; j++)\ + t[j] = randlong();\ + /* END BEGIN_TEST_N */ + +#define BEGIN_TEST(type)\ + int main(void){\ + type a, b, c, i, S;\ + srand(0);\ + S = 0;\ + for (i = 0 ; i < 100 ; i++){\ + c = randlong();\ + a = randlong();\ + b = randlong(); + /* END BEGIN_TEST */ + +/* In between BEGIN_TEST and END_TEST : definition of c */ + +#define END_TEST()\ + S += c;\ + }\ + return S;\ + } + /* END END_TEST */ + +#endif |