Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

time_util_bad.c

Go to the documentation of this file.
00001 /*
00002  * time_util_bad.c
00003  *
00004  * Copyright (c) 2003 The University of Utah and the Flux Group.
00005  * All rights reserved.
00006  *
00007  * This file is licensed under the terms of the GNU Public License.  
00008  * See the file "license.terms" for restrictions on redistribution 
00009  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
00010  */
00011 
00012 /**
00013  * @file time_util_bad.c
00014  *
00015  * Test function in time_util.h with bad inputs.
00016  */
00017 
00018 #include "config.h"
00019 
00020 #ifndef DEBUG
00021 #define DEBUG
00022 #endif
00023 
00024 #include <sys/types.h>
00025 #include <sys/time.h>
00026 
00027 #include <assert.h>
00028 #include <assert_pp.h>
00029 
00030 #include "time_util.h"
00031 
00032 int main(int argc, char *argv[])
00033 {
00034     unsigned long long us;
00035     
00036     assert(!string_to_microsec(&us, ""));
00037 
00038     assert(!string_to_microsec(&us, "foo"));
00039 
00040     assert(!string_to_microsec(&us, "foo10"));
00041 
00042     assert(!string_to_microsec(&us, "10foo"));
00043 
00044     assert(!string_to_microsec(&us, "10sec"));
00045 
00046     assert(!string_to_microsec(&us, "10uss"));
00047 
00048     return( EXIT_SUCCESS );
00049 }

Generated on Mon Dec 1 16:29:07 2003 for CPU Broker by doxygen 1.3.4