SegFault_gcc4.6
      
      
        
          | Last change
 on this file since 15c75f8 was             56f73b, checked in by Frederik Heber <heber@…>, 15 years ago | 
        
          | 
Added config.h also to all header files, code check test ascertain this in the future.
 as we want to use config.h to pass stuff such as MEMDEBUG, NDEBUG,
LOG_OBSERVER, we have to make sure that it is present in each and every
file.
split up CodeChecks/testsuite.at: each test has its own .at file.
 | 
        
          | 
              
Property                 mode
 set to                 100644 | 
        
          | File size:
            822 bytes | 
      
      
| Line |  | 
|---|
| 1 | /* | 
|---|
| 2 | * AtomsCalculationUnitTest.hpp | 
|---|
| 3 | * | 
|---|
| 4 | *  Created on: Feb 19, 2010 | 
|---|
| 5 | *      Author: crueger | 
|---|
| 6 | */ | 
|---|
| 7 |  | 
|---|
| 8 | #ifndef ATOMSCALCULATIONUNITTEST_HPP_ | 
|---|
| 9 | #define ATOMSCALCULATIONUNITTEST_HPP_ | 
|---|
| 10 |  | 
|---|
| 11 | // include config.h | 
|---|
| 12 | #ifdef HAVE_CONFIG_H | 
|---|
| 13 | #include <config.h> | 
|---|
| 14 | #endif | 
|---|
| 15 |  | 
|---|
| 16 |  | 
|---|
| 17 | #include <cppunit/extensions/HelperMacros.h> | 
|---|
| 18 |  | 
|---|
| 19 | // we prefer enum over define | 
|---|
| 20 | enum { ATOM_COUNT = 10 }; | 
|---|
| 21 |  | 
|---|
| 22 | #include "types.hpp" | 
|---|
| 23 |  | 
|---|
| 24 | class atom; | 
|---|
| 25 |  | 
|---|
| 26 | class AtomsCalculationTest :  public CppUnit::TestFixture | 
|---|
| 27 | { | 
|---|
| 28 | CPPUNIT_TEST_SUITE( AtomsCalculationTest ); | 
|---|
| 29 | CPPUNIT_TEST ( testCalculateSimple ); | 
|---|
| 30 | CPPUNIT_TEST ( testCalculateExcluded ); | 
|---|
| 31 | CPPUNIT_TEST_SUITE_END(); | 
|---|
| 32 |  | 
|---|
| 33 | public: | 
|---|
| 34 | void setUp(); | 
|---|
| 35 | void tearDown(); | 
|---|
| 36 |  | 
|---|
| 37 | void testCalculateSimple(); | 
|---|
| 38 | void testCalculateExcluded(); | 
|---|
| 39 |  | 
|---|
| 40 | private: | 
|---|
| 41 | atom *atoms [ATOM_COUNT]; | 
|---|
| 42 | atomId_t atomIds [ATOM_COUNT]; | 
|---|
| 43 | }; | 
|---|
| 44 |  | 
|---|
| 45 | #endif /* ATOMSCALCULATIONUNITTEST_HPP_ */ | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.