Candidate_v1.7.0
        stable
      
      
        
          | Last change
 on this file since e9f307 was             7b4e67, checked in by Frederik Heber <frederik.heber@…>, 8 years ago | 
        
          | 
Added failing weights test case to BondVectors.
 | 
        
          | 
              
Property                 mode
 set to                 100644 | 
        
          | File size:
            1.5 KB | 
      
      
| Line |  | 
|---|
| 1 | /* | 
|---|
| 2 | * BondVectorsUnitTest.hpp | 
|---|
| 3 | * | 
|---|
| 4 | *  Created on: Jun 29, 2017 | 
|---|
| 5 | *      Author: heber | 
|---|
| 6 | */ | 
|---|
| 7 |  | 
|---|
| 8 | #ifndef BONDVECTORSUNITTEST_HPP_ | 
|---|
| 9 | #define BONDVECTORSUNITTEST_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 | #include <vector> | 
|---|
| 20 |  | 
|---|
| 21 | #include "Bond/bond.hpp" | 
|---|
| 22 |  | 
|---|
| 23 | class atom; | 
|---|
| 24 | class BondVectors; | 
|---|
| 25 | class element; | 
|---|
| 26 |  | 
|---|
| 27 | /********************************************** Test classes **************************************/ | 
|---|
| 28 |  | 
|---|
| 29 | class BondVectorsTest : public CppUnit::TestFixture | 
|---|
| 30 | { | 
|---|
| 31 | CPPUNIT_TEST_SUITE( BondVectorsTest) ; | 
|---|
| 32 | CPPUNIT_TEST ( current_mappedTest ); | 
|---|
| 33 | CPPUNIT_TEST ( weights_singlebondTest ); | 
|---|
| 34 | CPPUNIT_TEST ( weights_linearchainTest ); | 
|---|
| 35 | CPPUNIT_TEST ( weights_rightangleTest ); | 
|---|
| 36 | CPPUNIT_TEST ( weights_triangleTest ); | 
|---|
| 37 | CPPUNIT_TEST ( weights_complexTest ); | 
|---|
| 38 | CPPUNIT_TEST_SUITE_END(); | 
|---|
| 39 |  | 
|---|
| 40 | public: | 
|---|
| 41 | void setUp(); | 
|---|
| 42 | void tearDown(); | 
|---|
| 43 | void current_mappedTest(); | 
|---|
| 44 | void weights_singlebondTest(); | 
|---|
| 45 | void weights_linearchainTest(); | 
|---|
| 46 | void weights_rightangleTest(); | 
|---|
| 47 | void weights_triangleTest(); | 
|---|
| 48 | void weights_complexTest(); | 
|---|
| 49 |  | 
|---|
| 50 | private: | 
|---|
| 51 | enum atomPositions | 
|---|
| 52 | { | 
|---|
| 53 | left, | 
|---|
| 54 | center, | 
|---|
| 55 | right, | 
|---|
| 56 | top, | 
|---|
| 57 | topright, | 
|---|
| 58 | bottom, | 
|---|
| 59 | bottomright | 
|---|
| 60 | }; | 
|---|
| 61 |  | 
|---|
| 62 | BondVectors *bv; | 
|---|
| 63 | std::vector<atom *> atoms; | 
|---|
| 64 | std::vector<atom *> atomvector; | 
|---|
| 65 | std::vector<bond::ptr> bondvector; | 
|---|
| 66 | atom * _atom; | 
|---|
| 67 | bond * _bond; | 
|---|
| 68 | const element * carbon; | 
|---|
| 69 | }; | 
|---|
| 70 |  | 
|---|
| 71 | #endif /* BONDVECTORSUNITTEST_HPP_ */ | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.