fix test failures with older clang versions
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337658 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
||||
// Source Licenses. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03
|
||||
// XFAIL: apple-clang-7, clang-3.7, clang-3.8
|
||||
|
||||
// <experimental/filesystem>
|
||||
|
||||
// class directory_entry
|
||||
|
||||
// directory_entry() noexcept = default;
|
||||
|
||||
#include "filesystem_include.hpp"
|
||||
#include <type_traits>
|
||||
#include <cassert>
|
||||
|
||||
int main() {
|
||||
using namespace fs;
|
||||
// Default
|
||||
{
|
||||
static_assert(std::is_nothrow_default_constructible<directory_entry>::value,
|
||||
"directory_entry must have a nothrow default constructor");
|
||||
const directory_entry e;
|
||||
assert(e.path() == path());
|
||||
}
|
||||
}
|
||||
@@ -30,7 +30,7 @@ TEST_SUITE(directory_entry_obs_testsuite)
|
||||
TEST_CASE(signatures) {
|
||||
using namespace fs;
|
||||
{
|
||||
const fs::directory_entry e;
|
||||
const fs::directory_entry e = {};
|
||||
std::error_code ec;
|
||||
static_assert(std::is_same<decltype(e.file_size()), uintmax_t>::value, "");
|
||||
static_assert(std::is_same<decltype(e.file_size(ec)), uintmax_t>::value,
|
||||
|
||||
@@ -32,7 +32,7 @@ TEST_CASE(file_dne) {
|
||||
|
||||
TEST_CASE(signatures) {
|
||||
using namespace fs;
|
||||
const directory_entry e;
|
||||
const directory_entry e = {};
|
||||
std::error_code ec;
|
||||
#define TEST_FUNC(name) \
|
||||
static_assert(std::is_same<decltype(e.name()), bool>::value, \
|
||||
|
||||
@@ -28,7 +28,7 @@ TEST_SUITE(directory_entry_obs_testsuite)
|
||||
TEST_CASE(signatures) {
|
||||
using namespace fs;
|
||||
{
|
||||
const fs::directory_entry e;
|
||||
const directory_entry e = {};
|
||||
std::error_code ec;
|
||||
static_assert(std::is_same<decltype(e.hard_link_count()), uintmax_t>::value, "");
|
||||
static_assert(std::is_same<decltype(e.hard_link_count(ec)), uintmax_t>::value,
|
||||
|
||||
@@ -28,7 +28,7 @@ TEST_SUITE(directory_entry_obs_testsuite)
|
||||
TEST_CASE(signatures) {
|
||||
using namespace fs;
|
||||
{
|
||||
const fs::directory_entry e;
|
||||
const fs::directory_entry e = {};
|
||||
std::error_code ec;
|
||||
static_assert(std::is_same<decltype(e.last_write_time()), file_time_type>::value,
|
||||
"");
|
||||
|
||||
Reference in New Issue
Block a user