Last change
on this file since 25a549 was 06f141, checked in by Frederik Heber <heber@…>, 15 years ago |
"-e <db path>" not necessary anymore.
Removed necessity of specifying path to databases (this was one check of molecuilder/test/testsuite.at which cannot be fulfilled anymore with boost::program_options)
For this to work a great number of small changes have been necessary:
class periodentafel:
- all .db files merged into const char * arrays in elements_db.cpp
- periodentafel rewritten:
- FindElement(), AskElement() and EnterElement return element * const instead of const element * (i.e. the contents of the pointer is const (the element) not the pointer itself which is very vexatious (i.e. FindElement() yields const element * which can subsequently not be used for RemoveElement(), ...)
- parsedElems is not needed anymore. Instead we operate on map elements directly
- new unittest periodentafelTest which is made friend of periodentafel to be able to access private loading functions directly
A number of unit tests had to be changed (all that create elements during setUp() which is now unnecessary)
Some of the analysis_bonds function's signatures were changed in the process:
Finally, the respective tests are removed from molecuilder/tests/testsuite.at.
|
-
Property mode
set to
100644
|
File size:
1020 bytes
|
Line | |
---|
1 | /*
|
---|
2 | * bondgraphunittest.hpp
|
---|
3 | *
|
---|
4 | * Created on: Oct 29, 2009
|
---|
5 | * Author: heber
|
---|
6 | */
|
---|
7 |
|
---|
8 | #ifndef BONDGRAPHUNITTEST_HPP_
|
---|
9 | #define BONDGRAPHUNITTEST_HPP_
|
---|
10 |
|
---|
11 | #include <cppunit/extensions/HelperMacros.h>
|
---|
12 |
|
---|
13 |
|
---|
14 | class BondGraph;
|
---|
15 | class element;
|
---|
16 | class molecule;
|
---|
17 | class periodentafel;
|
---|
18 |
|
---|
19 | /********************************************** Test classes **************************************/
|
---|
20 |
|
---|
21 | class BondGraphTest : public CppUnit::TestFixture
|
---|
22 | {
|
---|
23 | CPPUNIT_TEST_SUITE( BondGraphTest) ;
|
---|
24 | CPPUNIT_TEST ( LoadTableTest );
|
---|
25 | CPPUNIT_TEST ( ConstructGraphFromTableTest );
|
---|
26 | CPPUNIT_TEST ( ConstructGraphFromCovalentRadiiTest );
|
---|
27 | CPPUNIT_TEST_SUITE_END();
|
---|
28 |
|
---|
29 | public:
|
---|
30 | void setUp();
|
---|
31 | void tearDown();
|
---|
32 | void LoadTableTest();
|
---|
33 | void ConstructGraphFromTableTest();
|
---|
34 | void ConstructGraphFromCovalentRadiiTest();
|
---|
35 |
|
---|
36 | private:
|
---|
37 |
|
---|
38 | molecule *TestMolecule;
|
---|
39 | const element *hydrogen;
|
---|
40 | const element *carbon;
|
---|
41 |
|
---|
42 | BondGraph *BG;
|
---|
43 | string *filename;
|
---|
44 | string *dummyname;
|
---|
45 | };
|
---|
46 |
|
---|
47 | #endif /* BONDGRAPHUNITTEST_HPP_ */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.