Skip to content

Commit

Permalink
Merge pull request #2341 from ChrisBaish:master
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 261344735
  • Loading branch information
gennadiycivil committed Aug 2, 2019
2 parents cc34e8f + 3525e39 commit 6c7a8be
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions googletest/docs/primer.md
Expand Up @@ -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*.
Expand Down

0 comments on commit 6c7a8be

Please sign in to comment.