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
stats-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/time-series-adaptor.h"
10
#include "ns3/traced-callback-typedef-test.h"
11
12
/**
13
* @file
14
* @ingroup stats-tests
15
*
16
* Verify that the TracedCallback typedefs declared by the stats 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
(
TimeSeriesAdaptor::OutputTracedCallback
);
25
#endif
// DOXYGEN_SHOULD_SKIP_THIS
26
27
/**
28
* @ingroup stats-tests
29
*
30
* TracedCallback typedef Testcase for the stats module.
31
*/
32
class
StatsTracedCallbackTypedefTestCase
:
public
TracedCallbackTypedefTestCase
33
{
34
public
:
35
StatsTracedCallbackTypedefTestCase
();
36
37
private
:
38
void
DoRun
()
override
;
39
};
40
41
StatsTracedCallbackTypedefTestCase::StatsTracedCallbackTypedefTestCase
()
42
:
TracedCallbackTypedefTestCase
(
"Check stats TracedCallback typedefs"
)
43
{
44
}
45
46
void
47
StatsTracedCallbackTypedefTestCase::DoRun
()
48
{
49
TRACED_CALLBACK_CHECK
(
TimeSeriesAdaptor::OutputTracedCallback
,
double
,
double
);
50
}
51
52
/**
53
* @ingroup stats-tests
54
*
55
* @brief stats TracedCallback typedef TestSuite
56
*/
57
class
StatsTracedCallbackTypedefTestSuite
:
public
TestSuite
58
{
59
public
:
60
StatsTracedCallbackTypedefTestSuite
();
61
};
62
63
StatsTracedCallbackTypedefTestSuite::StatsTracedCallbackTypedefTestSuite
()
64
:
TestSuite
(
"stats-traced-callback-typedef"
,
Type
::UNIT)
65
{
66
AddTestCase
(
new
StatsTracedCallbackTypedefTestCase
,
TestCase::Duration::QUICK
);
67
}
68
69
/// Static variable for test initialization
70
static
StatsTracedCallbackTypedefTestSuite
g_statsTracedCallbackTypedefTestSuite
;
71
72
}
// namespace ns3
ns3::StatsTracedCallbackTypedefTestCase
TracedCallback typedef Testcase for the stats module.
Definition
stats-traced-callback-typedef-test-suite.cc:33
ns3::StatsTracedCallbackTypedefTestCase::DoRun
void DoRun() override
Implementation to actually run this TestCase.
Definition
stats-traced-callback-typedef-test-suite.cc:47
ns3::StatsTracedCallbackTypedefTestCase::StatsTracedCallbackTypedefTestCase
StatsTracedCallbackTypedefTestCase()
Definition
stats-traced-callback-typedef-test-suite.cc:41
ns3::StatsTracedCallbackTypedefTestSuite
stats TracedCallback typedef TestSuite
Definition
stats-traced-callback-typedef-test-suite.cc:58
ns3::StatsTracedCallbackTypedefTestSuite::StatsTracedCallbackTypedefTestSuite
StatsTracedCallbackTypedefTestSuite()
Definition
stats-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::TimeSeriesAdaptor::OutputTracedCallback
void(* OutputTracedCallback)(const double now, const double data)
TracedCallback signature for output trace.
Definition
time-series-adaptor.h:111
ns3::TracedCallbackTypedefTestCase::TracedCallbackTypedefTestCase
TracedCallbackTypedefTestCase(std::string name)
Constructor.
Definition
traced-callback-typedef-test.h:117
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_statsTracedCallbackTypedefTestSuite
static StatsTracedCallbackTypedefTestSuite g_statsTracedCallbackTypedefTestSuite
Static variable for test initialization.
Definition
stats-traced-callback-typedef-test-suite.cc:70
src
stats
test
stats-traced-callback-typedef-test-suite.cc
Generated on
for ns-3 by
1.16.1