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
22class TestBoilerplate: public CPPUNIT_NS::TestFixture
23{
25 /* note the statement here and then the actual prototype below */
28
29protected:
30 void testDemonstration();
31};
32
34
35void
37{
38 CPPUNIT_ASSERT_EQUAL(0, 0);
39}
40
41int
42main(int argc, char *argv[])
43{
44 return TestProgram().run(argc, argv);
45}
46
CPPUNIT_TEST(testDemonstration)
CPPUNIT_TEST_SUITE(TestBoilerplate)
implements test program's main() function while enabling customization
int run(int argc, char *argv[])
int main()
CPPUNIT_TEST_SUITE_REGISTRATION(TestBoilerplate)