#include "JCounter.hpp"#include "JCounter.cpp"Go to the source code of this file.
Functions | |
| void | test () |
| int | main () |
|
|
Definition at line 42 of file JCounterTest.cpp. 00042 {
00043 test();
00044 return 0;
00045 }
|
|
|
Definition at line 7 of file JCounterTest.cpp. 00008 {
00009 JCounter n[ 6 ] =
00010 {
00011 JCounter( 1 )
00012 ,JCounter( 10, 0 )
00013 ,JCounter( 100 )
00014 ,JCounter( 1000, 400 )
00015 ,JCounter( 10000 )
00016 ,JCounter( (unsigned)(-1) )
00017 };
00018
00019
00020 register int i = 0;
00021
00022 for( i = 0; i < 6; i++ ) {
00023 cout << ( ++n[i] * n[i] - n[i] ) << endl;
00024 }
00025
00026 for( i = 0; i < 6; i++ ) {
00027 cout << ( n[i]-- / n[i] + n[i] ) << endl;
00028 }
00029
00030 for( i = 0; i < 6; i++ ) {
00031 ULONG l = n[i];
00032 cout << l << endl;
00033 assert( l == n[i] );
00034 assert( l >= --n[i] );
00035 assert( l == ++n[i] );
00036 assert( l <= ~n[i] );
00037 assert( l >= !n[i] );
00038 }
00039
00040 }
|
1.2.11.1 written by Dimitri van Heesch,
© 1997-2001