Port of schuchert.wikispaces.com


tdd.cpp.NotesOnCppUTest

tdd.cpp.NotesOnCppUTest

Using CppUTest in VisualStudio 2008

These do not include working in the express version. See the old section below for some additional details to get this working.

First Time Only

Each Time You Want a New Solution

#include <CppUTest/CommandLineTestRunner.h>

int main(int argc, char** argv) {
    return CommandLineTestRunner::RunAllTests(argc, argv);
}
// the below include should be the last include if you are using <vector>, <string>, etc.
#include <CppUTest/TestHarness.h>

TEST_GROUP(FooTest) {
};

TEST(FooTest, TestName) {
  LONGS_EQUAL(1, 1);
}
.
OK (1 tests, 1 ran, 1 checks, 0 ignored, 0 filtered out, 0 ms)

Press any key to continue . . .

Working With Boost



old —- —-

First Time Only

Install CppUTest
Install DevExpress Refactor!

Each Time You Want a New Solution

#include <CppUTest/CommandLineTestRunner.h>

int main(int ac, char** av)
{
    return CommandLineTestRunner::RunAllTests(ac, av);
}
<path of CppUTest project>\include
winmm.lib
#include <CppUTest/TestHarness.h>

TEST_GROUP(FooTest)
{
};

TEST(FooTest, TestName) {
  LONGS_EQUAL(1, 1);
}

Working With Boost


Comments

" Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.