sl@0: /*********************************************************************************** sl@0: test_push_front.h sl@0: sl@0: * Copyright (c) 1997 sl@0: * Mark of the Unicorn, Inc. sl@0: * sl@0: * Permission to use, copy, modify, distribute and sell this software sl@0: * and its documentation for any purpose is hereby granted without fee, sl@0: * provided that the above copyright notice appear in all copies and sl@0: * that both that copyright notice and this permission notice appear sl@0: * in supporting documentation. Mark of the Unicorn makes no sl@0: * representations about the suitability of this software for any sl@0: * purpose. It is provided "as is" without express or implied warranty. sl@0: sl@0: ***********************************************************************************/ sl@0: #ifndef test_push_front_H_ sl@0: #define test_push_front_H_ sl@0: sl@0: # if defined (EH_NEW_HEADERS) sl@0: # include sl@0: # else sl@0: # include sl@0: # endif sl@0: # include "Prefix.h" sl@0: sl@0: template sl@0: struct test_push_front sl@0: { sl@0: test_push_front( const C& orig ) : original( orig ) { sl@0: gTestController.SetCurrentTestName("push_front() method"); sl@0: } sl@0: sl@0: void operator()( C& c ) const sl@0: { sl@0: typedef typename C::value_type _value_type; sl@0: c.push_front( _value_type() ); sl@0: EH_ASSERT( c.size() == original.size() + 1 ); sl@0: typename C::const_iterator next = c.begin(); sl@0: sl@0: EH_ASSERT( EH_STD::equal( original.begin(), original.end(), ++next ) ); sl@0: } sl@0: private: sl@0: const C& original; sl@0: }; sl@0: sl@0: #endif // test_push_front_H_