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
mesh-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/peer-management-protocol.h"
10
#include "ns3/traced-callback-typedef-test.h"
11
12
/**
13
* @file
14
* @ingroup mesh-test
15
*
16
* Verify that the TracedCallback typedefs declared by the mesh 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
(
dot11s::PeerManagementProtocol::LinkOpenCloseTracedCallback
);
25
#endif
// DOXYGEN_SHOULD_SKIP_THIS
26
27
/**
28
* @ingroup mesh-test
29
*
30
* TracedCallback typedef Testcase for the mesh module.
31
*/
32
class
Dot11sTracedCallbackTypedefTestCase
:
public
TracedCallbackTypedefTestCase
33
{
34
public
:
35
Dot11sTracedCallbackTypedefTestCase
();
36
37
private
:
38
void
DoRun
()
override
;
39
};
40
41
Dot11sTracedCallbackTypedefTestCase::Dot11sTracedCallbackTypedefTestCase
()
42
:
TracedCallbackTypedefTestCase
(
"Check mesh TracedCallback typedefs"
)
43
{
44
}
45
46
void
47
Dot11sTracedCallbackTypedefTestCase::DoRun
()
48
{
49
TRACED_CALLBACK_CHECK
(
dot11s::PeerManagementProtocol::LinkOpenCloseTracedCallback
,
50
Mac48Address
,
51
Mac48Address
);
52
}
53
54
/**
55
* @ingroup mesh-test
56
*
57
* @brief mesh TracedCallback typedef TestSuite
58
*/
59
class
Dot11sTracedCallbackTypedefTestSuite
:
public
TestSuite
60
{
61
public
:
62
Dot11sTracedCallbackTypedefTestSuite
();
63
};
64
65
Dot11sTracedCallbackTypedefTestSuite::Dot11sTracedCallbackTypedefTestSuite
()
66
:
TestSuite
(
"mesh-traced-callback-typedef"
,
Type
::UNIT)
67
{
68
AddTestCase
(
new
Dot11sTracedCallbackTypedefTestCase
,
TestCase::Duration::QUICK
);
69
}
70
71
/// Static variable for test initialization
72
static
Dot11sTracedCallbackTypedefTestSuite
g_dot11sTracedCallbackTypedefTestSuite
;
73
74
}
// namespace ns3
ns3::Dot11sTracedCallbackTypedefTestCase
TracedCallback typedef Testcase for the mesh module.
Definition
mesh-traced-callback-typedef-test-suite.cc:33
ns3::Dot11sTracedCallbackTypedefTestCase::Dot11sTracedCallbackTypedefTestCase
Dot11sTracedCallbackTypedefTestCase()
Definition
mesh-traced-callback-typedef-test-suite.cc:41
ns3::Dot11sTracedCallbackTypedefTestCase::DoRun
void DoRun() override
Implementation to actually run this TestCase.
Definition
mesh-traced-callback-typedef-test-suite.cc:47
ns3::Dot11sTracedCallbackTypedefTestSuite
mesh TracedCallback typedef TestSuite
Definition
mesh-traced-callback-typedef-test-suite.cc:60
ns3::Dot11sTracedCallbackTypedefTestSuite::Dot11sTracedCallbackTypedefTestSuite
Dot11sTracedCallbackTypedefTestSuite()
Definition
mesh-traced-callback-typedef-test-suite.cc:65
ns3::Mac48Address
an EUI-48 address
Definition
mac48-address.h:37
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::dot11s::PeerManagementProtocol::LinkOpenCloseTracedCallback
void(* LinkOpenCloseTracedCallback)(Mac48Address src, const Mac48Address dst)
TracedCallback signature for link open/close events.
Definition
peer-management-protocol.h:233
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_dot11sTracedCallbackTypedefTestSuite
static Dot11sTracedCallbackTypedefTestSuite g_dot11sTracedCallbackTypedefTestSuite
Static variable for test initialization.
Definition
mesh-traced-callback-typedef-test-suite.cc:72
src
mesh
test
mesh-traced-callback-typedef-test-suite.cc
Generated on
for ns-3 by
1.16.1