00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
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 }