//: C03:CompStr.h // From "Thinking in C++, Volume 2", by Bruce Eckel & Chuck Allison. // (c) 1995-2004 MindView, Inc. All Rights Reserved. // See source code use permissions stated in the file 'License.txt', // distributed with the code package available at www.MindView.net. #ifndef COMPSTR_H #define COMPSTR_H #include #include "../TestSuite/Test.h" using std::string; class CompStrTest : public TestSuite::Test { public: void run() { // Strings to compare string s1("This"); string s2("That"); test_(s1 == s1); test_(s1 != s2); test_(s1 > s2); test_(s1 >= s2); test_(s1 >= s1); test_(s2 < s1); test_(s2 <= s1); test_(s1 <= s1); } }; #endif // COMPSTR_H ///:~