ID
int64
1
142k
Language
stringclasses
1 value
Repository Name
stringclasses
101 values
File Name
stringlengths
3
101
File Path in Repository
stringlengths
6
231
Code
stringlengths
1
11.9M
1
cpp
cpputest
CommandLineArguments.cpp
src/CppUTest/CommandLineArguments.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
2
cpp
cpputest
MemoryLeakDetector.cpp
src/CppUTest/MemoryLeakDetector.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
3
cpp
cpputest
CommandLineTestRunner.cpp
src/CppUTest/CommandLineTestRunner.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
4
cpp
cpputest
TestRegistry.cpp
src/CppUTest/TestRegistry.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
5
cpp
cpputest
JUnitTestOutput.cpp
src/CppUTest/JUnitTestOutput.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
6
cpp
cpputest
TestFilter.cpp
src/CppUTest/TestFilter.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
7
cpp
cpputest
TeamCityTestOutput.cpp
src/CppUTest/TeamCityTestOutput.cpp
#include "CppUTest/TestHarness.h" #include "CppUTest/TeamCityTestOutput.h" TeamCityTestOutput::TeamCityTestOutput() : currtest_(NULLPTR), currGroup_() { } TeamCityTestOutput::~TeamCityTestOutput() { } void TeamCityTestOutput::printCurrentTestStarted(const UtestShell& test) { print("##teamcity[testStarted name='"...
8
cpp
cpputest
TestHarness_c.cpp
src/CppUTest/TestHarness_c.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
9
cpp
cpputest
SimpleMutex.cpp
src/CppUTest/SimpleMutex.cpp
/* * Copyright (c) 2014, Michael Feathers, James Grenning, Bas Vodde and Chen YewMing * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the a...
10
cpp
cpputest
TestFailure.cpp
src/CppUTest/TestFailure.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
11
cpp
cpputest
TestTestingFixture.cpp
src/CppUTest/TestTestingFixture.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
12
cpp
cpputest
TestOutput.cpp
src/CppUTest/TestOutput.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
13
cpp
cpputest
MemoryLeakWarningPlugin.cpp
src/CppUTest/MemoryLeakWarningPlugin.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
14
cpp
cpputest
SimpleStringInternalCache.cpp
src/CppUTest/SimpleStringInternalCache.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
15
cpp
cpputest
SimpleString.cpp
src/CppUTest/SimpleString.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
16
cpp
cpputest
TestResult.cpp
src/CppUTest/TestResult.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
17
cpp
cpputest
TestPlugin.cpp
src/CppUTest/TestPlugin.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
18
cpp
cpputest
TestMemoryAllocator.cpp
src/CppUTest/TestMemoryAllocator.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
19
cpp
cpputest
Utest.cpp
src/CppUTest/Utest.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
20
cpp
cpputest
MockActualCall.cpp
src/CppUTestExt/MockActualCall.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
21
cpp
cpputest
MockExpectedCallsList.cpp
src/CppUTestExt/MockExpectedCallsList.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
22
cpp
cpputest
MemoryReporterPlugin.cpp
src/CppUTestExt/MemoryReporterPlugin.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
23
cpp
cpputest
MemoryReportAllocator.cpp
src/CppUTestExt/MemoryReportAllocator.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
24
cpp
cpputest
CodeMemoryReportFormatter.cpp
src/CppUTestExt/CodeMemoryReportFormatter.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
25
cpp
cpputest
GTest.cpp
src/CppUTestExt/GTest.cpp
#include "CppUTest/TestHarness.h" #include "CppUTestExt/GTestSupport.h" void CppuTestGTestIgnoreLeaksInTest() { IGNORE_ALL_LEAKS_IN_TEST(); }
26
cpp
cpputest
MockNamedValue.cpp
src/CppUTestExt/MockNamedValue.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
27
cpp
cpputest
MockSupportPlugin.cpp
src/CppUTestExt/MockSupportPlugin.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
28
cpp
cpputest
MockExpectedCall.cpp
src/CppUTestExt/MockExpectedCall.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
29
cpp
cpputest
IEEE754ExceptionsPlugin.cpp
src/CppUTestExt/IEEE754ExceptionsPlugin.cpp
/* * Copyright (c) 2015, Michael Feathers, James Grenning, Bas Vodde * and Arnd R. Strube. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain th...
30
cpp
cpputest
MockSupport.cpp
src/CppUTestExt/MockSupport.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
31
cpp
cpputest
MemoryReportFormatter.cpp
src/CppUTestExt/MemoryReportFormatter.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
32
cpp
cpputest
MockFailure.cpp
src/CppUTestExt/MockFailure.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
33
cpp
cpputest
MockSupport_c.cpp
src/CppUTestExt/MockSupport_c.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
34
cpp
cpputest
OrderedTest.cpp
src/CppUTestExt/OrderedTest.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
35
cpp
cpputest
UtestPlatform.cpp
src/Platforms/Borland/UtestPlatform.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
36
cpp
cpputest
UtestPlatform.cpp
src/Platforms/GccNoStdC/UtestPlatform.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
37
cpp
cpputest
UtestPlatform.cpp
src/Platforms/VisualCpp/UtestPlatform.cpp
#include <stdlib.h> #include "CppUTest/TestHarness.h" #undef malloc #undef free #undef calloc #undef realloc #undef strdup #undef strndup #include <stdio.h> #include <stdarg.h> #include <setjmp.h> #include <string.h> #include <math.h> #include <float.h> #include <time.h> #include "CppUTest/PlatformSpecificFunctions.h"...
38
cpp
cpputest
UtestPlatform.cpp
src/Platforms/C2000/UtestPlatform.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
39
cpp
cpputest
UtestPlatform.cpp
src/Platforms/Gcc/UtestPlatform.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
40
cpp
cpputest
UtestPlatform.cpp
src/Platforms/Keil/UtestPlatform.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
41
cpp
cpputest
UtestPlatform.cpp
src/Platforms/Dos/UtestPlatform.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
42
cpp
cpputest
UtestPlatform.cpp
src/Platforms/armcc/UtestPlatform.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
43
cpp
cpputest
UtestPlatform.cpp
src/Platforms/Iar/UtestPlatform.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
44
cpp
cpputest
SymbianMemoryLeakWarning.cpp
src/Platforms/Symbian/SymbianMemoryLeakWarning.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning, Bas Vodde and Timo Puronen * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the a...
45
cpp
cpputest
UtestPlatform.cpp
src/Platforms/Symbian/UtestPlatform.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning, Bas Vodde and Timo Puronen * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the a...
46
cpp
cpputest
AllTestsForTarget.cpp
platforms/CCStudio/tests/CppUTest/AllTestsForTarget.cpp
/* * Copyright (c) 2013, Michael Feathers, James Grenning, Bas Vodde * and Arnd Strube * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the...
47
cpp
cpputest
AllTestsForTarget.cpp
platforms/CCStudio/tests/CppUTestExt/AllTestsForTarget.cpp
/* * Copyright (c) 2013, Michael Feathers, James Grenning, Bas Vodde * and Arnd Strube * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain th...
48
cpp
cpputest
CircularBuffer.cpp
examples/ApplicationLib/CircularBuffer.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
49
cpp
cpputest
Printer.cpp
examples/ApplicationLib/Printer.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
50
cpp
cpputest
hello.h
examples/ApplicationLib/hello.h
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
51
cpp
cpputest
EventDispatcher.cpp
examples/ApplicationLib/EventDispatcher.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
52
cpp
cpputest
ExamplesNewOverrides.h
examples/ApplicationLib/ExamplesNewOverrides.h
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
53
cpp
cpputest
EventDispatcher.h
examples/ApplicationLib/EventDispatcher.h
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
54
cpp
cpputest
CircularBuffer.h
examples/ApplicationLib/CircularBuffer.h
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
55
cpp
cpputest
Printer.h
examples/ApplicationLib/Printer.h
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
56
cpp
cpputest
AllTests.cpp
examples/AllTests/AllTests.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
57
cpp
cpputest
AllTests.h
examples/AllTests/AllTests.h
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
58
cpp
cpputest
EventDispatcherTest.cpp
examples/AllTests/EventDispatcherTest.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
59
cpp
cpputest
CircularBufferTest.cpp
examples/AllTests/CircularBufferTest.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
60
cpp
cpputest
HelloTest.cpp
examples/AllTests/HelloTest.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
61
cpp
cpputest
MockDocumentationTest.cpp
examples/AllTests/MockDocumentationTest.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
62
cpp
cpputest
FEDemoTest.cpp
examples/AllTests/FEDemoTest.cpp
/* * Copyright (c) 2016, Michael Feathers, James Grenning, Bas Vodde * and Arnd Strube. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the a...
63
cpp
cpputest
MockPrinter.h
examples/AllTests/MockPrinter.h
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
64
cpp
cpputest
PrinterTest.cpp
examples/AllTests/PrinterTest.cpp
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
65
cpp
cpputest
ClassNameCPolymorphic.h
scripts/CppUnitTemplates/ClassNameCPolymorphic.h
#ifndef D_ClassName_H #define D_ClassName_H /////////////////////////////////////////////////////////////////////////////// // // ClassName is responsible for ... // /////////////////////////////////////////////////////////////////////////////// typedef struct _ClassName ClassnamePiml; ClassName* ClassName_Create...
66
cpp
cpputest
ClassNameCMultipleInstance.h
scripts/CppUnitTemplates/ClassNameCMultipleInstance.h
#ifndef D_ClassName_H #define D_ClassName_H /////////////////////////////////////////////////////////////////////////////// // // ClassName is responsible for ... // /////////////////////////////////////////////////////////////////////////////// typedef struct _ClassName Classname; ClassName* ClassName_Create(void)...
67
cpp
cpputest
ClassNameCTest.cpp
scripts/CppUnitTemplates/ClassNameCTest.cpp
#include "CppUTest/TestHarness.h" extern "C" { #include "ClassName.h" } TEST_GROUP(ClassName) { void setup() { ClassName_Create(); } void teardown() { ClassName_Destroy(); } }; TEST(ClassName, Create) { FAIL("Start here"); }
68
cpp
cpputest
ClassNameTest.cpp
scripts/CppUnitTemplates/ClassNameTest.cpp
#include <cppunit/config/SourcePrefix.h> #include <cppunit/extensions/HelperMacros.h> #include "ClassName.h" class ClassNameTest: public CPPUNIT_NS::TestFixture { CPPUNIT_TEST_SUITE(ClassNameTest); CPPUNIT_TEST(testCreate); CPPUNIT_TEST_SUITE_END(); ClassName* aClassName; public: void setUp() { ...
69
cpp
cpputest
MockClassName.h
scripts/CppUnitTemplates/MockClassName.h
#ifndef D_MockClassName_H #define D_MockClassName_H /////////////////////////////////////////////////////////////////////////////// // // MockClassName.h // // MockClassName is responsible for providing a test stub for ClassName // /////////////////////////////////////////////////////////////////////////////// #incl...
70
cpp
cpputest
InterfaceCTest.cpp
scripts/CppUnitTemplates/InterfaceCTest.cpp
#include "CppUTest/TestHarness.h" extern "C" { #include "FakeClassName.h" } TEST_GROUP(FakeClassName) { void setup() { ClassName_Create(); } void teardown() { ClassName_Destroy(); } }; TEST(FakeClassName, Create) { FAIL("Start here"); }
71
cpp
cpputest
InterfaceTest.cpp
scripts/CppUnitTemplates/InterfaceTest.cpp
#include <cppunit/config/SourcePrefix.h> #include <cppunit/extensions/HelperMacros.h> #include "ClassName.h" #include "MockClassName.h" class MockClassNameTest: public CPPUNIT_NS::TestFixture { CPPUNIT_TEST_SUITE(MockClassNameTest); CPPUNIT_TEST(testCreate); CPPUNIT_TEST_SUITE_END(); ClassName* aClass...
72
cpp
cpputest
ClassNameC.h
scripts/CppUnitTemplates/ClassNameC.h
#ifndef D_ClassName_H #define D_ClassName_H /////////////////////////////////////////////////////////////////////////////// // // ClassName is responsible for ... // /////////////////////////////////////////////////////////////////////////////// void ClassName_Create(void); void ClassName_Destroy(void); #endif // D...
73
cpp
cpputest
MockClassNameC.h
scripts/CppUnitTemplates/MockClassNameC.h
#ifndef D_FakeClassName_H #define D_FakeClassName_H /////////////////////////////////////////////////////////////////////////////// // // FakeClassName.h // // FakeClassName is responsible for providing a test stub for ClassName // /////////////////////////////////////////////////////////////////////////////// #incl...
74
cpp
cpputest
ClassName.h
scripts/CppUnitTemplates/ClassName.h
#ifndef D_ClassName_H #define D_ClassName_H /////////////////////////////////////////////////////////////////////////////// // // ClassName is responsible for ... // /////////////////////////////////////////////////////////////////////////////// class ClassName { public: explicit ClassName(); virtual ~Cl...
75
cpp
cpputest
ClassName.cpp
scripts/CppUnitTemplates/ClassName.cpp
#include "ClassName.h" ClassName::ClassName() { } ClassName::~ClassName() { }
76
cpp
cpputest
ClassNameCMultipleInstanceTest.cpp
scripts/CppUnitTemplates/ClassNameCMultipleInstanceTest.cpp
#include "CppUTest/TestHarness.h" static int fakeRan = 0; extern "C" { #include "ClassName.h" void virtualFunction_renameThis_fake(ClassName*) { fakeRan = 1; } } TEST_GROUP(ClassName) { ClassName* aClassName; void setup() { aClassName = ClassName_Create(); fakeRan = 0; ...
77
cpp
cpputest
ProjectBuildTime.cpp
scripts/CppUnitTemplates/ProjectTemplate/src/util/ProjectBuildTime.cpp
#include "ProjectBuildTime.h" ProjectBuildTime::ProjectBuildTime() : dateTime(__DATE__ " " __TIME__) { } ProjectBuildTime::~ProjectBuildTime() { } const char* ProjectBuildTime::GetDateTime() { return dateTime; }
78
cpp
cpputest
AllTests.cpp
scripts/CppUnitTemplates/ProjectTemplate/tests/AllTests.cpp
#include "CppUTest/CommandLineTestRunner.h" int main(int ac, char** av) { return CommandLineTestRunner::RunAllTests(ac, av); }
79
cpp
cpputest
ProjectBuildTimeTest.cpp
scripts/CppUnitTemplates/ProjectTemplate/tests/util/ProjectBuildTimeTest.cpp
#include "CppUTest/TestHarness.h" #include "ProjectBuildTime.h" TEST_GROUP(ProjectBuildTime) { ProjectBuildTime* projectBuildTime; void setup() { projectBuildTime = new ProjectBuildTime(); } void teardown() { delete projectBuildTime; } }; TEST(ProjectBuildTime, Create) { CHECK(0 != projectBui...
80
cpp
cpputest
ProjectBuildTime.h
scripts/CppUnitTemplates/ProjectTemplate/include/util/ProjectBuildTime.h
#ifndef D_ProjectBuildTime_H #define D_ProjectBuildTime_H /////////////////////////////////////////////////////////////////////////////// // // ProjectBuildTime is responsible for recording and reporting when // this project library was built // ///////////////////////////////////////////////////////////////////////...
81
cpp
cpputest
ClassNameCTest.cpp
scripts/UnityTemplates/ClassNameCTest.cpp
extern "C" { #include "ClassName.h" } //CppUTest includes should be after your and system includes #include "CppUTest/TestHarness.h" TEST_GROUP(ClassName) { void setup() { ClassName_Create(); } void teardown() { ClassName_Destroy(); } }; TEST(ClassName, Create) { FAIL("Start h...
82
cpp
cpputest
InterfaceCTest.cpp
scripts/UnityTemplates/InterfaceCTest.cpp
extern "C" { #include "FakeClassName.h" } //CppUTest includes should be after your and system includes #include "CppUTest/TestHarness.h" TEST_GROUP(ClassName) { void setup() { ClassName_Create(); } void teardown() { ClassName_Destroy(); } }; TEST(ClassName, Create) { FAIL("Sta...
83
cpp
cpputest
ClassNameCIoDriverTest.cpp
scripts/UnityTemplates/ClassNameCIoDriverTest.cpp
extern "C" { #include "ClassName.h" #include "MockIO.h" } //CppUTest includes should be after your and system includes #include "CppUTest/TestHarness.h" TEST_GROUP(ClassName) { void setup() { Reset_Mock_IO(); ClassName_Create(); } void teardown() { ClassName_Destroy(); ...
84
cpp
cpputest
FunctionNameCTest.cpp
scripts/UnityTemplates/FunctionNameCTest.cpp
extern "C" { #include "ClassName.h" } //CppUTest includes should be after your and system includes #include "CppUTest/TestHarness.h" TEST_GROUP(ClassName) { void setup() { } void teardown() { } }; TEST(ClassName, Create) { FAIL("Start here"); }
85
cpp
cpputest
ClassNameCMultipleInstanceTest.cpp
scripts/UnityTemplates/ClassNameCMultipleInstanceTest.cpp
extern "C" { #include "ClassName.h" } //CppUTest includes should be after your and system includes #include "CppUTest/TestHarness.h" TEST_GROUP(ClassName) { ClassName aClassName; void setup() { aClassName = ClassName_Create(); } void teardown() { ClassName_Destroy(aClassName); ...
86
cpp
cpputest
ClassNameCPolymorphic.h
scripts/templates/ClassNameCPolymorphic.h
#ifndef D_ClassName_H #define D_ClassName_H /********************************************************** * * ClassName is responsible for ... * **********************************************************/ typedef struct ClassName ClassNamePiml; ClassName* ClassName_Create(void); void ClassName_Destroy(ClassName*);...
87
cpp
cpputest
ClassNameCMultipleInstance.h
scripts/templates/ClassNameCMultipleInstance.h
#ifndef D_ClassName_H #define D_ClassName_H /********************************************************************** * * ClassName is responsible for ... * **********************************************************************/ typedef struct ClassNameStruct * ClassName; ClassName ClassName_Create(void); void Cla...
88
cpp
cpputest
ClassNameCTest.cpp
scripts/templates/ClassNameCTest.cpp
extern "C" { #include "ClassName.h" } #include "CppUTest/TestHarness.h" TEST_GROUP(ClassName) { void setup() { ClassName_Create(); } void teardown() { ClassName_Destroy(); } }; TEST(ClassName, Create) { FAIL("Start here"); }
89
cpp
cpputest
ClassNameTest.cpp
scripts/templates/ClassNameTest.cpp
#include "ClassName.h" //CppUTest includes should be after your and system includes #include "CppUTest/TestHarness.h" TEST_GROUP(ClassName) { ClassName* aClassName; void setup() { aClassName = new ClassName(); } void teardown() { delete aClassName; } }; TEST(ClassName, Create) { FAIL("Start ...
90
cpp
cpputest
MockClassName.h
scripts/templates/MockClassName.h
#ifndef D_MockClassName_H #define D_MockClassName_H /////////////////////////////////////////////////////////////////////////////// // // MockClassName.h // // MockClassName is responsible for providing a test stub for ClassName // /////////////////////////////////////////////////////////////////////////////// #incl...
91
cpp
cpputest
InterfaceCTest.cpp
scripts/templates/InterfaceCTest.cpp
extern "C" { #include "FakeClassName.h" } //CppUTest includes should be after your and system includes #include "CppUTest/TestHarness.h" TEST_GROUP(ClassName) { void setup() { ClassName_Create(); } void teardown() { ClassName_Destroy(); } }; TEST(ClassName, Create) { FAIL("Sta...
92
cpp
cpputest
InterfaceTest.cpp
scripts/templates/InterfaceTest.cpp
#include "ClassName.h" #include "MockClassName.h" #include "CppUTest/TestHarness.h" TEST_GROUP(ClassName) { ClassName* aClassName; MockClassName* mockClassName; void setup() { mockClassName = new MockClassName(); aClassName = mockClassName; } void teardown() { delete aClassName; } }; TES...
93
cpp
cpputest
ClassNameC.h
scripts/templates/ClassNameC.h
#ifndef D_ClassName_H #define D_ClassName_H /********************************************************** * * ClassName is responsible for ... * **********************************************************/ void ClassName_Create(void); void ClassName_Destroy(void); #endif /* D_FakeClassName_H */
94
cpp
cpputest
ClassNameCIoDriverTest.cpp
scripts/templates/ClassNameCIoDriverTest.cpp
extern "C" { #include "ClassName.h" #include "MockIO.h" } #include "CppUTest/TestHarness.h" TEST_GROUP(ClassName) { void setup() { Reset_Mock_IO(); ClassName_Create(); } void teardown() { ClassName_Destroy(); Assert_No_Unused_Expectations(); } }; TEST(ClassNam...
95
cpp
cpputest
FunctionNameC.h
scripts/templates/FunctionNameC.h
#ifndef D_ClassName_H #define D_ClassName_H /********************************************************** * * ClassName is responsible for ... * **********************************************************/ void ClassName(); #endif /* D_FakeClassName_H */
96
cpp
cpputest
MockClassNameC.h
scripts/templates/MockClassNameC.h
#ifndef D_FakeClassName_H #define D_FakeClassName_H /********************************************************** * * FakeClassName is responsible for providing a * test stub for ClassName * **********************************************************/ #include "ClassName.h" #endif /* D_FakeClassName_H */
97
cpp
cpputest
ClassName.h
scripts/templates/ClassName.h
#ifndef D_ClassName_H #define D_ClassName_H /////////////////////////////////////////////////////////////////////////////// // // ClassName is responsible for ... // /////////////////////////////////////////////////////////////////////////////// class ClassName { public: explicit ClassName(); virtual ~Cl...
98
cpp
cpputest
ClassName.cpp
scripts/templates/ClassName.cpp
#include "ClassName.h" ClassName::ClassName() { } ClassName::~ClassName() { }
99
cpp
cpputest
FunctionNameCTest.cpp
scripts/templates/FunctionNameCTest.cpp
extern "C" { #include "ClassName.h" } #include "CppUTest/TestHarness.h" TEST_GROUP(ClassName) { void setup() { } void teardown() { } }; TEST(ClassName, Create) { FAIL("Start here"); }
100
cpp
cpputest
ClassNameCMultipleInstanceTest.cpp
scripts/templates/ClassNameCMultipleInstanceTest.cpp
extern "C" { #include "ClassName.h" } #include "CppUTest/TestHarness.h" TEST_GROUP(ClassName) { ClassName aClassName; void setup() { aClassName = ClassName_Create(); } void teardown() { ClassName_Destroy(aClassName); } }; TEST(ClassName, Create) { FAIL("Start here");...