2013-04-17 00:00:59 -04:00
|
|
|
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
|
|
|
|
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
|
2013-04-16 23:59:44 -04:00
|
|
|
#ident "$Id$"
|
2013-04-17 00:00:59 -04:00
|
|
|
#ident "Copyright (c) 2007-2012 Tokutek Inc. All rights reserved."
|
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);
|
|
|
|
}
|
|
|
|
|
2013-04-17 00:01:01 -04:00
|
|
|
static bool foo (void) {
|
|
|
|
return true;
|
2008-04-02 23:40:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|