Squid Web Cache
master
Loading...
Searching...
No Matches
testBoilerplate.cc
Go to the documentation of this file.
1
/*
2
* Copyright (C) 1996-2025 The Squid Software Foundation and contributors
3
*
4
* Squid software is distributed under GPLv2+ license and includes
5
* contributions from numerous individuals and organizations.
6
* Please see the COPYING and CONTRIBUTORS files for details.
7
*/
8
9
#include "
squid.h
"
10
#include "
compat/cppunit.h
"
11
#include "
unitTestMain.h
"
12
13
#include <stdexcept>
14
15
/*
16
* This is a rough example of a typical unit test file.
17
*
18
* If the class declaration is used in more than one source file,
19
* then place that declaration into a dedicated header file instead.
20
*/
21
22
class
TestBoilerplate
:
public
CPPUNIT_NS::TestFixture
23
{
24
CPPUNIT_TEST_SUITE
(
TestBoilerplate
);
25
/* note the statement here and then the actual prototype below */
26
CPPUNIT_TEST
(
testDemonstration
);
27
CPPUNIT_TEST_SUITE_END
();
28
29
protected
:
30
void
testDemonstration
();
31
};
32
33
CPPUNIT_TEST_SUITE_REGISTRATION
(
TestBoilerplate
);
34
35
void
36
TestBoilerplate::testDemonstration
()
37
{
38
CPPUNIT_ASSERT_EQUAL(0, 0);
39
}
40
41
int
42
main
(
int
argc,
char
*argv[])
43
{
44
return
TestProgram
().
run
(argc, argv);
45
}
46
TestBoilerplate
Definition
testBoilerplate.cc:23
TestBoilerplate::CPPUNIT_TEST
CPPUNIT_TEST(testDemonstration)
TestBoilerplate::CPPUNIT_TEST_SUITE_END
CPPUNIT_TEST_SUITE_END()
TestBoilerplate::testDemonstration
void testDemonstration()
Definition
testBoilerplate.cc:36
TestBoilerplate::CPPUNIT_TEST_SUITE
CPPUNIT_TEST_SUITE(TestBoilerplate)
TestProgram
implements test program's main() function while enabling customization
Definition
unitTestMain.h:26
TestProgram::run
int run(int argc, char *argv[])
Definition
unitTestMain.h:44
cppunit.h
main
int main()
Definition
kerberos_ldap_group.cc:492
squid.h
CPPUNIT_TEST_SUITE_REGISTRATION
CPPUNIT_TEST_SUITE_REGISTRATION(TestBoilerplate)
unitTestMain.h
squid
src
tests
testBoilerplate.cc
Generated by
1.9.8