@@ -22,24 +22,72 @@ TEST_CASE ("Testing String::equals(const String &) with exit status PASS", "[Str
22
22
REQUIRE (str1.equals (str2) == 1 );
23
23
}
24
24
25
+ TEST_CASE (" Testing String::operator==(const String &) with exit status PASS" , " [String-equals-01]" )
26
+ {
27
+ arduino::String str1 (" Hello" ), str2 (" Hello" );
28
+ REQUIRE (str1 == str2);
29
+ }
30
+
31
+ TEST_CASE (" Testing String::operator!=(const String &) with exit status FAIL" , " [String-equals-01]" )
32
+ {
33
+ arduino::String str1 (" Hello" ), str2 (" Hello" );
34
+ REQUIRE_FALSE (str1 != str2);
35
+ }
36
+
25
37
TEST_CASE (" Testing String::equals(const String &) with exit status FAIL" , " [String-equals-02]" )
26
38
{
27
39
arduino::String str1 (" Hello" ), str2 (" World" );
28
40
REQUIRE (str1.equals (str2) == 0 );
29
41
}
30
42
43
+ TEST_CASE (" Testing String::operator==(const String &) with exit status FAIL" , " [String-equals-02]" )
44
+ {
45
+ arduino::String str1 (" Hello" ), str2 (" World" );
46
+ REQUIRE_FALSE (str1 == str2);
47
+ }
48
+
49
+ TEST_CASE (" Testing String::operator !=(const String &) with exit status PASS" , " [String-equals-02]" )
50
+ {
51
+ arduino::String str1 (" Hello" ), str2 (" World" );
52
+ REQUIRE (str1 != str2);
53
+ }
54
+
31
55
TEST_CASE (" Testing String::equals(const char *) with exit status PASS" , " [String-equals-03]" )
32
56
{
33
57
arduino::String str1 (" Hello" );
34
58
REQUIRE (str1.equals (" Hello" ) == 1 );
35
59
}
36
60
61
+ TEST_CASE (" Testing String::operator ==(const char *) with exit status PASS" , " [String-equals-03]" )
62
+ {
63
+ arduino::String str1 (" Hello" );
64
+ REQUIRE (str1 == " Hello" );
65
+ }
66
+
67
+ TEST_CASE (" Testing String::operator !=(const char *) with exit status FAIL" , " [String-equals-03]" )
68
+ {
69
+ arduino::String str1 (" Hello" );
70
+ REQUIRE_FALSE (str1 != " Hello" );
71
+ }
72
+
37
73
TEST_CASE (" Testing String::equals(const char *) with exit status FAIL" , " [String-equals-04]" )
38
74
{
39
75
arduino::String str1 (" Hello" );
40
76
REQUIRE (str1.equals (" World" ) == 0 );
41
77
}
42
78
79
+ TEST_CASE (" Testing String::operator ==(const char *) with exit status FAIL" , " [String-equals-04]" )
80
+ {
81
+ arduino::String str1 (" Hello" );
82
+ REQUIRE_FALSE (str1 == " World" );
83
+ }
84
+
85
+ TEST_CASE (" Testing String::operator !=(const char *) with exit status PASS" , " [String-equals-04]" )
86
+ {
87
+ arduino::String str1 (" Hello" );
88
+ REQUIRE (str1 != " World" );
89
+ }
90
+
43
91
TEST_CASE (" Testing String::equalsIgnoreCase(const String &) PASS with NON-empty string" , " [String-equalsIgnoreCase-05]" )
44
92
{
45
93
arduino::String str1 (" Hello" ), str2 (" Hello" );
0 commit comments