Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
3525e398
"vscode:/vscode.git/clone" did not exist on "ca87cc72e222a2b2ffcfac686801946451e09ef1"
Commit
3525e398
authored
Jul 19, 2019
by
Chris Baish
Browse files
Moved explanation to single line as well
parent
af11cda5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
googletest/docs/primer.md
googletest/docs/primer.md
+6
-12
No files found.
googletest/docs/primer.md
View file @
3525e398
...
@@ -213,18 +213,12 @@ as `ASSERT_EQ(expected, actual)`, so lots of existing code uses this order. Now
...
@@ -213,18 +213,12 @@ 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
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.
two
`string`
objects, use
`EXPECT_EQ`
,
`EXPECT_NE`
, and etc instead.
| Fatal assertion | Nonfatal assertion | Verifies |
| Fatal assertion | Nonfatal assertion | Verifies |
| -------------------------- | ------------------------------ | ---------------------- |
| -------------------------- | ------------------------------ | -------------------------------------------------------- |
|
`ASSERT_STREQ(str1,str2);`
|
`EXPECT_STREQ(str1,str2);`
| the two C strings have |
|
`ASSERT_STREQ(str1,str2);`
|
`EXPECT_STREQ(str1,str2);`
| the two C strings have the same content |
| | | the same content |
|
`ASSERT_STRNE(str1,str2);`
|
`EXPECT_STRNE(str1,str2);`
| the two C strings have different contents |
|
`ASSERT_STRNE(str1,str2);`
|
`EXPECT_STRNE(str1,str2);`
| the two C strings have |
|
`ASSERT_STRCASEEQ(str1,str2);`
|
`EXPECT_STRCASEEQ(str1,str2);`
| the two C strings have the same content, ignoring case |
| | | different contents |
|
`ASSERT_STRCASENE(str1,str2);`
|
`EXPECT_STRCASENE(str1,str2);`
| the two C strings have different contents, ignoring case |
|
`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 |
Note that "CASE" in an assertion name means that case is ignored. A
`NULL`
Note that "CASE" in an assertion name means that case is ignored. A
`NULL`
pointer and an empty string are considered
*different*
.
pointer and an empty string are considered
*different*
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment