summaryrefslogtreecommitdiffstats
path: root/libacc/tests/data/film.c
diff options
context:
space:
mode:
Diffstat (limited to 'libacc/tests/data/film.c')
-rw-r--r--libacc/tests/data/film.c53
1 files changed, 0 insertions, 53 deletions
diff --git a/libacc/tests/data/film.c b/libacc/tests/data/film.c
deleted file mode 100644
index 00c2d36..0000000
--- a/libacc/tests/data/film.c
+++ /dev/null
@@ -1,53 +0,0 @@
-// Test logical and bitwise AND and OR
-
-int test(int x, int y) {
- int v = x || y;
- return v;
-}
-
-int test2(int x, int y) {
- if(x | y) {
- return 1;
- } else {
- return 0;
- }
-}
-
-int test3(int x, int y) {
- int v = x && y;
- return v;
-}
-
-int test4(int x, int y) {
- if(x & y) {
- return 1;
- } else {
- return 0;
- }
-}
-
-int main(int index)
-{
- int x,y;
- printf("testing...\n");
- int totalBad = 0;
- for(y = 0; y < 2; y++) {
- for(x = 0; x < 2; x++) {
- int a = test(x,y);
- int b = test2(x,y);
- if (a != b) {
- printf("Results differ: OR x=%d y=%d a=%d b=%d\n", x, y, a, b);
- totalBad++;
- }
- a = test3(x,y);
- b = test4(x,y);
- if (a != b) {
- printf("Results differ: AND x=%d y=%d a=%d b=%d\n", x, y, a, b);
- totalBad++;
- }
- }
- }
- printf("Total bad: %d\n", totalBad);
- return 0;
-}
-