From 3ecbf5d51b13e11a93ae5757408a27c21d804c9f Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 17 Dec 2016 23:28:30 +0300 Subject: Add support for regex in runner --- unit-tests/test/script/regex/driver.cxx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'unit-tests/test/script/regex') diff --git a/unit-tests/test/script/regex/driver.cxx b/unit-tests/test/script/regex/driver.cxx index ca09048..5b3d648 100644 --- a/unit-tests/test/script/regex/driver.cxx +++ b/unit-tests/test/script/regex/driver.cxx @@ -129,6 +129,27 @@ main () assert (v1 == vc ({'1', '2', '2'})); } + // Test line_string. + // + // @@ Add more tests. + // + // Note that the following code crashes if compiled with libc++ (LLVM bug + // #31454). + // + // @@ Probably we can overcome it by providing our own allocator for + // basic_string instantiation. The function allocate() could allocate some + // more elements that would be enough not to corrupt the memory (which + // push_back() does). + // @@ But maybe doesn't worth to bother as the bug seems to get assigned. + // @@ Heavily affects MacOS where clang++/libc++ is the default setup. + // + { + line_string s; + s.push_back (line_char ('0')); + s.push_back (line_char ('1')); + s.push_back (line_char ('2')); + } + // Test line_char_locale and ctype (only non-trivial functions). // { -- cgit v1.1