A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
examples-as-tests-test-suite.cc
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2020 Lawrence Livermore National Laboratory
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Peter D. Barnes, Jr. <pdbarnes@llnl.gov>
19
*/
20
21
#include "ns3/example-as-test.h"
22
#include "ns3/system-path.h"
23
24
#include <vector>
25
26
using namespace
ns3
;
27
41
namespace
ns3
{
42
43
namespace
tests {
48
class
ExamplesAsTestsTestSuite
:
public
TestSuite
49
{
50
public
:
51
ExamplesAsTestsTestSuite
();
52
};
53
54
55
ExamplesAsTestsTestSuite::ExamplesAsTestsTestSuite
()
56
:
TestSuite
(
"examples-as-tests-test-suite"
, UNIT)
57
{
58
AddTestCase
(
new
ExampleAsTestCase
(
"core-example-simulator"
,
"sample-simulator"
, NS_TEST_SOURCEDIR));
59
60
AddTestCase
(
new
ExampleAsTestCase
(
"core-example-sample-random-variable"
,
"sample-random-variable"
, NS_TEST_SOURCEDIR));
61
62
AddTestCase
(
new
ExampleAsTestCase
(
"core-example-command-line"
,
"command-line-example"
, NS_TEST_SOURCEDIR));
63
}
64
70
static
ExamplesAsTestsTestSuite
g_examplesAsTestsTestSuite
;
71
79
static
ExampleAsTestSuite
g_exampleCommandLineTest
(
"core-example-command-line"
,
"command-line-example"
, NS_TEST_SOURCEDIR);
80
81
}
// namespace tests
82
83
}
// namespace ns3
84
85
86
87
88
ns3::TestSuite
A suite of tests to run.
Definition:
test.h:1343
ns3::tests::g_examplesAsTestsTestSuite
static ExamplesAsTestsTestSuite g_examplesAsTestsTestSuite
ExampleAsTestsTestSuite instance variable.
Definition:
examples-as-tests-test-suite.cc:70
ns3::ExampleAsTestSuite
Execute an example program as a test suite.
Definition:
example-as-test.h:196
ns3::tests::ExamplesAsTestsTestSuite::ExamplesAsTestsTestSuite
ExamplesAsTestsTestSuite()
Definition:
examples-as-tests-test-suite.cc:55
ns3::tests::ExamplesAsTestsTestSuite
Run examples as tests, checking stdout for regressions.
Definition:
examples-as-tests-test-suite.cc:48
ns3::TestCase::AddTestCase
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Definition:
test.cc:299
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::ExampleAsTestCase
Execute an example program as a test, by comparing the output to a reference file.
Definition:
example-as-test.h:49
ns3::tests::g_exampleCommandLineTest
static ExampleAsTestSuite g_exampleCommandLineTest("core-example-command-line", "command-line-example", NS_TEST_SOURCEDIR)
ExampleTestSuite instance variables.
src
core
test
examples-as-tests-test-suite.cc
Generated on Sun Jun 28 2020 12:04:38 for ns-3 by
1.8.14