sl@0: /*********************************************************************************** sl@0: test_assign_op.h sl@0: sl@0: SUMMARY: Test functor template for assignment operators. 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_assign_op_H_ sl@0: #define test_assign_op_H_ sl@0: sl@0: #include "Prefix.h" sl@0: #ifdef EH_NEW_HEADERS sl@0: # include sl@0: #else sl@0: # include sl@0: #endif sl@0: #include "nc_alloc.h" sl@0: sl@0: template sl@0: struct test_assign_op { sl@0: test_assign_op( const T& src ) sl@0: : source(src) { sl@0: gTestController.SetCurrentTestName("assignment operator"); sl@0: } sl@0: sl@0: void operator()( T& t ) const { sl@0: t = source; sl@0: sl@0: // Prevent simulated failures during verification sl@0: gTestController.CancelFailureCountdown(); sl@0: //EH_ASSERT( source == t ); sl@0: } sl@0: private: sl@0: const T& source; sl@0: }; sl@0: sl@0: #endif // test_assign_op_H_