diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1996-10-21 21:41:34 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1996-10-21 21:41:34 +0000 |
commit | a5fdebc5f6375078ec1763850a4ca23ec7fe6458 (patch) | |
tree | bcf0a25c3d45a209a6e3ac37b233a4812f29c732 /tests/Time_Value_Test.cpp | |
download | ATCD-a5fdebc5f6375078ec1763850a4ca23ec7fe6458.tar.gz |
Initial revision
Diffstat (limited to 'tests/Time_Value_Test.cpp')
-rw-r--r-- | tests/Time_Value_Test.cpp | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/tests/Time_Value_Test.cpp b/tests/Time_Value_Test.cpp new file mode 100644 index 00000000000..deb937a59fd --- /dev/null +++ b/tests/Time_Value_Test.cpp @@ -0,0 +1,49 @@ +// ============================================================================ +// @(#)Time_Value_Test.cpp 1.1 10/18/96 + +// +// = LIBRARY +// tests +// +// = FILENAME +// Time_Value_Test.cpp +// +// = DESCRIPTION +// This is a simple test of ACE_Time_Value. No command line +// arguments are needed to run the test. +// +// = AUTHOR +// Prashant Jain +// +// ============================================================================ + +#include "ace/ACE.h" +#include "ace/Log_Msg.h" +#include "test_config.h" + +int +main (int argc, char *argv[]) +{ + ACE_START_TEST; + + ACE_Time_Value tv1; + ACE_Time_Value tv2 (2); + ACE_Time_Value tv3 (100); + ACE_Time_Value tv4 (1, 1000000); + ACE_Time_Value tv5 (2); + ACE_Time_Value tv6 (1, -1000000); + + ACE_ASSERT (tv1 == ACE_Time_Value (0)); + ACE_ASSERT (tv2 < tv3); + ACE_ASSERT (tv2 <= tv2); + ACE_ASSERT (tv2 >= tv4); + ACE_ASSERT (tv5 >= tv6); + ACE_ASSERT (tv2 == ACE_Time_Value (1, 1000000)); + ACE_ASSERT (tv5 == tv4); + ACE_ASSERT (tv2 == tv4); + ACE_ASSERT (tv1 != tv2); + ACE_ASSERT (tv6 == tv1); + + ACE_END_TEST; + return 0; +} |