From 91b6fd5123d1767c0f53727b1180b7209cdf6b51 Mon Sep 17 00:00:00 2001 From: GAMA Date: Mon, 25 Jan 2021 12:01:47 +0300 Subject: [PATCH 1/2] Tests for PIString 31-40 --- tests/core/pistringTest.cpp | 60 +++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/tests/core/pistringTest.cpp b/tests/core/pistringTest.cpp index 39652773..f2f78486 100644 --- a/tests/core/pistringTest.cpp +++ b/tests/core/pistringTest.cpp @@ -214,3 +214,63 @@ TEST(PIString_Tests, operator_compare_pistring_true){ PIString str2 = "testing"; ASSERT_TRUE(str1 == str2); } + +TEST(PIString_Tests, operator_compare_pistring_false){ + PIString str1 = "tes"; + PIString str2 = "testing"; + ASSERT_FALSE(str1 == str2); +} + +TEST(PIString_Tests, operator_compare_pichar_true){ + PIString str1 = "t"; + PIChar str2 = "t"; + ASSERT_TRUE(str1 == str2); +} + +TEST(PIString_Tests, operator_compare_pichar_false){ + PIString str1 = "t"; + PIChar str2 = "p"; + ASSERT_FALSE(str1 == str2); +} + +TEST(PIString_Tests, operator_compare_char_true){ + PIString str1 = "test"; + char str2[] = "test"; + ASSERT_TRUE(str1 == str2); +} + +TEST(PIString_Tests, operator_compare_char_false){ + PIString str1 = "t"; + char str2[] = "test"; + ASSERT_FALSE(str1 == str2); +} + +TEST(PIString_Tests, operator_enq_compare_pistring_false){ + PIString str1 = "testing"; + PIString str2 = "testing"; + ASSERT_FALSE(str1 != str2); +} + +TEST(PIString_Tests, operator_enq_compare_pistring_true){ + PIString str1 = "tes"; + PIString str2 = "testing"; + ASSERT_TRUE(str1 != str2); +} + +TEST(PIString_Tests, operator_enq_compare_pichar_false){ + PIString str1 = "t"; + PIChar str2 = "t"; + ASSERT_FALSE(str1 != str2); +} + +TEST(PIString_Tests, operator_enq_compare_pichar_true){ + PIString str1 = "t"; + PIChar str2 = "p"; + ASSERT_TRUE(str1 != str2); +} + +TEST(PIString_Tests, operator_enq_compare_char_false){ + PIString str1 = "test"; + char str2[] = "test"; + ASSERT_FALSE(str1 != str2); +} From 003ace2c66fc6f518ad51163cc7f7539b83e021c Mon Sep 17 00:00:00 2001 From: Stepan Fomenko Date: Tue, 26 Jan 2021 11:12:05 +0300 Subject: [PATCH 2/2] Rename some tests --- tests/core/pistringTest.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/core/pistringTest.cpp b/tests/core/pistringTest.cpp index f2f78486..8d4f3a98 100644 --- a/tests/core/pistringTest.cpp +++ b/tests/core/pistringTest.cpp @@ -209,67 +209,67 @@ TEST(PIString_Tests, operator_symbol){ ASSERT_EQ(symbo, str1[4]); } -TEST(PIString_Tests, operator_compare_pistring_true){ +TEST(PIString_Tests, operator_equal_pistring_true){ PIString str1 = "testing"; PIString str2 = "testing"; ASSERT_TRUE(str1 == str2); } -TEST(PIString_Tests, operator_compare_pistring_false){ +TEST(PIString_Tests, operator_equal_pistring_false){ PIString str1 = "tes"; PIString str2 = "testing"; ASSERT_FALSE(str1 == str2); } -TEST(PIString_Tests, operator_compare_pichar_true){ +TEST(PIString_Tests, operator_equal_pichar_true){ PIString str1 = "t"; PIChar str2 = "t"; ASSERT_TRUE(str1 == str2); } -TEST(PIString_Tests, operator_compare_pichar_false){ +TEST(PIString_Tests, operator_equal_pichar_false){ PIString str1 = "t"; PIChar str2 = "p"; ASSERT_FALSE(str1 == str2); } -TEST(PIString_Tests, operator_compare_char_true){ +TEST(PIString_Tests, operator_equal_cstring_true){ PIString str1 = "test"; char str2[] = "test"; ASSERT_TRUE(str1 == str2); } -TEST(PIString_Tests, operator_compare_char_false){ +TEST(PIString_Tests, operator_equal_cstring_false){ PIString str1 = "t"; char str2[] = "test"; ASSERT_FALSE(str1 == str2); } -TEST(PIString_Tests, operator_enq_compare_pistring_false){ +TEST(PIString_Tests, operator_not_equal_pistring_false){ PIString str1 = "testing"; PIString str2 = "testing"; ASSERT_FALSE(str1 != str2); } -TEST(PIString_Tests, operator_enq_compare_pistring_true){ +TEST(PIString_Tests, operator_not_equal_pistring_true){ PIString str1 = "tes"; PIString str2 = "testing"; ASSERT_TRUE(str1 != str2); } -TEST(PIString_Tests, operator_enq_compare_pichar_false){ +TEST(PIString_Tests, operator_not_equal_pichar_false){ PIString str1 = "t"; PIChar str2 = "t"; ASSERT_FALSE(str1 != str2); } -TEST(PIString_Tests, operator_enq_compare_pichar_true){ +TEST(PIString_Tests, operator_not_equal_pichar_true){ PIString str1 = "t"; PIChar str2 = "p"; ASSERT_TRUE(str1 != str2); } -TEST(PIString_Tests, operator_enq_compare_char_false){ +TEST(PIString_Tests, operator_not_equal_cstring_false){ PIString str1 = "test"; char str2[] = "test"; ASSERT_FALSE(str1 != str2);