1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9// <ios>
10
11// class ios_base
12
13// static const iostate badbit;
14// static const iostate eofbit;
15// static const iostate failbit;
16// static const iostate goodbit = 0;
17
18#include <ios>
19#include <cassert>
20
21#include "test_macros.h"
22
23int main(int, char**)
24{
25 assert(std::ios_base::badbit);
26 assert(std::ios_base::eofbit);
27 assert(std::ios_base::failbit);
28
29 assert
30 (
31 ( std::ios_base::badbit
32 & std::ios_base::eofbit
33 & std::ios_base::failbit) == 0
34 );
35
36 assert(std::ios_base::goodbit == 0);
37
38 return 0;
39}
40

source code of libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_iostate/iostate.pass.cpp