Don't color Windows.
[platform/upstream/libaec.git] / tests / check_aec.h
1 #ifndef CHECK_AEC_H
2 #define CHECK_AEC_H
3 #include "libaec.h"
4
5 struct test_state {
6     int (* codec)(struct test_state *state);
7     int id_len;
8     int bytes_per_sample;
9     unsigned char *ubuf;
10     unsigned char *cbuf;
11     unsigned char *obuf;
12     size_t ibuf_len; /* input buffer legth may be shorter than buf_len */
13     size_t buf_len;
14     size_t cbuf_len;
15     long long int xmax;
16     long long int xmin;
17     void (*out)(unsigned char *dest, unsigned int val, int size);
18     struct aec_stream *strm;
19 };
20
21 int update_state(struct test_state *state);
22 int encode_decode_small(struct test_state *state);
23 int encode_decode_large(struct test_state *state);
24
25 #ifdef _WIN32
26 #define CHECK_PASS "PASS"
27 #define CHECK_FAIL "FAIL"
28 #else
29 #define CHECK_PASS "\e[0;32mPASS\e[0m"
30 #define CHECK_FAIL "\e[0;31mFAIL\e[0m"
31 #endif
32
33 #endif /* CHECK_AEC_H */