Linux fixes
[tedtools.git] / hextest.c
index 6003a5b..77f9fe3 100644 (file)
--- a/hextest.c
+++ b/hextest.c
@@ -44,10 +44,12 @@ main(int argn, char *argv[]) {
                u_int32_t orig = (u_int32_t) ( (random()%2) ? random() : rand() );
                u_int32_t new = atox( xtostr(orig) );
                char buf[10];
-               printf("ORIG:%d\tORIGHEX:%x\txtostr:%s\tatox(xtostr):%d\n", orig, orig, xtostr(orig), new);
+               if ( argn>1 )
+                       printf("ORIG:%d\tORIGHEX:%x\txtostr:%s\tatox(xtostr):%d\n", orig, orig, xtostr(orig), new);
                tassert( orig==new );
                sprintf(buf,"%x", orig);
                tassert( strcmp(buf, strlower(xtostr(orig)))==0 );
+               printf("Iteration %d: ok\n", i);
        }
        
        return 0;