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++98, c++03 10 11 // <filesystem> 12 13 // class path 14 15 // const string_type& native() const noexcept; 16 17 #include "filesystem_include.hpp" 18 #include <type_traits> 19 #include <cassert> 20 21 #include "test_macros.h" 22 #include "filesystem_test_helper.hpp" 23 24 25 int main(int, char**) 26 { 27 using namespace fs; 28 const char* const value = "hello world"; 29 { // Check signature 30 path p(value); 31 ASSERT_SAME_TYPE(path::string_type const&, decltype(p.native())); 32 ASSERT_NOEXCEPT(p.native()); 33 } 34 { // native() is tested elsewhere 35 path p(value); 36 assert(p.native() == value); 37 } 38 39 return 0; 40 } 41