mariadb/newbrt/tests/test-assert.c
Leif Walsh c181410661 [t:3666] add id tags to tests which were missing it, fixes #3666
git-svn-id: file:///svn/toku/tokudb@32940 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:59:44 -04:00

30 lines
682 B
C

/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "$Id$"
#ident "Copyright (c) 2007-2011 Tokutek Inc. All rights reserved."
#include "includes.h"
#include "test.h"
#include <signal.h>
static __attribute__((__noreturn__)) void catch_abort (int sig __attribute__((__unused__))) {
exit(1);
}
static BOOL foo (void) {
return TRUE;
}
int
test_main (int argc, const char *argv[]) {
signal (SIGABRT, catch_abort);
if (argc!=2) { printf("argcount should be 2.\n"); exit(1); }
const char *str=argv[1];
assert(strcmp(str,"ok")==0);
assert(foo());
assert(0x8000000000000000ULL);
assert(0x4000000000000000ULL);
assert(argv[1]);
return 0;
}