diff --git a/test/std/containers/sequences/array/empty.pass.cpp b/test/std/containers/sequences/array/empty.pass.cpp new file mode 100644 index 000000000..2c01dfc86 --- /dev/null +++ b/test/std/containers/sequences/array/empty.pass.cpp @@ -0,0 +1,36 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// + +// class array + +// bool empty() const noexcept; + +#include +#include + +#include "test_macros.h" +#include "min_allocator.h" + +int main() +{ + { + typedef std::array C; + C c; + ASSERT_NOEXCEPT(c.empty()); + assert(!c.empty()); + } + { + typedef std::array C; + C c; + ASSERT_NOEXCEPT(c.empty()); + assert( c.empty()); + } +} diff --git a/test/std/containers/sequences/array/max_size.pass.cpp b/test/std/containers/sequences/array/max_size.pass.cpp new file mode 100644 index 000000000..9a3fed395 --- /dev/null +++ b/test/std/containers/sequences/array/max_size.pass.cpp @@ -0,0 +1,36 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// + +// class array + +// bool max_size() const noexcept; + +#include +#include + +#include "test_macros.h" +#include "min_allocator.h" + +int main() +{ + { + typedef std::array C; + C c; + ASSERT_NOEXCEPT(c.max_size()); + assert(c.max_size() == 2); + } + { + typedef std::array C; + C c; + ASSERT_NOEXCEPT(c.max_size()); + assert(c.max_size() == 0); + } +}