Skip to content

Commit 3d3eb01

Browse files
committed
Added some instructions for visual studio and a link to my starter kit for vs.
1 parent 965b4db commit 3d3eb01

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

index.markdown

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ CppUTest's core design principles are:
1717

1818
There are several ways to setup CppUTest. One is to install via package management and the other is from source. The big difference is that from source you can use `MakefileWorker.mk`. MakefileWorker is not supported pre-packaged. MakefileWorker does not require you to know a lot about `make` and makefiles to get started.
1919

20-
An easy way to get your first test case running is to use James Grenning's [cpputest-starter-project](https://github.com/jwgrenning/cpputest-starter-project). James is the author of [Test-Driven Development for Embedded C](https://wingman-sw.com/tddec). You'll find instructions, your first test case, and some other example code. James' training resources use MakefileWorker, so you need to install from source.
20+
An easy way to get your first test case running is to use James Grenning's [cpputest-starter-project for gcc](https://github.com/jwgrenning/cpputest-starter-project) or [cpputest-starter-project for Visual Studio](https://github.com/jwgrenning/cpputest-starter-project-vs). James is the author of [Test-Driven Development for Embedded C](https://wingman-sw.com/tddec). You'll find instructions, your first test case, and some other example code. James' training resources use MakefileWorker, so you need to install from source.
2121

2222
Adding tests to untested C and C++ can be a big challenge. You might find [Get your Legacy C into a Test Harness](https://wingman-sw.com/articles/tdd-legacy-c) a useful recipe and resource. The page includes links to numerous articles of real legacy C challenges.
2323

@@ -91,7 +91,22 @@ $ make tdd
9191
$ export CPPUTEST_HOME=$(pwd).
9292
{% endhighlight %}
9393

94-
You will want to add `export CPPUTEST_HOME=<path>` somewhere like `.bashrc` or in your build script as a relative path.
94+
You will want to add `export CPPUTEST_HOME=<path>` somewhere like `.bashrc` or in your build script as a relative path.
95+
96+
### Using CppUTest with `MakefileWorker.mk` and Visual Studio
97+
98+
You can build CppUTest using cmake or in the Visual Studio IDE.
99+
100+
*from Visual Studio IDE*
101+
102+
Depending on your VS version double click either
103+
104+
* `CppUTest_VS201x.sln` - for VS 2010 and later
105+
* `CppUTest.sln` - for pre VS 2010
106+
107+
Say yes to suggested conversions. Select the menu item corresponding to run without debugging. CppUTest should build (probably with warnings). When the build completes the test runner runs. You should see over 1000 tests passing and no test failures. The build also produced a static library (cpputest/lib) holding CppUTest you can link your tests to.
108+
109+
To use CppUTest, define an environment variable `CPPUTEST_HOME` that points to the home directory of CppUTest. You will find a working example and some more help in [cpputest-starter-project for Visual Studio](https://github.com/jwgrenning/cpputest-starter-project-vs).
95110

96111
## How to create a coverage report
97112

0 commit comments

Comments
 (0)