From 306b80c1cf9ab490a83b36d3e7cf07e09f9e5d68 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sat, 15 May 2010 07:44:10 +0000 Subject: mkunit.sh was a little dumb, it didn't handle a number of things correctly. I've written a new program that basically does the same thing, only it's much more clever, and does many more of the translations and conversions better, including the #line directives. Also, I dropped nids, we don't need it anymore. But now I'm ready to write some serious tests for myriad. --- src/unit/queuebuf.unit | 148 ++++++++++++++++++++++++------------------------- 1 file changed, 74 insertions(+), 74 deletions(-) (limited to 'src/unit/queuebuf.unit') diff --git a/src/unit/queuebuf.unit b/src/unit/queuebuf.unit index 9ae7d36..29ba858 100644 --- a/src/unit/queuebuf.unit +++ b/src/unit/queuebuf.unit @@ -14,91 +14,91 @@ #define RNDCHR ((char)(((double)random()/(double)RAND_MAX)*256.0)) -{=Init} - -{%testBasic01} +suite QueueBuf { - Bu::QueueBuf qb; - unitTest( qb.write("ab", 2 ) == 2 ); - unitTest( qb.write("cde", 3 ) == 3 ); - unitTest( qb.write("FG", 2 ) == 2 ); + test testBasic01 + { + Bu::QueueBuf qb; + unitTest( qb.write("ab", 2 ) == 2 ); + unitTest( qb.write("cde", 3 ) == 3 ); + unitTest( qb.write("FG", 2 ) == 2 ); - char buf[8]; - buf[7] = '\0'; - unitTest( qb.read( buf, 7 ) == 7 ); - unitTest( !strncmp( buf, "abcdeFG", 7 ) ); - unitTest( qb.read( buf, 7 ) == 0 ); -} + char buf[8]; + buf[7] = '\0'; + unitTest( qb.read( buf, 7 ) == 7 ); + unitTest( !strncmp( buf, "abcdeFG", 7 ) ); + unitTest( qb.read( buf, 7 ) == 0 ); + } -void QBUF_RANDSTR( Bu::FString &fill, unsigned int iSize ) -{ - char c; - for( unsigned int i=0; i