From 51072bd6bf79ef2bc6a922079bff57c31c1effbc Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 23 Jul 2016 20:47:26 +0000 Subject: Vendor import of libc++ release_39 branch r276489: https://llvm.org/svn/llvm-project/libcxx/branches/release_39@276489 --- .../ios/basic.ios.members/narrow.pass.cpp | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 test/std/input.output/iostreams.base/ios/basic.ios.members/narrow.pass.cpp (limited to 'test/std/input.output/iostreams.base/ios/basic.ios.members/narrow.pass.cpp') diff --git a/test/std/input.output/iostreams.base/ios/basic.ios.members/narrow.pass.cpp b/test/std/input.output/iostreams.base/ios/basic.ios.members/narrow.pass.cpp new file mode 100644 index 0000000000000..bf865e68149d4 --- /dev/null +++ b/test/std/input.output/iostreams.base/ios/basic.ios.members/narrow.pass.cpp @@ -0,0 +1,24 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// + +// template class basic_ios + +// char narrow(char_type c, char dfault) const; + +#include +#include + +int main() +{ + const std::ios ios(0); + assert(ios.narrow('c', '*') == 'c'); + assert(ios.narrow('\xFE', '*') == '*'); +} -- cgit v1.2.3