diff options
Diffstat (limited to 'libcxx/test/re/re.regex/re.regex.construct')
4 files changed, 25 insertions, 6 deletions
diff --git a/libcxx/test/re/re.regex/re.regex.construct/copy.pass.cpp b/libcxx/test/re/re.regex/re.regex.construct/copy.pass.cpp new file mode 100644 index 00000000000..d2fa4740665 --- /dev/null +++ b/libcxx/test/re/re.regex/re.regex.construct/copy.pass.cpp @@ -0,0 +1,25 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <regex> + +// template <class charT, class traits = regex_traits<charT>> class basic_regex; + +// basic_regex(const basic_regex& e); + +#include <regex> +#include <cassert> + +int main() +{ + std::regex r1("(a([bc]))"); + std::regex r2 = r1; + assert(r2.flags() == std::regex::ECMAScript); + assert(r2.mark_count() == 2); +} diff --git a/libcxx/test/re/re.regex/re.regex.construct/ptr.pass.cpp b/libcxx/test/re/re.regex/re.regex.construct/ptr.pass.cpp index 23b3d17568e..9e16dfce577 100644 --- a/libcxx/test/re/re.regex/re.regex.construct/ptr.pass.cpp +++ b/libcxx/test/re/re.regex/re.regex.construct/ptr.pass.cpp @@ -13,8 +13,6 @@ // basic_regex(const charT* p); -#include <iostream> - #include <regex> #include <cassert> diff --git a/libcxx/test/re/re.regex/re.regex.construct/ptr_flg.pass.cpp b/libcxx/test/re/re.regex/re.regex.construct/ptr_flg.pass.cpp index 31f9da9e4df..88d1ae25529 100644 --- a/libcxx/test/re/re.regex/re.regex.construct/ptr_flg.pass.cpp +++ b/libcxx/test/re/re.regex/re.regex.construct/ptr_flg.pass.cpp @@ -13,8 +13,6 @@ // basic_regex(const charT* p, flag_type f = regex_constants::ECMAScript); -#include <iostream> - #include <regex> #include <cassert> diff --git a/libcxx/test/re/re.regex/re.regex.construct/string_flg.pass.cpp b/libcxx/test/re/re.regex/re.regex.construct/string_flg.pass.cpp index 56ba2af7c79..0d1ecf2665f 100644 --- a/libcxx/test/re/re.regex/re.regex.construct/string_flg.pass.cpp +++ b/libcxx/test/re/re.regex/re.regex.construct/string_flg.pass.cpp @@ -15,8 +15,6 @@ // basic_regex(const basic_string<charT, ST, SA>& s, // flag_type f = regex_constants::ECMAScript); -#include <iostream> - #include <regex> #include <cassert> |