20 #include "ns3/callback.h" 21 #include "ns3/unused.h" 59 virtual void DoRun (
void);
60 virtual void DoSetup (
void);
92 :
TestCase (
"Check basic Callback mechansim")
206 virtual void DoRun (
void);
239 :
TestCase (
"Check MakeCallback() mechanism")
331 virtual void DoRun (
void);
430 :
TestCase (
"Check MakeBoundCallback() mechanism")
497 int result = target3 (2468);
511 int resultTwoA = target5 ();
517 int resultTwoB = target6 (6789);
533 int resultThreeA = target8 ();
540 int resultThreeB = target9 (5678);
564 virtual void DoRun (
void);
571 :
TestCase (
"Check Nullify() and IsNull()")
615 virtual void DoRun (
void);
634 void TestFRSix (
int &,
int &,
int &,
int &,
int &,
int &) {}
664 void TestSix (
int,
int,
int,
int,
int,
int) {}
671 void TestCSix (
int,
int,
int,
int,
int,
int)
const {}
688 :
TestCase (
"Check various MakeCallback() template functions")
void MakeBoundCallbackTarget2(bool *a)
static int gMakeBoundCallbackTest5a
static int gMakeBoundCallbackTest5b
void MakeBoundCallbackTarget4(int a, int b)
virtual ~MakeCallbackTestCase()
void TestCThree(int, int, int) const
void TestFThree(int, int, int)
void TestFRThree(int &, int &, int &)
static int gMakeBoundCallbackTest9c
static int gMakeBoundCallbackTest8a
Callback< R > MakeBoundCallback(R(*fnPtr)(TX), ARG a1)
Make Callbacks with one bound argument.
NullifyCallbackTestCase()
void CheckParentalRights(void)
void TestFRFive(int &, int &, int &, int &, int &)
#define NS_UNUSED(x)
Mark a local variable as unused.
static int gMakeBoundCallbackTest8b
MakeCallbackTemplatesTestCase()
void TestCTwo(int, int) const
static int gMakeBoundCallbackTest9b
int MakeBoundCallbackTarget8(int a, int b, int c)
virtual void DoRun(void)
Implementation to actually run this TestCase.
static bool * gMakeBoundCallbackTest2
void TestFFive(int, int, int, int, int)
virtual void DoRun(void)
Implementation to actually run this TestCase.
int MakeBoundCallbackTarget5(int a, int b)
static int gMakeBoundCallbackTest1
static int gMakeBoundCallbackTest6a
static bool gBasicCallbackTest5
virtual ~MakeCallbackTemplatesTestCase()
static int gMakeBoundCallbackTest8c
int Target4(double a, int b)
void TestSix(int, int, int, int, int, int)
static int gMakeBoundCallbackTest5c
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
static int gMakeBoundCallbackTest9d
void MakeBoundCallbackTarget1(int a)
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
void TestFSix(int, int, int, int, int, int)
static int gMakeBoundCallbackTest4a
void MakeCallbackTarget6(int)
int MakeBoundCallbackTarget6(int a, int b, int c)
virtual void DoSetup(void)
Implementation to do any local setup required for this TestCase.
virtual void DoRun(void)
Implementation to actually run this TestCase.
static CallbackTestSuite CallbackTestSuite
static bool gBasicCallbackTest6
void BasicCallbackTarget6(int)
void MakeBoundCallbackTarget7(int a, int b, int c)
virtual void DoSetup(void)
Implementation to do any local setup required for this TestCase.
static int gMakeBoundCallbackTest7a
static bool gBasicCallbackTest7
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual ~BasicCallbackTestCase()
int BasicCallbackTarget7(int a)
void TestFive(int, int, int, int, int)
static int gMakeBoundCallbackTest7c
virtual ~NullifyCallbackTestCase()
static bool gMakeCallbackTest5
static int gMakeBoundCallbackTest9a
void TestCSix(int, int, int, int, int, int) const
void TestCZero(void) const
static void StaticProtectedParent(void)
int MakeCallbackTarget7(int a)
void TestFRSix(int &, int &, int &, int &, int &, int &)
void BasicCallbackTarget5(void)
int MakeBoundCallbackTarget9(int a, int b, int c, int d)
void TestFRFour(int &, int &, int &, int &)
void TestFour(int, int, int, int)
virtual ~MakeBoundCallbackTestCase()
static int gMakeBoundCallbackTest7b
MakeBoundCallbackTestCase()
void TestFRTwo(int &, int &)
static int gMakeBoundCallbackTest6b
void TestFFour(int, int, int, int)
virtual void DoRun(void)
Implementation to actually run this TestCase.
virtual void DoSetup(void)
Implementation to do any local setup required for this TestCase.
void ProtectedParent(void)
void Nullify(void)
Discard the implementation, set it to null.
static bool gMakeCallbackTest6
static int gMakeBoundCallbackTest6c
virtual void DoSetup(void)
Implementation to do any local setup required for this TestCase.
static int gMakeBoundCallbackTest4b
virtual void DoRun(void)
Implementation to actually run this TestCase.
static bool gMakeCallbackTest7
bool IsNull(void) const
Check for null implementation.
void TestCFour(int, int, int, int) const
int Target4(double a, int b)
static int gMakeBoundCallbackTest3b
void MakeCallbackTarget5(void)
int MakeBoundCallbackTarget3(bool *a, int b)
Callback< R, Ts... > MakeCallback(R(T::*memPtr)(Ts...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
void TestCFive(int, int, int, int, int) const
void TestThree(int, int, int)
static bool * gMakeBoundCallbackTest3a