]>
git.saurik.com Git - apple/xnu.git/blob - tests/bounded_array_src/for_loop.cpp
   2 // Make sure `bounded_array` works nicely with the range-based for-loop. 
   5 #include <libkern/c++/bounded_array.h> 
   6 #include <darwintest.h> 
   7 #include "test_policy.h" 
  17         test_bounded_array
<T
, 5> array 
= {T
{0}, T
{1}, T
{2}, T
{3}, T
{4}}; 
  18         for (T
& element 
: array
) { 
  22         for (T 
const& element 
: array
) { 
  23                 CHECK(element
.i 
== 3); 
  27 T_DECL(for_loop
, "bounded_array.for_loop") {