From 63a6f95d7cdb4ad9cd7949696f5d33f17f8a5bbb Mon Sep 17 00:00:00 2001 From: Gama Date: Wed, 10 Feb 2021 11:10:35 +0300 Subject: [PATCH] Next tests for PIString 71-80 --- tests/core/pistringTest.cpp | 66 +++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/tests/core/pistringTest.cpp b/tests/core/pistringTest.cpp index 8b637365..742d0783 100644 --- a/tests/core/pistringTest.cpp +++ b/tests/core/pistringTest.cpp @@ -454,3 +454,69 @@ TEST(PIString_Tests, operator_grater_eq_pistring_false){ PIString str2 = "testin"; ASSERT_FALSE(str2 >= str1); } + +TEST(PIString_Tests, operator_grater_eq_pistring_true_equal){ + PIString str1 = "testing"; + PIString str2 = "testing"; + ASSERT_TRUE(str1 >= str2); +} + +TEST(PIString_Tests, operator_grater_eq_pichar_true){ + PIString str1 = "t"; + PIChar str2 = "a"; + ASSERT_TRUE(str1 >= str2); +} + +TEST(PIString_Tests, operator_grater_eq_pichar_false){ + PIString str1 = "a"; + PIChar str2 = "t"; + ASSERT_FALSE(str1 >= str2); +} + +TEST(PIString_Tests, operator_grater_eq_pichar_true_equal){ + PIString str1 = "t"; + PIChar str2 = "t"; + ASSERT_TRUE(str1 >= str2); +} + +TEST(PIString_Tests, operator_grater_eq_cstring_true){ + PIString str1 = "t"; + char str2[] = "a"; + ASSERT_TRUE(str1 >= str2); +} + +TEST(PIString_Tests, operator_grater_eq_cstring_false){ + PIString str1 = "a"; + char str2[] = "t"; + ASSERT_FALSE(str1 >= str2); +} + +TEST(PIString_Tests, operator_grater_eq_cstring_true_equal){ + PIString str1 = "t"; + char str2[] = "t"; + ASSERT_TRUE(str1 >= str2); +} + +TEST(PIString_Tests, operator_shift_pistring){ + PIString str1 = "shift"; + PIString str2 = " good"; + str1 << str2; + PIString res = "shift good"; + ASSERT_EQ(res, str1); +} + +TEST(PIString_Tests, operator_shift_pichar){ + PIString str1 = "shif"; + PIChar str2 = 't'; + str1 << str2; + PIString res = "shift"; + ASSERT_EQ(res, str1); +} + +TEST(PIString_Tests, operator_shift_cstring){ + PIString str1 = "shif"; + char str2[] = "t chat"; + str1 << str2; + PIString res = "shift chat"; + ASSERT_EQ(res, str1); +}