A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
dsr-traced-callback-typedef-test-suite.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2015 Lawrence Livermore National Laboratory
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Peter D. Barnes, Jr. <pdbarnes@llnl.gov>
7
*/
8
9
#include "ns3/dsr-option-header.h"
10
#include "ns3/traced-callback-typedef-test.h"
11
12
/**
13
* @file
14
* @ingroup dsr-test
15
*
16
* Verify that the TracedCallback typedefs declared by the dsr module are
17
* invoked with the right type and number of arguments.
18
*/
19
20
namespace
ns3
21
{
22
23
#ifndef DOXYGEN_SHOULD_SKIP_THIS
24
TRACED_CALLBACK_TYPENAME
(
dsr::DsrOptionSRHeader::TracedCallback
);
25
#endif
// DOXYGEN_SHOULD_SKIP_THIS
26
27
/**
28
* @ingroup dsr-test
29
*
30
* TracedCallback typedef Testcase for the dsr module.
31
*/
32
class
DsrTracedCallbackTypedefTestCase
:
public
TracedCallbackTypedefTestCase
33
{
34
public
:
35
DsrTracedCallbackTypedefTestCase
();
36
37
private
:
38
void
DoRun
()
override
;
39
};
40
41
DsrTracedCallbackTypedefTestCase::DsrTracedCallbackTypedefTestCase
()
42
:
TracedCallbackTypedefTestCase
(
"Check dsr TracedCallback typedefs"
)
43
{
44
}
45
46
void
47
DsrTracedCallbackTypedefTestCase::DoRun
()
48
{
49
TRACED_CALLBACK_CHECK
(
dsr::DsrOptionSRHeader::TracedCallback
,
const
dsr::DsrOptionSRHeader
&);
50
}
51
52
/**
53
* @ingroup dsr-test
54
*
55
* @brief dsr TracedCallback typedef TestSuite
56
*/
57
class
DsrTracedCallbackTypedefTestSuite
:
public
TestSuite
58
{
59
public
:
60
DsrTracedCallbackTypedefTestSuite
();
61
};
62
63
DsrTracedCallbackTypedefTestSuite::DsrTracedCallbackTypedefTestSuite
()
64
:
TestSuite
(
"dsr-traced-callback-typedef"
,
Type
::UNIT)
65
{
66
AddTestCase
(
new
DsrTracedCallbackTypedefTestCase
,
TestCase::Duration::QUICK
);
67
}
68
69
/// Static variable for test initialization
70
static
DsrTracedCallbackTypedefTestSuite
g_dsrTracedCallbackTypedefTestSuite
;
71
72
}
// namespace ns3
ns3::DsrTracedCallbackTypedefTestCase
TracedCallback typedef Testcase for the dsr module.
Definition
dsr-traced-callback-typedef-test-suite.cc:33
ns3::DsrTracedCallbackTypedefTestCase::DoRun
void DoRun() override
Implementation to actually run this TestCase.
Definition
dsr-traced-callback-typedef-test-suite.cc:47
ns3::DsrTracedCallbackTypedefTestCase::DsrTracedCallbackTypedefTestCase
DsrTracedCallbackTypedefTestCase()
Definition
dsr-traced-callback-typedef-test-suite.cc:41
ns3::DsrTracedCallbackTypedefTestSuite
dsr TracedCallback typedef TestSuite
Definition
dsr-traced-callback-typedef-test-suite.cc:58
ns3::DsrTracedCallbackTypedefTestSuite::DsrTracedCallbackTypedefTestSuite
DsrTracedCallbackTypedefTestSuite()
Definition
dsr-traced-callback-typedef-test-suite.cc:63
ns3::TestCase::AddTestCase
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
Definition
test.cc:296
ns3::TestCase::Duration::QUICK
@ QUICK
Fast test.
Definition
test.h:1057
ns3::TestSuite::Type
Type
Type of test.
Definition
test.h:1271
ns3::TestSuite::TestSuite
TestSuite(std::string name, Type type=Type::UNIT)
Construct a new test suite.
Definition
test.cc:494
ns3::TracedCallbackTypedefTestCase::TracedCallbackTypedefTestCase
TracedCallbackTypedefTestCase(std::string name)
Constructor.
Definition
traced-callback-typedef-test.h:117
ns3::dsr::DsrOptionSRHeader
Header of Dsr Option Source Route.
Definition
dsr-option-header.h:529
ns3::dsr::DsrOptionSRHeader::TracedCallback
void(* TracedCallback)(const DsrOptionSRHeader &header)
TracedCallback signature for DsrOptionSrHeader.
Definition
dsr-option-header.h:633
TRACED_CALLBACK_CHECK
#define TRACED_CALLBACK_CHECK(U,...)
Check the TracedCallback by calling its Invoke function.
Definition
traced-callback-typedef-test.h:179
TRACED_CALLBACK_TYPENAME
#define TRACED_CALLBACK_TYPENAME(T)
Declare the stringified name of a TracedCallback typedef.
Definition
traced-callback-typedef-test.h:72
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::g_dsrTracedCallbackTypedefTestSuite
static DsrTracedCallbackTypedefTestSuite g_dsrTracedCallbackTypedefTestSuite
Static variable for test initialization.
Definition
dsr-traced-callback-typedef-test-suite.cc:70
src
dsr
test
dsr-traced-callback-typedef-test-suite.cc
Generated on
for ns-3 by
1.16.1