From c3ecf753b2da6127b14f2e4933cb004167ced2f8 Mon Sep 17 00:00:00 2001 From: Lawrence Manning Date: Thu, 11 Jul 2019 11:58:27 +0100 Subject: AKString: add missing comparison operators And some trivial tests. --- AK/Tests/TestString.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) mode change 100644 => 100755 AK/Tests/TestString.cpp (limited to 'AK/Tests/TestString.cpp') diff --git a/AK/Tests/TestString.cpp b/AK/Tests/TestString.cpp old mode 100644 new mode 100755 index 851971a77e..808d0904be --- a/AK/Tests/TestString.cpp +++ b/AK/Tests/TestString.cpp @@ -25,6 +25,15 @@ int main() EXPECT(test_string != "ABCDE"); EXPECT(test_string != "ABCDEFG"); + EXPECT("a" < String("b")); + EXPECT(!("a" > String("b"))); + EXPECT("b" > String("a")); + EXPECT(!("b" < String("b"))); + EXPECT("a" >= String("a")); + EXPECT(!("a" >= String("b"))); + EXPECT("a" <= String("a")); + EXPECT(!("b" <= String("a"))); + EXPECT_EQ(test_string[0], 'A'); EXPECT_EQ(test_string[1], 'B'); -- cgit v1.2.3