## involved in writing tests.
check_PROGRAMS += tests/testBoilerplate
tests_testBoilerplate_SOURCES = \
- tests/testBoilerplate.cc \
- tests/testBoilerplate.h
+ tests/testBoilerplate.cc
nodist_tests_testBoilerplate_SOURCES = \
$(TESTSOURCES)
tests_testBoilerplate_LDADD= \
*/
#include "squid.h"
-#include "testBoilerplate.h"
+#include "compat/cppunit.h"
#include "unitTestMain.h"
#include <stdexcept>
+/*
+ * This is a rough example of a typical unit test file.
+ *
+ * If the class declaration is used in more than one source file,
+ * then place that declaration into a dedicated header file instead.
+ */
+
+class TestBoilerplate: public CPPUNIT_NS::TestFixture
+{
+ CPPUNIT_TEST_SUITE( TestBoilerplate );
+ /* note the statement here and then the actual prototype below */
+ CPPUNIT_TEST( testDemonstration );
+ CPPUNIT_TEST_SUITE_END();
+
+protected:
+ void testDemonstration();
+};
+
CPPUNIT_TEST_SUITE_REGISTRATION( TestBoilerplate );
void
+++ /dev/null
-/*
- * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
- *
- * Squid software is distributed under GPLv2+ license and includes
- * contributions from numerous individuals and organizations.
- * Please see the COPYING and CONTRIBUTORS files for details.
- */
-
-#ifndef SQUID_SRC_TEST_BOILDERPLATE_H
-#define SQUID_SRC_TEST_BOILDERPLATE_H
-
-#include "compat/cppunit.h"
-
-/*
- * demonstration test file, as new idioms are made they will
- * be shown in the TestBoilerplate source.
- *
- * If a class declaration is only used in one source file, then declare
- * that class where it is used instead of adding a dedicated header file.
- */
-
-class TestBoilerplate: public CPPUNIT_NS::TestFixture
-{
- CPPUNIT_TEST_SUITE( TestBoilerplate );
- /* note the statement here and then the actual prototype below */
- CPPUNIT_TEST( testDemonstration );
- CPPUNIT_TEST_SUITE_END();
-
-public:
-
-protected:
- void testDemonstration();
-};
-
-#endif /* SQUID_SRC_TEST_BOILDERPLATE_H */
-