12224SN/A// Copyright (C) 2005, 2009 Free Software Foundation, Inc. 22224SN/A// 32224SN/A// This file is part of the GNU ISO C++ Library. This library is free 42224SN/A// software; you can redistribute it and/or modify it under the 52224SN/A// terms of the GNU General Public License as published by the 62224SN/A// Free Software Foundation; either version 3, or (at your option) 72224SN/A// any later version. 82224SN/A 92224SN/A// This library is distributed in the hope that it will be useful, 102224SN/A// but WITHOUT ANY WARRANTY; without even the implied warranty of 112224SN/A// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 122224SN/A// GNU General Public License for more details. 132224SN/A 142224SN/A// You should have received a copy of the GNU General Public License along 152224SN/A// with this library; see the file COPYING3. If not see 162224SN/A// <http://www.gnu.org/licenses/>. 172224SN/A 182224SN/A// 27.6.2.7 standard basic_ostream manipulators 192224SN/A 202224SN/A#include <ostream> 212224SN/A#include <sstream> 222224SN/A#include <testsuite_hooks.h> 232619Siignatyev 242619Siignatyevvoid test01(void) 252224SN/A{ 262224SN/A bool test __attribute__((unused)) = true; 272224SN/A 282224SN/A const std::wstring str01(L" santa barbara "); 292224SN/A std::wstring str04; 302224SN/A std::wstring str05; 312224SN/A 322224SN/A std::wostringstream oss01(str01); 332224SN/A std::wostringstream oss02; 342224SN/A 352224SN/A // template<_CharT, _Traits> 362224SN/A // basic_ostream<_CharT, _Traits>& ends(basic_ostream<_Char, _Traits>& os) 372224SN/A oss01 << std::ends; 382224SN/A str04 = oss01.str(); 392224SN/A VERIFY( str04.size() == str01.size() ); 402224SN/A 412224SN/A oss02 << std::ends; 422224SN/A str05 = oss02.str(); 432224SN/A VERIFY( str05.size() == 1 ); 442224SN/A VERIFY( str05[0] == wchar_t() ); 452224SN/A} 462224SN/A 472224SN/Aint main() 482224SN/A{ 492224SN/A test01(); 502224SN/A return 0; 512224SN/A} 522224SN/A