Index: trunk/Ohana/src/libohana/test/string.c
===================================================================
--- trunk/Ohana/src/libohana/test/string.c	(revision 33646)
+++ trunk/Ohana/src/libohana/test/string.c	(revision 38441)
@@ -4,5 +4,5 @@
 int main (void) {
 
-  plan_tests (16);
+  plan_tests (20);
 
   diag ("libohana string.c tests");
@@ -67,4 +67,18 @@
     skip_end();
   }
+
+  /*** strextend ***/
+  {
+    int status;
+    char *string = NULL;
+
+    status = strextend(&string, "hello %s", "there");
+    ok (status, "strextend for NULL input");
+    ok (!strcmp(string, "hello there"), "strextend format");
+    
+    status = strextend(&string, "more words %d", 2);
+    ok (status, "strextend for non-NULL input");
+    ok (!strcmp(string, "hello there more words 2"), "strextend format");
+  }
   return exit_status();
 }
Index: trunk/Ohana/src/libohana/test/typetest.c
===================================================================
--- trunk/Ohana/src/libohana/test/typetest.c	(revision 33646)
+++ trunk/Ohana/src/libohana/test/typetest.c	(revision 38441)
@@ -1,13 +1,14 @@
 # include "ohana.h"
+# include "tap_ohana.h"
 
 enum
-{
+  {
     OHANA_LITTLE_ENDIAN = 0x03020100ul,
     OHANA_BIG_ENDIAN    = 0x00010203ul,
-};
+  };
 
 static const union { 
-    unsigned char bytes[4]; 
-    int value; 
+  unsigned char bytes[4]; 
+  int value; 
 } ohana_host_order = { { 0, 1, 2, 3 } };
 
@@ -15,70 +16,56 @@
 
 // we need to verify some type-related issues:
-int main (int argc, char **argv) {
+int main (void) {
 
-    int status;
+  plan_tests (4);
 
-    status = 0;
+  diag ("libohana typetest.c tests");
 
-    // 1) have we defined BYTE_SWAP correctly?
+  int status = 0;
+
+  // 1) have we defined BYTE_SWAP correctly?
 
 # ifdef BYTE_SWAP
-    if (OHANA_HOST_ORDER == OHANA_BIG_ENDIAN) {
-	fprintf (stderr, "ERROR: BYTE_SWAP is defined on a big endian machine\n");
-	fprintf (stderr, "(see libohana/include/ohana.h)\n");
-	status = 1;
-    } else {
-	fprintf (stderr, "BYTE_SWAP is small endian\n");
-    }	
+  ok (OHANA_HOST_ORDER == OHANA_LITTLE_ENDIAN, "BYTE_SWAP defined on small endian hardware (see libohana/include/ohana.h)");
 # else
-    if (OHANA_HOST_ORDER == OHANA_BIG_ENDIAN) {
-	fprintf (stderr, "NOT_BYTE_SWAP is big endian\n");
-    } else {
-	fprintf (stderr, "ERROR: BYTE_SWAP not defined on a small endian machine\n");
-	fprintf (stderr, "(see libohana/include/ohana.h)\n");
-	status = 1;
-    }	
+  ok (OHANA_HOST_ORDER == OHANA_BIG_ENDIAN, "BYTE_SWAP NOT defined on big endian hardware (see libohana/include/ohana.h)");
 # endif 
 
-    // 2) have we defined NAN correctly?
-    {
-	float fvalue;
-	double dvalue;
+  // 2) have we defined NAN correctly?
+  {
+    float fvalue;
+    double dvalue;
     
-	fvalue = NAN;
-	dvalue = NAN;
+    fvalue = NAN;
+    dvalue = NAN;
 
-	if (isfinite(fvalue)) {
-	    fprintf (stderr, "ERROR: NAN definition fails for float\n");
-	    fprintf (stderr, "fvalue: %e\n", fvalue);
-	    status = 1;
-	}
-	if (isfinite(dvalue)) {
-	    fprintf (stderr, "ERROR: NAN definition fails for double\n");
-	    fprintf (stderr, "dvalue: %e\n", dvalue);
-	    status = 1;
-	}
-
-	fprintf (stderr, "fvalue: %e (isfinite: %d)\n", fvalue, isfinite(fvalue));
-	fprintf (stderr, "dvalue: %e (isfinite: %d)\n", dvalue, isfinite(dvalue));
+    ok (isnan(fvalue), "float  NAN correctly defined"); 
+    ok (isnan(dvalue), "double NAN correctly defined"); 
 
 # ifdef __STDC_VERSION__
-	fprintf (stderr, "STDC_VERSION: %ld\n", __STDC_VERSION__);
+    diag ("STDC_VERSION: %ld\n", __STDC_VERSION__);
 # else
-	fprintf (stderr, "STDC_VERSION is not set\n");
+    diag ("STDC_VERSION is not set");
 # endif
-    }
+  }
 
-    // 3) have we defined OFF_T_FMT correctly?
-    off_t big_value;
+  // 3) have we defined OFF_T_FMT correctly?  this test should actually raise a compile-time error
+  off_t big_value = 10;
 
-    big_value = 10;
-    fprintf (stderr, "this is a big int: "OFF_T_FMT" n'est pas?\n", big_value);
+  char line[80];
+  status = snprintf (line, 80, "this is a big int: "OFF_T_FMT" n'est pas?", big_value);
+  //                            1234567890123456789         0123456789012
+  ok (status == 32, "correctly formatted an off_t int with %d chars", status);
 
-    // we could move the % out of the FMT and allow constructions like this:
-    // # define OFF_T_FMT "jd"
-    // fprintf (stderr, "this is a big int: %06"OFF_T_FMT_ALT" n'est pas?\n", big_value);
-    // still kind of ugly...
+  // we could move the % out of the FMT and allow constructions like this:
+  // # define OFF_T_FMT "jd"
+  // fprintf (stderr, "this is a big int: %06"OFF_T_FMT_ALT" n'est pas?\n", big_value);
+  // still kind of ugly...
 
-    exit (status);
+  fprintf (stderr, "max float:  %e\n", FLT_MAX);
+  fprintf (stderr, "max double: %e\n", DBL_MAX);
+  fprintf (stderr, "min float:  %e\n", FLT_MIN);
+  fprintf (stderr, "min double: %e\n", DBL_MIN);
+
+  return exit_status();
 }
