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 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20, c++23
10 
11 // REQUIRES: has-unix-headers
12 // REQUIRES: libcpp-hardening-mode={{extensive|debug}}
13 // XFAIL: availability-verbose_abort-missing
14 
15 // <fstream>
16 
17 // class basic_fstream;
18 
19 // native_handle_type native_handle() const noexcept;
20 
21 #include <fstream>
22 
23 #include "../native_handle_assert_test_helpers.h"
24 
main(int,char **)25 int main(int, char**) {
26   test_native_handle_assertion<std::basic_fstream<char>>();
27 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
28   test_native_handle_assertion<std::basic_fstream<wchar_t>>();
29 #endif
30 
31   return 0;
32 }
33