diff options
Diffstat (limited to 'test/std/input.output/iostreams.base/ios.base/ios.base.locales/getloc.pass.cpp')
-rw-r--r-- | test/std/input.output/iostreams.base/ios.base/ios.base.locales/getloc.pass.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/std/input.output/iostreams.base/ios.base/ios.base.locales/getloc.pass.cpp b/test/std/input.output/iostreams.base/ios.base/ios.base.locales/getloc.pass.cpp new file mode 100644 index 0000000000000..8f265bc698842 --- /dev/null +++ b/test/std/input.output/iostreams.base/ios.base/ios.base.locales/getloc.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. +// +//===----------------------------------------------------------------------===// + +// <ios> + +// class ios_base + +// locale getloc() const; + +#include <ios> +#include <string> +#include <cassert> + +class test + : public std::ios +{ +public: + test() + { + init(0); + } +}; + +int main() +{ + const test t; + assert(t.getloc().name() == std::string("C")); +} |