From adb490773e8d5f8a84e863f4bd6d96a707750093 Mon Sep 17 00:00:00 2001 From: Chris Baish <43465319+ChrisBaish@users.noreply.github.com> Date: Thu, 18 Jul 2019 10:12:27 +0100 Subject: [PATCH 1/3] Update primer.md Correct formatting in table --- googletest/docs/primer.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/googletest/docs/primer.md b/googletest/docs/primer.md index ba17ce85..8f5c6e2d 100644 --- a/googletest/docs/primer.md +++ b/googletest/docs/primer.md @@ -215,16 +215,16 @@ 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 : +| `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 | Note that "CASE" in an assertion name means that case is ignored. A `NULL` pointer and an empty string are considered *different*. From af11cda5656cdaebbd077810a8b469985499ba57 Mon Sep 17 00:00:00 2001 From: Chris Baish Date: Fri, 19 Jul 2019 07:31:15 +0100 Subject: [PATCH 2/3] Moved table to single lines --- googletest/docs/primer.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/googletest/docs/primer.md b/googletest/docs/primer.md index b8d48bac..b0646c57 100644 --- a/googletest/docs/primer.md +++ b/googletest/docs/primer.md @@ -213,18 +213,18 @@ 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 | +| 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 | Note that "CASE" in an assertion name means that case is ignored. A `NULL` pointer and an empty string are considered *different*. From 3525e3984282c827c7207245b1d4a47f4eaf3c91 Mon Sep 17 00:00:00 2001 From: Chris Baish Date: Fri, 19 Jul 2019 07:33:26 +0100 Subject: [PATCH 3/3] Moved explanation to single line as well --- googletest/docs/primer.md | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/googletest/docs/primer.md b/googletest/docs/primer.md index b0646c57..43f1872d 100644 --- a/googletest/docs/primer.md +++ b/googletest/docs/primer.md @@ -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 two `string` objects, use `EXPECT_EQ`, `EXPECT_NE`, and etc instead. -| 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 | +| 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 | Note that "CASE" in an assertion name means that case is ignored. A `NULL` pointer and an empty string are considered *different*.