From 25fa4c6c838673faeb4bad383e2dadae5bc64ec3 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 4 Dec 2006 13:45:46 +0100 Subject: [PATCH] a bunch of tests --- src/simulator/high-precision-128.cc | 140 ++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) diff --git a/src/simulator/high-precision-128.cc b/src/simulator/high-precision-128.cc index 593798f99..93bc29934 100644 --- a/src/simulator/high-precision-128.cc +++ b/src/simulator/high-precision-128.cc @@ -132,3 +132,143 @@ HighPrecision::Zero (void) }; // namespace ns3 + + +#ifdef RUN_SELF_TESTS +#include "ns3/test.h" + +namespace ns3 { + +class HighPrecision128Tests : public Test +{ +public: + HighPrecision128Tests (); + virtual ~HighPrecision128Tests (); + virtual bool RunTests (void); +}; + +HighPrecision128Tests::HighPrecision128Tests () + : Test ("Int128") +{} +HighPrecision128Tests::~HighPrecision128Tests () +{} + +#define CHECK_EXPECTED(v,expected) \ +{ \ + if (v.GetInteger () != expected) \ + { \ + Failure () << "file="<<__FILE__<<", line="<<__LINE__<<", expected: "<