diff options
author | Mike Buland <eichlan@xagasoft.com> | 2010-05-15 07:44:10 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2010-05-15 07:44:10 +0000 |
commit | 306b80c1cf9ab490a83b36d3e7cf07e09f9e5d68 (patch) | |
tree | 32c35f8507edb4ea403f4ebc4b625c1096f6f384 /src/tests | |
parent | 11413d228bae2919fe69c83b74c7ff49209dd65a (diff) | |
download | libbu++-306b80c1cf9ab490a83b36d3e7cf07e09f9e5d68.tar.gz libbu++-306b80c1cf9ab490a83b36d3e7cf07e09f9e5d68.tar.bz2 libbu++-306b80c1cf9ab490a83b36d3e7cf07e09f9e5d68.tar.xz libbu++-306b80c1cf9ab490a83b36d3e7cf07e09f9e5d68.zip |
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.
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/nids.cpp | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/src/tests/nids.cpp b/src/tests/nids.cpp deleted file mode 100644 index 22bf450..0000000 --- a/src/tests/nids.cpp +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007-2010 Xagasoft, All rights reserved. | ||
3 | * | ||
4 | * This file is part of the libbu++ library and is released under the | ||
5 | * terms of the license contained in the file LICENSE. | ||
6 | */ | ||
7 | |||
8 | #include "bu/file.h" | ||
9 | #include "bu/nids.h" | ||
10 | #include "bu/nidsstream.h" | ||
11 | |||
12 | int main( int argc, char *argv[] ) | ||
13 | { | ||
14 | if( argc < 3 ) | ||
15 | { | ||
16 | printf("usage: %s [r|w] <output>\n\n", argv[0] ); | ||
17 | return 1; | ||
18 | } | ||
19 | |||
20 | if( argv[1][0] == 'w' ) | ||
21 | { | ||
22 | Bu::File fOut( argv[2], | ||
23 | Bu::File::ReadWrite|Bu::File::Create|Bu::File::Truncate ); | ||
24 | Bu::Nids n( fOut ); | ||
25 | |||
26 | n.initialize( 32, 1 ); | ||
27 | /* Bu::NidsStream s = n.openStream( n.createStream() ); | ||
28 | |||
29 | Bu::FString sBuf( 350 ); | ||
30 | memset( sBuf.getStr(), 'a', 350 ); | ||
31 | s.write( sBuf );*/ | ||
32 | } | ||
33 | else if( argv[1][0] == 'r' ) | ||
34 | { | ||
35 | Bu::File fOut( argv[2], Bu::File::Read ); | ||
36 | Bu::Nids n( fOut ); | ||
37 | n.initialize(); | ||
38 | /* | ||
39 | Bu::NidsStream s = n.openStream( 0 ); | ||
40 | char buf[75]; | ||
41 | for( int j = 0; j < 3; j++ ) | ||
42 | { | ||
43 | int iRead = s.read( buf, 75 ); | ||
44 | fwrite( buf, 1, iRead, stdout ); | ||
45 | printf("\n(read %d chars)\n", iRead ); | ||
46 | } | ||
47 | printf("Position: %ld\n", s.tell() ); | ||
48 | */ | ||
49 | } | ||
50 | else | ||
51 | { | ||
52 | printf("r or w, those are your choices.\n"); | ||
53 | } | ||
54 | |||
55 | return 0; | ||
56 | } | ||
57 | |||