]>
git.saurik.com Git - apple/xnu.git/blob - tests/bounded_array_ref_src/size.cpp
3 // size_t size() const;
6 #include <libkern/c++/bounded_array_ref.h>
7 #include "test_policy.h"
9 #include <darwintest.h>
10 #include <darwintest_utils.h>
18 T array
[5] = {T
{0}, T
{1}, T
{2}, T
{3}, T
{4}};
21 test_bounded_array_ref
<T
> const view(&array
[0], static_cast<std::size_t>(0));
22 std::size_t size
= view
.size();
26 test_bounded_array_ref
<T
> const view(&array
[0], 1);
27 std::size_t size
= view
.size();
31 test_bounded_array_ref
<T
> const view(&array
[0], 2);
32 std::size_t size
= view
.size();
36 test_bounded_array_ref
<T
> const view(&array
[0], 5);
37 std::size_t size
= view
.size();
42 T_DECL(size
, "bounded_array_ref.size") {