From 5ce10a67446c78779e63e19e4da0eeb671afff15 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Sun, 16 May 2010 12:46:02 +0000 Subject: Replaced :: with _ in several path names llvm-svn: 103907 --- .../string_opgt=/string_string.pass.cpp | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 libcxx/test/strings/basic.string/string.nonmembers/string_opgt=/string_string.pass.cpp (limited to 'libcxx/test/strings/basic.string/string.nonmembers/string_opgt=/string_string.pass.cpp') diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string_opgt=/string_string.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string_opgt=/string_string.pass.cpp new file mode 100644 index 00000000000..0315ae10dd2 --- /dev/null +++ b/libcxx/test/strings/basic.string/string.nonmembers/string_opgt=/string_string.pass.cpp @@ -0,0 +1,46 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// + +// template +// bool operator>=(const basic_string& lhs, +// const basic_string& rhs); + +#include +#include + +template +void +test(const S& lhs, const S& rhs, bool x) +{ + assert((lhs >= rhs) == x); +} + +typedef std::string S; + +int main() +{ + test(S(""), S(""), true); + test(S(""), S("abcde"), false); + test(S(""), S("abcdefghij"), false); + test(S(""), S("abcdefghijklmnopqrst"), false); + test(S("abcde"), S(""), true); + test(S("abcde"), S("abcde"), true); + test(S("abcde"), S("abcdefghij"), false); + test(S("abcde"), S("abcdefghijklmnopqrst"), false); + test(S("abcdefghij"), S(""), true); + test(S("abcdefghij"), S("abcde"), true); + test(S("abcdefghij"), S("abcdefghij"), true); + test(S("abcdefghij"), S("abcdefghijklmnopqrst"), false); + test(S("abcdefghijklmnopqrst"), S(""), true); + test(S("abcdefghijklmnopqrst"), S("abcde"), true); + test(S("abcdefghijklmnopqrst"), S("abcdefghij"), true); + test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrst"), true); +} -- cgit v1.2.3