-#define T(name,OP) \
- res1 = test_##name(); \
- res2 = test2_##name(20); \
- res3 = testp_##name(); \
- res4 = testp2_##name(20); \
- printf("Test %s: %d (should be %d)\n", #name, res1, 11 OP 7); \
- printf("Test2 %s: %d (should be %d)\n", #name, res2, 11 OP 20); \
- printf("Testp %s: %d (should be %d)\n", #name, res3, 7 OP 11); \
- printf("Testp2 %s: %d (should be %d)\n", #name, res4, 20 OP 11);
+#define TTYPE(name,type,OP) \
+ res1 = test_##name##type(); \
+ res2 = test2_##name##type(20); \
+ res3 = testp_##name##type(); \
+ res4 = testp2_##name##type(20); \
+ printf("Test %s: %d (should be %d)\n", #name, res1, (type) 11 OP (type) 7); \
+ printf("Test2 %s: %d (should be %d)\n", #name, res2, (type) 11 OP (type)20); \
+ printf("Testp %s: %d (should be %d)\n", #name, res3, (type) 7 OP (type)11); \
+ printf("Testp2 %s: %d (should be %d)\n", #name, res4, (type) 20 OP (type)11);
+
+#define T(name,OP) \
+ TTYPE(name,int,OP) \
+ TTYPE(name,short,OP) \
+ TTYPE(name,char,OP)