aboutsummaryrefslogtreecommitdiffstats
path: root/test/mppa/instr/framework.h
blob: f6077c461832f58e8e81e20b0e718199b13c4f18 (plain)
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
#ifndef __FRAMEWORK_H__
#define __FRAMEWORK_H__

#include "../prng/prng.c"

#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