1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
12 // template <class BidirectionalIterator> class sub_match;
14 // int compare(const value_type* s) const;
18 #include "test_macros.h"
24 typedef std::sub_match<const CharT*> SM;
26 assert(sm.compare("") == 0);
27 const CharT s[] = {'1', '2', '3', 0};
31 assert(sm.compare("") > 0);
32 assert(sm.compare("123") == 0);
35 typedef wchar_t CharT;
36 typedef std::sub_match<const CharT*> SM;
38 assert(sm.compare(L"") == 0);
39 const CharT s[] = {'1', '2', '3', 0};
43 assert(sm.compare(L"") > 0);
44 assert(sm.compare(L"123") == 0);