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")
static bool gBasicCallbackTest7
static int gMakeBoundCallbackTest5a
static int gMakeBoundCallbackTest7c
int MakeBoundCallbackTarget5(int a, int b)
static bool * gMakeBoundCallbackTest2
static int gMakeBoundCallbackTest6b
void TestFSix(int, int, int, int, int, int)
int MakeCallbackTarget7(int a)
static int gMakeBoundCallbackTest7b
static int gMakeBoundCallbackTest9a
int MakeBoundCallbackTarget8(int a, int b, int c)
static bool gMakeCallbackTest5
static int gMakeBoundCallbackTest1
static bool gBasicCallbackTest5
static bool * gMakeBoundCallbackTest3a
static int gMakeBoundCallbackTest6c
static int gMakeBoundCallbackTest9b
int BasicCallbackTarget7(int a)
void MakeBoundCallbackTarget2(bool *a)
void MakeBoundCallbackTarget7(int a, int b, int c)
static int gMakeBoundCallbackTest7a
void BasicCallbackTarget6(int)
void TestFRTwo(int &, int &)
static int gMakeBoundCallbackTest4b
static int gMakeBoundCallbackTest5b
static CallbackTestSuite CallbackTestSuite
int MakeBoundCallbackTarget6(int a, int b, int c)
static int gMakeBoundCallbackTest6a
static int gMakeBoundCallbackTest5c
void TestFFive(int, int, int, int, int)
static bool gMakeCallbackTest7
int MakeBoundCallbackTarget3(bool *a, int b)
void MakeBoundCallbackTarget4(int a, int b)
static int gMakeBoundCallbackTest3b
void TestFRFive(int &, int &, int &, int &, int &)
void TestFFour(int, int, int, int)
void TestFRThree(int &, int &, int &)
static int gMakeBoundCallbackTest8b
int MakeBoundCallbackTarget9(int a, int b, int c, int d)
void TestFThree(int, int, int)
static int gMakeBoundCallbackTest9d
void BasicCallbackTarget5(void)
void MakeCallbackTarget5(void)
static int gMakeBoundCallbackTest4a
static bool gMakeCallbackTest6
void TestFRSix(int &, int &, int &, int &, int &, int &)
void TestFRFour(int &, int &, int &, int &)
static int gMakeBoundCallbackTest8c
void MakeCallbackTarget6(int)
void MakeBoundCallbackTarget1(int a)
static int gMakeBoundCallbackTest9c
static int gMakeBoundCallbackTest8a
static bool gBasicCallbackTest6
virtual void DoRun(void)
Implementation to actually run this TestCase.
virtual void DoSetup(void)
Implementation to do any local setup required for this TestCase.
virtual ~BasicCallbackTestCase()
int Target4(double a, int b)
void TestSix(int, int, int, int, int, int)
void TestCThree(int, int, int) const
void CheckParentalRights(void)
void TestCSix(int, int, int, int, int, int) const
void TestCZero(void) const
void TestThree(int, int, int)
void TestCFour(int, int, int, int) const
void TestCFive(int, int, int, int, int) const
void TestFour(int, int, int, int)
void TestCTwo(int, int) const
void TestFive(int, int, int, int, int)
static void StaticProtectedParent(void)
void ProtectedParent(void)
MakeBoundCallbackTestCase()
virtual void DoSetup(void)
Implementation to do any local setup required for this TestCase.
virtual void DoRun(void)
Implementation to actually run this TestCase.
virtual ~MakeBoundCallbackTestCase()
MakeCallbackTemplatesTestCase()
virtual ~MakeCallbackTemplatesTestCase()
virtual void DoRun(void)
Implementation to actually run this TestCase.
int Target4(double a, int b)
virtual ~MakeCallbackTestCase()
virtual void DoRun(void)
Implementation to actually run this TestCase.
virtual void DoSetup(void)
Implementation to do any local setup required for this TestCase.
virtual ~NullifyCallbackTestCase()
NullifyCallbackTestCase()
virtual void DoSetup(void)
Implementation to do any local setup required for this TestCase.
virtual void DoRun(void)
Implementation to actually run this TestCase.
bool IsNull(void) const
Check for null implementation.
void Nullify(void)
Discard the implementation, set it to null.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
#define NS_UNUSED(x)
Mark a local variable as unused.
Callback< R > MakeBoundCallback(R(*fnPtr)(TX), ARG a1)
Make Callbacks with one bound argument.
#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.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
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...