diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2010-02-17 13:44:32 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2010-02-17 13:44:32 +0000 |
commit | 6224148fdd809170d138216d72b8e6180d626aec (patch) | |
tree | f67127b4ab6026f5e29d0b6aa69bec4f8a223fb2 /test/harness/mainlists.c | |
parent | f9ebf19ba3ca4c3ee67cc88bbea407d4dd734249 (diff) | |
download | compcert-6224148fdd809170d138216d72b8e6180d626aec.tar.gz compcert-6224148fdd809170d138216d72b8e6180d626aec.zip |
Reorganization test directory
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1253 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'test/harness/mainlists.c')
-rw-r--r-- | test/harness/mainlists.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/test/harness/mainlists.c b/test/harness/mainlists.c deleted file mode 100644 index 281b919f..00000000 --- a/test/harness/mainlists.c +++ /dev/null @@ -1,35 +0,0 @@ -#include <stdio.h> -#include <stddef.h> -#include <stdlib.h> - -struct cons { int hd; struct cons * tl; }; -typedef struct cons * list; - -extern list buildlist(int n); -extern list reverselist(list l); - -int checklist(int n, list l) -{ - int i; - for (i = 0; i <= n; i++) { - if (l == NULL) return 0; - if (l->hd != i) return 0; - l = l->tl; - } - return (l == NULL); -} - -int main(int argc, char ** argv) -{ - int n; - - if (argc >= 2) n = atoi(argv[1]); else n = 10; - if (checklist(n, reverselist(buildlist(n)))) { - printf("OK\n"); - return 0; - } else { - printf("Bug!\n"); - return 2; - } -} - |