-
Notifications
You must be signed in to change notification settings - Fork 11
/
decl.c
60 lines (52 loc) · 2.08 KB
/
decl.c
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
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#define TMin INT_MIN
#define TMax INT_MAX
#include "btest.h"
#include "bits.h"
test_rec test_set[] = {
{"bitAnd", (funct_t) bitAnd, (funct_t) test_bitAnd, 2, "| ~", 8, 1,
{{TMin, TMax},{TMin,TMax},{TMin,TMax}}},
{"getByte", (funct_t) getByte, (funct_t) test_getByte, 2,
"! ~ & ^ | + << >>", 6, 2,
{{TMin, TMax},{0,3},{TMin,TMax}}},
{"logicalShift", (funct_t) logicalShift, (funct_t) test_logicalShift,
2, "! ~ & ^ | + << >>", 20, 3,
{{TMin, TMax},{0,31},{TMin,TMax}}},
{"bitCount", (funct_t) bitCount, (funct_t) test_bitCount, 1, "! ~ & ^ | + << >>", 40, 4,
{{TMin, TMax},{TMin,TMax},{TMin,TMax}}},
{"bang", (funct_t) bang, (funct_t) test_bang, 1,
"~ & ^ | + << >>", 12, 4,
{{TMin, TMax},{TMin,TMax},{TMin,TMax}}},
{"tmin", (funct_t) tmin, (funct_t) test_tmin, 0, "! ~ & ^ | + << >>", 4, 1,
{{TMin, TMax},{TMin,TMax},{TMin,TMax}}},
{"fitsBits", (funct_t) fitsBits, (funct_t) test_fitsBits, 2,
"! ~ & ^ | + << >>", 15, 2,
{{TMin, TMax},{1,32},{TMin,TMax}}},
{"divpwr2", (funct_t) divpwr2, (funct_t) test_divpwr2, 2,
"! ~ & ^ | + << >>", 15, 2,
{{TMin, TMax},{0,30},{TMin,TMax}}},
{"negate", (funct_t) negate, (funct_t) test_negate, 1,
"! ~ & ^ | + << >>", 5, 2,
{{TMin, TMax},{TMin,TMax},{TMin,TMax}}},
{"isPositive", (funct_t) isPositive, (funct_t) test_isPositive, 1,
"! ~ & ^ | + << >>", 8, 3,
{{TMin, TMax},{TMin,TMax},{TMin,TMax}}},
{"isLessOrEqual", (funct_t) isLessOrEqual, (funct_t) test_isLessOrEqual, 2,
"! ~ & ^ | + << >>", 24, 3,
{{TMin, TMax},{TMin,TMax},{TMin,TMax}}},
{"ilog2", (funct_t) ilog2, (funct_t) test_ilog2, 1, "! ~ & ^ | + << >>", 90, 4,
{{1, TMax},{TMin,TMax},{TMin,TMax}}},
{"float_neg", (funct_t) float_neg, (funct_t) test_float_neg, 1,
"$", 10, 2,
{{1, 1},{1,1},{1,1}}},
{"float_i2f", (funct_t) float_i2f, (funct_t) test_float_i2f, 1,
"$", 30, 4,
{{1, 1},{1,1},{1,1}}},
{"float_twice", (funct_t) float_twice, (funct_t) test_float_twice, 1,
"$", 30, 4,
{{1, 1},{1,1},{1,1}}},
{"", NULL, NULL, 0, "", 0, 0,
{{0, 0},{0,0},{0,0}}}
};