2008-02-08 03:17:38 +00:00
|
|
|
/* -*- mode: C; c-basic-offset: 4 -*- */
|
2013-04-16 23:57:21 -04:00
|
|
|
#include "includes.h"
|
2013-04-16 23:57:32 -04:00
|
|
|
|
|
|
|
#include "test.h"
|
2008-02-08 03:17:38 +00:00
|
|
|
#include <signal.h>
|
2013-04-16 23:57:21 -04:00
|
|
|
|
2008-02-07 16:35:39 +00:00
|
|
|
|
2008-04-02 23:40:36 +00:00
|
|
|
static __attribute__((__noreturn__)) void catch_abort (int sig __attribute__((__unused__))) {
|
2008-02-08 03:17:38 +00:00
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
|
2008-04-02 23:40:36 +00:00
|
|
|
static BOOL foo (void) {
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-04-16 23:57:32 -04:00
|
|
|
int
|
|
|
|
test_main (int argc, const char *argv[]) {
|
2008-02-08 03:17:38 +00:00
|
|
|
signal (SIGABRT, catch_abort);
|
2008-02-07 16:35:39 +00:00
|
|
|
if (argc!=2) { printf("argcount should be 2.\n"); exit(1); }
|
|
|
|
const char *str=argv[1];
|
2008-02-08 03:17:38 +00:00
|
|
|
assert(strcmp(str,"ok")==0);
|
2008-04-02 23:40:36 +00:00
|
|
|
assert(foo());
|
2008-04-03 00:13:34 +00:00
|
|
|
assert(0x8000000000000000ULL);
|
|
|
|
assert(0x4000000000000000ULL);
|
2008-04-02 23:40:36 +00:00
|
|
|
assert(argv[1]);
|
2008-02-07 16:35:39 +00:00
|
|
|
return 0;
|
|
|
|
}
|