Lines Matching refs:dyn
29 void dyn_at_fail ( dynarray<T> &dyn, size_t sz ) {
30 try { dyn.at (sz); }
36 void dyn_at_fail_const ( const dynarray<T> &dyn, size_t sz ) {
37 try { dyn.at (sz); }
44 void dyn_test_const ( const dynarray<T> &dyn, const std::initializer_list<T> &vals ) {
45 const T *data = dyn.data ();
47 for ( size_t i = 0; i < dyn.size(); ++i, ++it ) {
48 assert ( data + i == &dyn.at(i));
49 assert ( *it == dyn.at(i));
52 dyn_at_fail_const ( dyn, dyn.size ());
53 dyn_at_fail_const ( dyn, 2*dyn.size ());
54 dyn_at_fail_const ( dyn, size_t (-1));
58 void dyn_test ( dynarray<T> &dyn, const std::initializer_list<T> &vals ) {
59 T *data = dyn.data ();
61 for ( size_t i = 0; i < dyn.size(); ++i, ++it ) {
62 assert ( data + i == &dyn.at(i));
63 assert ( *it == dyn.at(i));
66 dyn_at_fail ( dyn, dyn.size ());
67 dyn_at_fail ( dyn, 2*dyn.size ());
68 dyn_at_fail ( dyn, size_t (-1));