diff options
author | Gennadiy Civil <misterg@google.com> | 2019-08-02 17:27:06 (GMT) |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2019-08-02 17:27:07 (GMT) |
commit | 6c7a8bec8d4493124f593640079d35ee0172d683 (patch) | |
tree | ee46386a2de1f3e538aef46d1d8456486901d5a0 /googletest/docs/primer.md | |
parent | cc34e8fa7ccae09ab12a54abed0eb6d912a12bb5 (diff) | |
parent | 3525e3984282c827c7207245b1d4a47f4eaf3c91 (diff) | |
download | googletest-6c7a8bec8d4493124f593640079d35ee0172d683.zip googletest-6c7a8bec8d4493124f593640079d35ee0172d683.tar.gz googletest-6c7a8bec8d4493124f593640079d35ee0172d683.tar.bz2 |
Merge pull request #2341 from ChrisBaish:master
PiperOrigin-RevId: 261344735
Diffstat (limited to 'googletest/docs/primer.md')
-rw-r--r-- | googletest/docs/primer.md | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/googletest/docs/primer.md b/googletest/docs/primer.md index cbb48ec..30d86a5 100644 --- a/googletest/docs/primer.md +++ b/googletest/docs/primer.md @@ -221,18 +221,16 @@ as `ASSERT_EQ(expected, actual)`, so lots of existing code uses this order. Now The assertions in this group compare two **C strings**. If you want to compare two `string` objects, use `EXPECT_EQ`, `EXPECT_NE`, and etc instead. -| Fatal assertion | Nonfatal assertion | Verifies | -| ----------------------- | ----------------------- | ---------------------- | -| `ASSERT_STREQ(str1, | `EXPECT_STREQ(str1, | the two C strings have | -: str2);` : str2);` : the same content : -| `ASSERT_STRNE(str1, | `EXPECT_STRNE(str1, | the two C strings have | -: str2);` : str2);` : different contents : -| `ASSERT_STRCASEEQ(str1, | `EXPECT_STRCASEEQ(str1, | the two C strings have | -: str2);` : str2);` : the same content, : -: : : ignoring case : -| `ASSERT_STRCASENE(str1, | `EXPECT_STRCASENE(str1, | the two C strings have | -: str2);` : str2);` : different contents, : -: : : ignoring case : +<!-- mdformat off(github rendering does not support multiline tables) --> + +| Fatal assertion | Nonfatal assertion | Verifies | +| -------------------------- | ------------------------------ | -------------------------------------------------------- | +| `ASSERT_STREQ(str1,str2);` | `EXPECT_STREQ(str1,str2);` | the two C strings have the same content | +| `ASSERT_STRNE(str1,str2);` | `EXPECT_STRNE(str1,str2);` | the two C strings have different contents | +| `ASSERT_STRCASEEQ(str1,str2);` | `EXPECT_STRCASEEQ(str1,str2);` | the two C strings have the same content, ignoring case | +| `ASSERT_STRCASENE(str1,str2);` | `EXPECT_STRCASENE(str1,str2);` | the two C strings have different contents, ignoring case | + +<!-- mdformat on--> Note that "CASE" in an assertion name means that case is ignored. A `NULL` pointer and an empty string are considered *different*. |