Skip to content

Formatting and error on VS title. #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions index.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ CppUTest's core design principles are:

## Setting up CppUTest

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.
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.

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.

Expand Down Expand Up @@ -75,13 +75,13 @@ $ ../configure
$ make
{% endhighlight %}

**NOTE**: Building from `cpputest_build` means you will not be able to use `MakefileWorker.mk`. To use MakefileWorker you need to build from the cpputest home directory.
**NOTE**: Building from **cpputest_build** means you will not be able to use **MakefileWorker.mk**. To use MakefileWorker you need to build from the cpputest home directory.

### Using CppUTest with `MakefileWorker.mk` and gcc
### Using CppUTest with MakefileWorker.mk and gcc

If you want to use CppUTest's `MakefileWorker.mk`, you cannot currently get CppUTest using the "Pre-packaged" options described above. Instead you can get CppUTest from source using the options already described.
If you want to use CppUTest's MakefileWorker, you cannot currently get CppUTest using the "Pre-packaged" options described above. Instead you can get CppUTest from source using the options already described.

Change to the top level directory of CppUTest (the directory containing `include/` and `src/` among other files)
Change to the top level directory of CppUTest (the directory containing **include/** and **src/** among other files)

{% highlight bash %}
$ cd cpputest \
Expand All @@ -91,22 +91,22 @@ $ make tdd
$ export CPPUTEST_HOME=$(pwd).
{% endhighlight %}

You will want to add `export CPPUTEST_HOME=<path>` somewhere like `.bashrc` or in your build script as a relative path.
You will want to add **export CPPUTEST_HOME=<path>** somewhere like **.bashrc** or in your build script as a relative path.

### Using CppUTest with `MakefileWorker.mk` and Visual Studio
### Using CppUTest with Visual Studio

You can build CppUTest using cmake or in the Visual Studio IDE.

*from Visual Studio IDE*

Depending on your VS version double click either

* `CppUTest_VS201x.sln` - for VS 2010 and later
* `CppUTest.sln` - for pre VS 2010
* **CppUTest_VS201x.sln** - for VS 2010 and later
* **CppUTest.sln** - for pre VS 2010

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.

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).
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).

## How to create a coverage report

Expand Down