summaryrefslogtreecommitdiff
path: root/ASNMP/tests
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2004-04-16 23:54:25 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2004-04-16 23:54:25 +0000
commit16231afdbbf50e31503a9d33768e4534a43eb853 (patch)
tree05be0d3feec11b557ac1cc2472ee04537d41db63 /ASNMP/tests
parent39cd2d672882ba8b09e7c250c7ce697647f6d3ce (diff)
downloadATCD-16231afdbbf50e31503a9d33768e4534a43eb853.tar.gz
ChangeLogTag:Fri Apr 16 16:53:20 2004 Ossama Othman <ossama@dre.vanderbilt.edu>
Diffstat (limited to 'ASNMP/tests')
-rw-r--r--ASNMP/tests/Gauge_Test.cpp17
-rw-r--r--ASNMP/tests/Integer_Test.cpp12
2 files changed, 17 insertions, 12 deletions
diff --git a/ASNMP/tests/Gauge_Test.cpp b/ASNMP/tests/Gauge_Test.cpp
index fdb67451672..b8ea7d45edd 100644
--- a/ASNMP/tests/Gauge_Test.cpp
+++ b/ASNMP/tests/Gauge_Test.cpp
@@ -40,7 +40,9 @@ DAMAGES.
#include "asnmp/gauge.h"
#include "test_config.h"
-ACE_RCSID(tests, Gauge_Test, "$Id$")
+ACE_RCSID (tests,
+ Gauge_Test,
+ "$Id$")
/*
Gauge32( void);
@@ -56,10 +58,11 @@ ACE_RCSID(tests, Gauge_Test, "$Id$")
-- What is a Gauge? According to RFC 1155 section: 3.2.3.4
This application-wide type represents a non-negative integer
- which may increase or decreae, but which latches at a maximum
+ which may increase or decrease, but which latches at a maximum
value of 2^32-1 (4294967295 dec) for gauges.
*/
-static void TestGuage()
+static void
+TestGuage (void)
{
#if !defined (ACE_WIN32)
long l = LONG_MAX, nl = LONG_MIN; // limits.h
@@ -73,15 +76,15 @@ static void TestGuage()
Gauge32 g1;
ACE_ASSERT(g1 == def);
Gauge32 g2(l);
- ACE_ASSERT(g2 == l);
+ ACE_ASSERT(g2 == ACE_static_cast (unsigned long, l));
Gauge32 g3(nl);
- ACE_ASSERT(g3 == nl);
+ ACE_ASSERT(g3 == ACE_static_cast (unsigned long, nl));
Gauge32 g4(ul);
ACE_ASSERT(g4 == ul);
Gauge32 g5(i);
- ACE_ASSERT(g5 == i);
+ ACE_ASSERT(g5 == ACE_static_cast (unsigned long, i));
Gauge32 g6(ni);
- ACE_ASSERT(g6 == ni);
+ ACE_ASSERT(g6 == ACE_static_cast (unsigned long, ni));
Gauge32 g7(ui);
ACE_ASSERT(g7 == ui);
Gauge32 *g8 = new Gauge32(g5);
diff --git a/ASNMP/tests/Integer_Test.cpp b/ASNMP/tests/Integer_Test.cpp
index 939ca05fc43..32d4d026553 100644
--- a/ASNMP/tests/Integer_Test.cpp
+++ b/ASNMP/tests/Integer_Test.cpp
@@ -42,7 +42,9 @@ DAMAGES.
#include "asnmp/integer.h"
#include "test_config.h"
-ACE_RCSID(tests, Integer_Test, "$Id$")
+ACE_RCSID (tests,
+ Integer_Test,
+ "$Id$")
static long l = LONG_MAX, nl = LONG_MIN; // limits.h
static unsigned long ul = ULONG_MAX, def = 0;
@@ -71,13 +73,13 @@ static void TestInteger32()
#if !defined (ACE_WIN32)
// constructors
SnmpInt32 i1;
- ACE_ASSERT(i1 == def);
+ ACE_ASSERT(i1 == ACE_static_cast (long, def));
SnmpInt32 i2(l);
ACE_ASSERT(i2 == l);
SnmpInt32 i3(nl);
ACE_ASSERT(i3 == nl);
SnmpInt32 i4(ul);
- ACE_ASSERT(i4 == ul);
+ ACE_ASSERT(i4 == ACE_static_cast (long, ul));
SnmpInt32 i5(i);
ACE_ASSERT(i5 == i);
SnmpInt32 i6(ni);
@@ -111,9 +113,9 @@ static void TestInteger32()
i1 = def; // unsigned long
ACE_ASSERT(i1 == def);
i1 = us; // unsigned short
- ACE_ASSERT(i1 == us);
+ ACE_ASSERT(i1 == ACE_static_cast (long, us));
i1 = si; // unsigned short
- ACE_ASSERT(i1 == si);
+ ACE_ASSERT(i1 == ACE_static_cast (long, si))
#endif /*ACE_WIN32*/
}