| 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 |
// <codecvt> |
| 10 |
|
| 11 |
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT |
| 12 |
|
| 13 |
// enum codecvt_mode |
| 14 |
// { |
| 15 |
// consume_header = 4, |
| 16 |
// generate_header = 2, |
| 17 |
// little_endian = 1 |
| 18 |
// }; |
| 19 |
|
| 20 |
#include <codecvt> |
| 21 |
#include <cassert> |
| 22 |
|
| 23 |
#include "test_macros.h" |
| 24 |
|
| 25 |
int main(int, char**) |
| 26 |
{ |
| 27 |
assert(std::consume_header == 4); |
| 28 |
assert(std::generate_header == 2); |
| 29 |
assert(std::little_endian == 1); |
| 30 |
std::codecvt_mode e = std::consume_header; |
| 31 |
assert(e == 4); |
| 32 |
|
| 33 |
return 0; |
| 34 |
} |