Merge pull request 'Tests for PIString 31-40' (#62) from PIStringTests_31-40 into master
Reviewed-on: https://git.shs.tools/SHS/pip/pulls/62
This commit was merged in pull request #62.
This commit is contained in:
@@ -209,8 +209,68 @@ TEST(PIString_Tests, operator_symbol){
|
|||||||
ASSERT_EQ(symbo, str1[4]);
|
ASSERT_EQ(symbo, str1[4]);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(PIString_Tests, operator_compare_pistring_true){
|
TEST(PIString_Tests, operator_equal_pistring_true){
|
||||||
PIString str1 = "testing";
|
PIString str1 = "testing";
|
||||||
PIString str2 = "testing";
|
PIString str2 = "testing";
|
||||||
ASSERT_TRUE(str1 == str2);
|
ASSERT_TRUE(str1 == str2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(PIString_Tests, operator_equal_pistring_false){
|
||||||
|
PIString str1 = "tes";
|
||||||
|
PIString str2 = "testing";
|
||||||
|
ASSERT_FALSE(str1 == str2);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST(PIString_Tests, operator_equal_pichar_true){
|
||||||
|
PIString str1 = "t";
|
||||||
|
PIChar str2 = "t";
|
||||||
|
ASSERT_TRUE(str1 == str2);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST(PIString_Tests, operator_equal_pichar_false){
|
||||||
|
PIString str1 = "t";
|
||||||
|
PIChar str2 = "p";
|
||||||
|
ASSERT_FALSE(str1 == str2);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST(PIString_Tests, operator_equal_cstring_true){
|
||||||
|
PIString str1 = "test";
|
||||||
|
char str2[] = "test";
|
||||||
|
ASSERT_TRUE(str1 == str2);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST(PIString_Tests, operator_equal_cstring_false){
|
||||||
|
PIString str1 = "t";
|
||||||
|
char str2[] = "test";
|
||||||
|
ASSERT_FALSE(str1 == str2);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST(PIString_Tests, operator_not_equal_pistring_false){
|
||||||
|
PIString str1 = "testing";
|
||||||
|
PIString str2 = "testing";
|
||||||
|
ASSERT_FALSE(str1 != str2);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST(PIString_Tests, operator_not_equal_pistring_true){
|
||||||
|
PIString str1 = "tes";
|
||||||
|
PIString str2 = "testing";
|
||||||
|
ASSERT_TRUE(str1 != str2);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST(PIString_Tests, operator_not_equal_pichar_false){
|
||||||
|
PIString str1 = "t";
|
||||||
|
PIChar str2 = "t";
|
||||||
|
ASSERT_FALSE(str1 != str2);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST(PIString_Tests, operator_not_equal_pichar_true){
|
||||||
|
PIString str1 = "t";
|
||||||
|
PIChar str2 = "p";
|
||||||
|
ASSERT_TRUE(str1 != str2);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST(PIString_Tests, operator_not_equal_cstring_false){
|
||||||
|
PIString str1 = "test";
|
||||||
|
char str2[] = "test";
|
||||||
|
ASSERT_FALSE(str1 != str2);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user