ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

test_assign_op.h
Go to the documentation of this file.
00001 /***********************************************************************************
00002   test_assign_op.h
00003 
00004     SUMMARY: Test functor template for assignment operators.
00005 
00006  * Copyright (c) 1997
00007  * Mark of the Unicorn, Inc.
00008  *
00009  * Permission to use, copy, modify, distribute and sell this software
00010  * and its documentation for any purpose is hereby granted without fee,
00011  * provided that the above copyright notice appear in all copies and
00012  * that both that copyright notice and this permission notice appear
00013  * in supporting documentation.  Mark of the Unicorn makes no
00014  * representations about the suitability of this software for any
00015  * purpose.  It is provided "as is" without express or implied warranty.
00016 
00017 ***********************************************************************************/
00018 #ifndef test_assign_op_H_
00019 #define test_assign_op_H_
00020 
00021 #include "Prefix.h"
00022 #ifdef EH_NEW_HEADERS
00023 #  include <cassert>
00024 #else
00025 #  include <assert.h>
00026 #endif
00027 #include "nc_alloc.h"
00028 
00029 template <class T>
00030 struct test_assign_op {
00031   test_assign_op( const T& src )
00032     : source(src) {
00033     gTestController.SetCurrentTestName("assignment operator");
00034   }
00035 
00036   void operator()( T& t ) const {
00037     t = source;
00038 
00039     // Prevent simulated failures during verification
00040     gTestController.CancelFailureCountdown();
00041     //EH_ASSERT( source == t );
00042   }
00043 private:
00044   const T& source;
00045 };
00046 
00047 #endif // test_assign_op_H_

Generated on Sat May 26 2012 04:34:05 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.