Move test into test/std subdirectory.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@224658 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// test numeric_limits
|
||||
|
||||
// float_round_style
|
||||
|
||||
#include <limits>
|
||||
|
||||
typedef char one;
|
||||
struct two {one _[2];};
|
||||
|
||||
one test(std::float_round_style);
|
||||
two test(int);
|
||||
|
||||
int main()
|
||||
{
|
||||
static_assert(std::round_indeterminate == -1,
|
||||
"std::round_indeterminate == -1");
|
||||
static_assert(std::round_toward_zero == 0,
|
||||
"std::round_toward_zero == 0");
|
||||
static_assert(std::round_to_nearest == 1,
|
||||
"std::round_to_nearest == 1");
|
||||
static_assert(std::round_toward_infinity == 2,
|
||||
"std::round_toward_infinity == 2");
|
||||
static_assert(std::round_toward_neg_infinity == 3,
|
||||
"std::round_toward_neg_infinity == 3");
|
||||
static_assert(sizeof(test(std::round_to_nearest)) == 1,
|
||||
"sizeof(test(std::round_to_nearest)) == 1");
|
||||
static_assert(sizeof(test(1)) == 2,
|
||||
"sizeof(test(1)) == 2");
|
||||
}
|
||||
Reference in New Issue
Block a user