ReactOS  0.4.13-dev-247-g0f29b3f
test_push_front.h
Go to the documentation of this file.
1 /***********************************************************************************
2  test_push_front.h
3 
4  * Copyright (c) 1997
5  * Mark of the Unicorn, Inc.
6  *
7  * Permission to use, copy, modify, distribute and sell this software
8  * and its documentation for any purpose is hereby granted without fee,
9  * provided that the above copyright notice appear in all copies and
10  * that both that copyright notice and this permission notice appear
11  * in supporting documentation. Mark of the Unicorn makes no
12  * representations about the suitability of this software for any
13  * purpose. It is provided "as is" without express or implied warranty.
14 
15 ***********************************************************************************/
16 #ifndef test_push_front_H_
17 #define test_push_front_H_
18 
19 # if defined (EH_NEW_HEADERS)
20 # include <cassert>
21 # else
22 # include <assert.h>
23 # endif
24 # include "Prefix.h"
25 
26 template <class C>
28 {
29  test_push_front( const C& orig ) : original( orig ) {
30  gTestController.SetCurrentTestName("push_front() method");
31  }
32 
33  void operator()( C& c ) const
34  {
35  typedef typename C::value_type _value_type;
36  c.push_front( _value_type() );
37  EH_ASSERT( c.size() == original.size() + 1 );
38  typename C::const_iterator next = c.begin();
39 
40  EH_ASSERT( EH_STD::equal( original.begin(), original.end(), ++next ) );
41  }
42 private:
43  const C& original;
44 };
45 
46 #endif // test_push_front_H_
TestController gTestController
Definition: nc_alloc.cpp:46
#define equal(x, y)
Definition: reader.cc:56
static void SetCurrentTestName(const char *str)
Definition: nc_alloc.h:172
const C & original
test_push_front(const C &orig)
const GLubyte * c
Definition: glext.h:8905
#define EH_ASSERT
Definition: Prefix.h:37
static unsigned __int64 next
Definition: rand_nt.c:6
Definition: ttei6.cpp:27
void operator()(C &c) const