iostate.pass.cpp revision d90b0a41a8f0995602f0f7ee2541ff724079b20b
1//===----------------------------------------------------------------------===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10// <ios>
11
12// class ios_base
13
14// static const iostate badbit;
15// static const iostate eofbit;
16// static const iostate failbit;
17// static const iostate goodbit = 0;
18
19#include <ios>
20#include <cassert>
21
22int main()
23{
24    assert(std::ios_base::badbit);
25    assert(std::ios_base::eofbit);
26    assert(std::ios_base::failbit);
27
28    assert
29    (
30        ( std::ios_base::badbit
31        & std::ios_base::eofbit
32        & std::ios_base::failbit) == 0
33    );
34
35    assert(std::ios_base::goodbit == 0);
36}
37