Skip to content

Commit 4736506

Browse files
author
Arnd R. Strube
committed
Add pure C macros
1 parent 9149b9d commit 4736506

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

manual.markdown

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,22 @@ int main(int ac, char** av)
553553

554554
You can leave out TEST_GROUP_C_SETUP() / TEST_GROUP_C_TEARDOWN() and TEST_GROUP_C_SETUP_WRAPPER() / TEST_GROUP_C_TEARDOWN_WRAPPER(), if you don't need them.
555555

556+
The following assertion macros are supported in the pure C interface:
557+
558+
{% highlight c++ %}
559+
CHECK_EQUAL_C_INT(expected,actual);
560+
CHECK_EQUAL_C_REAL(expected,actual,threshold);
561+
CHECK_EQUAL_C_CHAR(expected,actual);
562+
CHECK_EQUAL_C_STRING(expected,actual);
563+
CHECK_EQUAL_C_POINTER(expected,actual); /* v3.8 */
564+
CHECK_EQUAL_C_BITS(expected, actual, mask); /* v3.8, pending */
565+
FAIL_TEXT_C(text);
566+
FAIL_C();
567+
CHECK_C(condition);
568+
{% endhighlight %}
569+
570+
These macros ensure tests get terminated in a way appropriate for pure C code.
571+
556572
<a id="gmock"> </a>
557573

558574
## Using Google Mock

0 commit comments

Comments
 (0)