llvm-project/libcxx/test/std/input.output/iostream.forward/iosfwd.pass.cpp

124 lines
3.8 KiB
C++
Raw Normal View History

2010-05-12 03:42:16 +08:00
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
2010-05-12 03:42:16 +08:00
//
2010-11-17 06:09:02 +08:00
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
2010-05-12 03:42:16 +08:00
//
//===----------------------------------------------------------------------===//
// <iosfwd>
#include <iosfwd>
#include <cwchar> // for mbstate_t
[libcxx] [test] D26314: Fix MSVC warning C4189 "local variable is initialized but not referenced". test/std/depr/depr.c.headers/inttypes_h.pass.cpp test/std/input.output/file.streams/c.files/cinttypes.pass.cpp test/std/input.output/iostream.forward/iosfwd.pass.cpp Add test() to avoid a bunch of void-casts, although we still need a few. test/std/input.output/iostream.format/quoted.manip/quoted.pass.cpp skippingws was unused (it's unclear to me whether this was mistakenly copy-pasted from round_trip() below). test/std/localization/locale.categories/category.collate/locale.collate/types.pass.cpp test/std/localization/locale.categories/category.ctype/facet.ctype.special/types.pass.cpp test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char.pass.cpp test/std/localization/locale.categories/category.ctype/locale.codecvt/types_wchar_t.pass.cpp test/std/localization/locale.categories/category.ctype/locale.ctype/types.pass.cpp test/std/localization/locale.categories/facet.numpunct/locale.numpunct/types.pass.cpp test/std/localization/locales/locale.global.templates/use_facet.pass.cpp When retrieving facets, the references are unused. test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp "std::ios_base::iostate err = ios.goodbit;" was completely unused here. test/std/localization/locale.categories/category.time/locale.time.get/time_base.pass.cpp test/std/numerics/c.math/ctgmath.pass.cpp test/std/numerics/rand/rand.device/entropy.pass.cpp test/std/numerics/rand/rand.device/eval.pass.cpp test/std/strings/basic.string/string.modifiers/string_copy/copy.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eof.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eof.pass.cpp test/std/thread/futures/futures.promise/dtor.pass.cpp test/std/thread/futures/futures.task/futures.task.members/dtor.pass.cpp test/std/thread/thread.condition/thread.condition.condvar/wait_for_pred.pass.cpp These variables are verifying types but are otherwise unused. test/std/strings/basic.string/string.capacity/reserve.pass.cpp old_cap was unused (it's unclear to me whether it was intended to be used). test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/eq.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/lt.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/lt.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/eq.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/lt.pass.cpp These tests contained unused characters. llvm-svn: 286847
2016-11-15 01:35:14 +08:00
template <class Ptr> void test()
{
Ptr p = 0;
((void)p); // Prevent unused warning
}
2010-05-12 03:42:16 +08:00
int main()
{
[libcxx] [test] D26314: Fix MSVC warning C4189 "local variable is initialized but not referenced". test/std/depr/depr.c.headers/inttypes_h.pass.cpp test/std/input.output/file.streams/c.files/cinttypes.pass.cpp test/std/input.output/iostream.forward/iosfwd.pass.cpp Add test() to avoid a bunch of void-casts, although we still need a few. test/std/input.output/iostream.format/quoted.manip/quoted.pass.cpp skippingws was unused (it's unclear to me whether this was mistakenly copy-pasted from round_trip() below). test/std/localization/locale.categories/category.collate/locale.collate/types.pass.cpp test/std/localization/locale.categories/category.ctype/facet.ctype.special/types.pass.cpp test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char.pass.cpp test/std/localization/locale.categories/category.ctype/locale.codecvt/types_wchar_t.pass.cpp test/std/localization/locale.categories/category.ctype/locale.ctype/types.pass.cpp test/std/localization/locale.categories/facet.numpunct/locale.numpunct/types.pass.cpp test/std/localization/locales/locale.global.templates/use_facet.pass.cpp When retrieving facets, the references are unused. test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp "std::ios_base::iostate err = ios.goodbit;" was completely unused here. test/std/localization/locale.categories/category.time/locale.time.get/time_base.pass.cpp test/std/numerics/c.math/ctgmath.pass.cpp test/std/numerics/rand/rand.device/entropy.pass.cpp test/std/numerics/rand/rand.device/eval.pass.cpp test/std/strings/basic.string/string.modifiers/string_copy/copy.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eof.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eof.pass.cpp test/std/thread/futures/futures.promise/dtor.pass.cpp test/std/thread/futures/futures.task/futures.task.members/dtor.pass.cpp test/std/thread/thread.condition/thread.condition.condvar/wait_for_pred.pass.cpp These variables are verifying types but are otherwise unused. test/std/strings/basic.string/string.capacity/reserve.pass.cpp old_cap was unused (it's unclear to me whether it was intended to be used). test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/eq.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/lt.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/lt.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/eq.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/lt.pass.cpp These tests contained unused characters. llvm-svn: 286847
2016-11-15 01:35:14 +08:00
test<std::char_traits<char>* >();
test<std::char_traits<wchar_t>* >();
test<std::char_traits<unsigned short>*>();
test<std::basic_ios<char>* >();
test<std::basic_ios<wchar_t>* >();
test<std::basic_ios<unsigned short>*>();
test<std::basic_streambuf<char>* >();
test<std::basic_streambuf<wchar_t>* >();
test<std::basic_streambuf<unsigned short>*>();
test<std::basic_istream<char>* >();
test<std::basic_istream<wchar_t>* >();
test<std::basic_istream<unsigned short>*>();
test<std::basic_ostream<char>* >();
test<std::basic_ostream<wchar_t>* >();
test<std::basic_ostream<unsigned short>*>();
test<std::basic_iostream<char>* >();
test<std::basic_iostream<wchar_t>* >();
test<std::basic_iostream<unsigned short>*>();
test<std::basic_stringbuf<char>* >();
test<std::basic_stringbuf<wchar_t>* >();
test<std::basic_stringbuf<unsigned short>*>();
test<std::basic_istringstream<char>* >();
test<std::basic_istringstream<wchar_t>* >();
test<std::basic_istringstream<unsigned short>*>();
test<std::basic_ostringstream<char>* >();
test<std::basic_ostringstream<wchar_t>* >();
test<std::basic_ostringstream<unsigned short>*>();
test<std::basic_stringstream<char>* >();
test<std::basic_stringstream<wchar_t>* >();
test<std::basic_stringstream<unsigned short>*>();
test<std::basic_filebuf<char>* >();
test<std::basic_filebuf<wchar_t>* >();
test<std::basic_filebuf<unsigned short>*>();
test<std::basic_ifstream<char>* >();
test<std::basic_ifstream<wchar_t>* >();
test<std::basic_ifstream<unsigned short>*>();
test<std::basic_ofstream<char>* >();
test<std::basic_ofstream<wchar_t>* >();
test<std::basic_ofstream<unsigned short>*>();
test<std::basic_fstream<char>* >();
test<std::basic_fstream<wchar_t>* >();
test<std::basic_fstream<unsigned short>*>();
test<std::istreambuf_iterator<char>* >();
test<std::istreambuf_iterator<wchar_t>* >();
test<std::istreambuf_iterator<unsigned short>*>();
test<std::ostreambuf_iterator<char>* >();
test<std::ostreambuf_iterator<wchar_t>* >();
test<std::ostreambuf_iterator<unsigned short>*>();
test<std::ios* >();
test<std::wios*>();
test<std::streambuf*>();
test<std::istream* >();
test<std::ostream* >();
test<std::iostream* >();
test<std::stringbuf* >();
test<std::istringstream*>();
test<std::ostringstream*>();
test<std::stringstream* >();
test<std::filebuf* >();
test<std::ifstream*>();
test<std::ofstream*>();
test<std::fstream* >();
test<std::wstreambuf*>();
test<std::wistream* >();
test<std::wostream* >();
test<std::wiostream* >();
test<std::wstringbuf* >();
test<std::wistringstream*>();
test<std::wostringstream*>();
test<std::wstringstream* >();
test<std::wfilebuf* >();
test<std::wifstream*>();
test<std::wofstream*>();
test<std::wfstream* >();
test<std::fpos<std::mbstate_t>*>();
test<std::streampos* >();
test<std::wstreampos* >();
2010-05-12 03:42:16 +08:00
}