diff options
author | Mike Buland <eichlan@xagasoft.com> | 2008-09-24 03:22:58 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2008-09-24 03:22:58 +0000 |
commit | 0975d66d2f06603f5e4016440b333aac88e2958a (patch) | |
tree | cd3767fb74c2475fd78bca9ff2d3ba825dd329f4 /src/tests | |
parent | 17df4c2b9616c29865b0d893cc797d4938a660a2 (diff) | |
download | libbu++-0975d66d2f06603f5e4016440b333aac88e2958a.tar.gz libbu++-0975d66d2f06603f5e4016440b333aac88e2958a.tar.bz2 libbu++-0975d66d2f06603f5e4016440b333aac88e2958a.tar.xz libbu++-0975d66d2f06603f5e4016440b333aac88e2958a.zip |
Ok, now all the warnings are gone (except for those coming from nids, but that's
ok, nids is still in flux, they'll be gone soon).
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/bzip2.cpp | 8 | ||||
-rw-r--r-- | src/tests/formula.cpp | 7 | ||||
-rw-r--r-- | src/tests/fstring.cpp | 4 | ||||
-rw-r--r-- | src/tests/itoserver.cpp | 4 | ||||
-rw-r--r-- | src/tests/logger.cpp | 4 | ||||
-rw-r--r-- | src/tests/mmparse.cpp | 2 | ||||
-rw-r--r-- | src/tests/procs.cpp | 2 | ||||
-rw-r--r-- | src/tests/telnetsrv.cpp | 4 |
8 files changed, 25 insertions, 10 deletions
diff --git a/src/tests/bzip2.cpp b/src/tests/bzip2.cpp index 88c5a5d..de7c034 100644 --- a/src/tests/bzip2.cpp +++ b/src/tests/bzip2.cpp | |||
@@ -10,10 +10,16 @@ | |||
10 | 10 | ||
11 | int main( int argc, char *argv[] ) | 11 | int main( int argc, char *argv[] ) |
12 | { | 12 | { |
13 | if( argc < 3 ) | ||
14 | { | ||
15 | printf("usage: %s <in> <out>\n", argv[0] ); | ||
16 | return -1; | ||
17 | } | ||
18 | |||
13 | char buf[1024]; | 19 | char buf[1024]; |
14 | size_t nRead; | 20 | size_t nRead; |
15 | 21 | ||
16 | Bu::File f( "test.bz2", "wb" ); | 22 | Bu::File f( argv[0], "wb" ); |
17 | Bu::BZip2 bz2( f ); | 23 | Bu::BZip2 bz2( f ); |
18 | 24 | ||
19 | Bu::File fin( argv[1], "rb"); | 25 | Bu::File fin( argv[1], "rb"); |
diff --git a/src/tests/formula.cpp b/src/tests/formula.cpp index 635d73f..429c306 100644 --- a/src/tests/formula.cpp +++ b/src/tests/formula.cpp | |||
@@ -9,10 +9,17 @@ | |||
9 | 9 | ||
10 | int main( int argc, char *argv[] ) | 10 | int main( int argc, char *argv[] ) |
11 | { | 11 | { |
12 | if( argc < 2 ) | ||
13 | { | ||
14 | printf("usage: %s <formula>\n", argv[0] ); | ||
15 | return -1; | ||
16 | } | ||
12 | Bu::Formula<uint32_t> uForm; | 17 | Bu::Formula<uint32_t> uForm; |
13 | Bu::Formula<double> dForm; | 18 | Bu::Formula<double> dForm; |
14 | 19 | ||
15 | printf("u: %s = %u\n", argv[1], uForm.run( argv[1] ) ); | 20 | printf("u: %s = %u\n", argv[1], uForm.run( argv[1] ) ); |
16 | printf("d: %s = %f\n", argv[1], dForm.run( argv[1] ) ); | 21 | printf("d: %s = %f\n", argv[1], dForm.run( argv[1] ) ); |
22 | |||
23 | return 0; | ||
17 | } | 24 | } |
18 | 25 | ||
diff --git a/src/tests/fstring.cpp b/src/tests/fstring.cpp index 6288ccb..b392eb7 100644 --- a/src/tests/fstring.cpp +++ b/src/tests/fstring.cpp | |||
@@ -116,7 +116,7 @@ void doTimings() | |||
116 | } | 116 | } |
117 | 117 | ||
118 | #define pem printf("---------\n%08tX: %s\n%08tX: %s\n", (ptrdiff_t)str.getStr(), str.getStr(), (ptrdiff_t)str2.getStr(), str2.getStr() ); | 118 | #define pem printf("---------\n%08tX: %s\n%08tX: %s\n", (ptrdiff_t)str.getStr(), str.getStr(), (ptrdiff_t)str2.getStr(), str2.getStr() ); |
119 | int main( int argc, char *argv[] ) | 119 | int main( ) |
120 | { | 120 | { |
121 | Bu::FString fs1; | 121 | Bu::FString fs1; |
122 | for( int j = 0; j < 500000; j++ ) fs1 += (char)('a'+(j%26)); | 122 | for( int j = 0; j < 500000; j++ ) fs1 += (char)('a'+(j%26)); |
@@ -148,5 +148,7 @@ int main( int argc, char *argv[] ) | |||
148 | printf("%d == %d\n", Bu::__calcHashCode( str ), Bu::__calcHashCode( str.getStr() ) ); | 148 | printf("%d == %d\n", Bu::__calcHashCode( str ), Bu::__calcHashCode( str.getStr() ) ); |
149 | 149 | ||
150 | doTimings(); | 150 | doTimings(); |
151 | |||
152 | return 0; | ||
151 | } | 153 | } |
152 | 154 | ||
diff --git a/src/tests/itoserver.cpp b/src/tests/itoserver.cpp index f4ab726..319b11b 100644 --- a/src/tests/itoserver.cpp +++ b/src/tests/itoserver.cpp | |||
@@ -24,7 +24,7 @@ public: | |||
24 | TRACE(); | 24 | TRACE(); |
25 | } | 25 | } |
26 | 26 | ||
27 | virtual void onNewConnection( Bu::Client *pClient ) | 27 | virtual void onNewConnection( Bu::Client * ) |
28 | { | 28 | { |
29 | TRACE(); | 29 | TRACE(); |
30 | // Huh... | 30 | // Huh... |
@@ -50,7 +50,7 @@ public: | |||
50 | TRACE(); | 50 | TRACE(); |
51 | } | 51 | } |
52 | 52 | ||
53 | virtual void onNewConnection( Bu::Client *pClient, int iPort ) | 53 | virtual void onNewConnection( Bu::Client *pClient, int ) |
54 | { | 54 | { |
55 | TRACE(); | 55 | TRACE(); |
56 | pClient->setProtocol( new ProtocolEcho() ); | 56 | pClient->setProtocol( new ProtocolEcho() ); |
diff --git a/src/tests/logger.cpp b/src/tests/logger.cpp index 71a1ca2..04cefe8 100644 --- a/src/tests/logger.cpp +++ b/src/tests/logger.cpp | |||
@@ -17,7 +17,7 @@ class Thing | |||
17 | lineLog( 2, "Want a thing?"); | 17 | lineLog( 2, "Want a thing?"); |
18 | } | 18 | } |
19 | 19 | ||
20 | void go( int i ) | 20 | void go( int ) |
21 | { | 21 | { |
22 | lineLog( 1, "GO!!!!"); | 22 | lineLog( 1, "GO!!!!"); |
23 | } | 23 | } |
@@ -32,6 +32,6 @@ int main() | |||
32 | logHexDump( 5, "This is a test of the hex-dump facility", 16, "Random stuff"); | 32 | logHexDump( 5, "This is a test of the hex-dump facility", 16, "Random stuff"); |
33 | 33 | ||
34 | Thing gh; | 34 | Thing gh; |
35 | gh.go( 6); | 35 | gh.go( 6 ); |
36 | } | 36 | } |
37 | 37 | ||
diff --git a/src/tests/mmparse.cpp b/src/tests/mmparse.cpp index c60aa1c..9b79e4d 100644 --- a/src/tests/mmparse.cpp +++ b/src/tests/mmparse.cpp | |||
@@ -8,7 +8,7 @@ | |||
8 | #include "bu/minimacro.h" | 8 | #include "bu/minimacro.h" |
9 | #include "bu/fstring.h" | 9 | #include "bu/fstring.h" |
10 | 10 | ||
11 | int main( int argc, char *argv[] ) | 11 | int main() |
12 | { | 12 | { |
13 | Bu::MiniMacro mm; | 13 | Bu::MiniMacro mm; |
14 | 14 | ||
diff --git a/src/tests/procs.cpp b/src/tests/procs.cpp index c233040..c4b3ebc 100644 --- a/src/tests/procs.cpp +++ b/src/tests/procs.cpp | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | #include <stdio.h> | 3 | #include <stdio.h> |
4 | 4 | ||
5 | int main( int agrc, char *argv[] ) | 5 | int main() |
6 | { | 6 | { |
7 | //Bu::Process p( argv[1], argv+1 ); | 7 | //Bu::Process p( argv[1], argv+1 ); |
8 | Bu::Process p("mplayer", "mplayer", "dvd://", "-framedrop", | 8 | Bu::Process p("mplayer", "mplayer", "dvd://", "-framedrop", |
diff --git a/src/tests/telnetsrv.cpp b/src/tests/telnetsrv.cpp index 9fe2881..f9457e2 100644 --- a/src/tests/telnetsrv.cpp +++ b/src/tests/telnetsrv.cpp | |||
@@ -57,7 +57,7 @@ public: | |||
57 | { | 57 | { |
58 | } | 58 | } |
59 | 59 | ||
60 | virtual void onNewConnection( Bu::Client *pClient, int iPort ) | 60 | virtual void onNewConnection( Bu::Client *pClient, int ) |
61 | { | 61 | { |
62 | printf("New connection.\n"); | 62 | printf("New connection.\n"); |
63 | 63 | ||
@@ -75,7 +75,7 @@ private: | |||
75 | 75 | ||
76 | }; | 76 | }; |
77 | 77 | ||
78 | int main( int argc, char *argv[] ) | 78 | int main() |
79 | { | 79 | { |
80 | TelServer ts; | 80 | TelServer ts; |
81 | 81 | ||