aboutsummaryrefslogtreecommitdiff
path: root/test/libcxx/strings/basic.string/string.modifiers/insert_iter_char_db1.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/libcxx/strings/basic.string/string.modifiers/insert_iter_char_db1.pass.cpp')
-rw-r--r--test/libcxx/strings/basic.string/string.modifiers/insert_iter_char_db1.pass.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/libcxx/strings/basic.string/string.modifiers/insert_iter_char_db1.pass.cpp b/test/libcxx/strings/basic.string/string.modifiers/insert_iter_char_db1.pass.cpp
new file mode 100644
index 000000000000..fbb26d178997
--- /dev/null
+++ b/test/libcxx/strings/basic.string/string.modifiers/insert_iter_char_db1.pass.cpp
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <string>
+
+// iterator insert(const_iterator p, charT c);
+
+#if _LIBCPP_DEBUG >= 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+#endif
+
+#include <string>
+#include <stdexcept>
+#include <cassert>
+
+
+int main()
+{
+#if _LIBCPP_DEBUG >= 1
+ {
+ typedef std::string S;
+ S s;
+ S s2;
+ s.insert(s2.begin(), '1');
+ assert(false);
+ }
+#endif
+}