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_oplt=/string_pointer.pass.cpp | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 libcxx/test/strings/basic.string/string.nonmembers/string_oplt=/string_pointer.pass.cpp (limited to 'libcxx/test/strings/basic.string/string.nonmembers/string_oplt=/string_pointer.pass.cpp') diff --git a/libcxx/test/strings/basic.string/string.nonmembers/string_oplt=/string_pointer.pass.cpp b/libcxx/test/strings/basic.string/string.nonmembers/string_oplt=/string_pointer.pass.cpp new file mode 100644 index 00000000000..0bb4ab7b783 --- /dev/null +++ b/libcxx/test/strings/basic.string/string.nonmembers/string_oplt=/string_pointer.pass.cpp @@ -0,0 +1,45 @@ +//===----------------------------------------------------------------------===// +// +// 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 charT* rhs); + +#include +#include + +template +void +test(const S& lhs, const typename S::value_type* rhs, bool x) +{ + assert((lhs <= rhs) == x); +} + +typedef std::string S; + +int main() +{ + test(S(""), "", true); + test(S(""), "abcde", true); + test(S(""), "abcdefghij", true); + test(S(""), "abcdefghijklmnopqrst", true); + test(S("abcde"), "", false); + test(S("abcde"), "abcde", true); + test(S("abcde"), "abcdefghij", true); + test(S("abcde"), "abcdefghijklmnopqrst", true); + test(S("abcdefghij"), "", false); + test(S("abcdefghij"), "abcde", false); + test(S("abcdefghij"), "abcdefghij", true); + test(S("abcdefghij"), "abcdefghijklmnopqrst", true); + test(S("abcdefghijklmnopqrst"), "", false); + test(S("abcdefghijklmnopqrst"), "abcde", false); + test(S("abcdefghijklmnopqrst"), "abcdefghij", false); + test(S("abcdefghijklmnopqrst"), "abcdefghijklmnopqrst", true); +} -- cgit v1.2.3