Skip to content

Commit b0d009d

Browse files
committed
Fixed highlighting
1 parent c5c63a3 commit b0d009d

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

index.markdown

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ CppUTest's core design principles are:
2121

2222
There is an Debian and Ubuntu package available for CppUTest. This is by far the easiest way to install it, via:
2323

24-
```bash
24+
{% highlight bash %}
2525
$ apt-get install cpputest
26-
```
26+
{% endhighlight %}
2727

2828
*MacOSX*
2929

3030
For Mac, a Homebrew package is available too. You can install via:
3131

32-
```bash
32+
{% highlight bash %}
3333
$ brew install cpputest
34-
```
34+
{% endhighlight %}
3535

3636
### From source
3737

@@ -42,34 +42,34 @@ This version is automatically packages after a build has passed.
4242

4343
Alternatively, you can clone the github repository, read-only:
4444

45-
```bash
45+
{% highlight bash %}
4646
$ git clone git://github.com/cpputest/cpputest.git
47-
```
47+
{% endhighlight %}
4848

4949
Or clone it via ssh (which requires a github account)
5050

51-
```bash
51+
{% highlight bash %}
5252
$ git clone git@github.com:cpputest/cpputest.git
53-
```
53+
{% endhighlight %}
5454

5555
After you cloned CppUTest, you can build it with your favorite build tool (CMake or autoconf).
5656

5757
Building with autoconf requires you to (this requires you to have installed GNU autotools, apt-get/brew install automake autoconf libtool):
5858

59-
```bash
59+
{% highlight bash %}
6060
$ cd cpputest_build
6161
$ autoreconf .. -i
6262
$ ../configure
6363
$ make
64-
```
64+
{% endhighlight %}
6565

6666
Or you can use CMake if that is the build tool you fancy (this requires you have install CMake, apt-get install cmake):
6767

68-
```bash
68+
{% highlight bash %}
6969
$ cd cpputest_build
7070
$ cmake ..
7171
$ make
72-
```
72+
{% endhighlight %}
7373

7474
For Windows users, the above work with cygwin. There are also several MS VC++ projects available.
7575

@@ -84,7 +84,7 @@ For Windows users, the above work with cygwin. There are also several MS VC++ pr
8484

8585
To write your first test, all you need is a new cpp file with a TEST_GROUP and a TEST, like:
8686

87-
```c++
87+
{% highlight c++ %}
8888
TEST_GROUP(FirstTestGroup)
8989
{
9090
};
@@ -93,37 +93,37 @@ TEST(FirstTestGroup, FirstTest)
9393
{
9494
FAIL("Fail me!");
9595
}
96-
```
96+
{% endhighlight %}
9797

9898
This test will fail.
9999

100100
You can add new tests to the test group by just writing more tests in the file, like this:
101101

102-
```c++
102+
{% highlight c++ %}
103103
TEST(FirstTestGroup, SecondTest)
104104
{
105105
STRCMP_EQUAL("hello", "world");
106106
LONGS_EQUAL(1, 2);
107107
CHECK(false);
108108
}
109-
```
109+
{% endhighlight %}
110110

111111
You do need to create a main where you run all the unit tests. Such a main will look like this:
112112

113-
```c++
113+
{% highlight c++ %}
114114
int main(int ac, char** av)
115115
{
116116
return CommandLineTestRunner::RunAllTests(ac, av);
117117
}
118-
```
118+
{% endhighlight %}
119119

120120
For more information, We'd recommend to [read the manual](http://www.cpputest.org) or, even better, check some [existing tests](https://github.com/cpputest/cpputest/tree/master/tests) such as [SimpleStringTest](https://github.com/cpputest/cpputest/blob/master/tests/SimpleStringTest.cpp) or (a bit more complicated) [MemoryLeakDetectorTest](https://github.com/cpputest/cpputest/blob/master/tests/MemoryLeakDetectorTest.cpp) or the [mocking tests](https://github.com/cpputest/cpputest/blob/master/tests/CppUTestExt/TestMockSupport.cpp) or just check out the [Cheat Sheet](https://github.com/cpputest/cpputest/blob/master/tests/CheatSheetTest.cpp)
121121

122122
## Related projects
123123

124124
For Eclipse users, also check:
125-
* [CppUTest Eclipse Test Runner](https://github.com/tcmak/CppUTestEclipseJunoTestRunner) This will allow you to run your tests JUnit style with red and green bars, and rerun arbitrary selections of tests.
126-
Prerequisites:
125+
* [CppUTest Eclipse Test Runner](https://github.com/tcmak/CppUTestEclipseJunoTestRunner) This will allow you to run your tests JUnit style with red and green bars, and rerun arbitrary selections of tests.
126+
Prerequisites:
127127
- CppUTest off master
128128
- Eclipse Juno, Kepler, or later
129129
- Eclipse C/C++ Unit Plugin (if not already present in your version of Eclipse; install directly from Eclipse Help -> Install New Software...).

0 commit comments

Comments
 (0)