1 | /*
|
---|
2 | * Project: MoleCuilder
|
---|
3 | * Description: creates and alters molecular systems
|
---|
4 | * Copyright (C) 2010 University of Bonn. All rights reserved.
|
---|
5 | * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
|
---|
6 | */
|
---|
7 |
|
---|
8 | /*
|
---|
9 | * InfoUnitTest.cpp
|
---|
10 | *
|
---|
11 | * Created on: Nov 25, 2009
|
---|
12 | * Author: heber
|
---|
13 | */
|
---|
14 |
|
---|
15 | // include config.h
|
---|
16 | #ifdef HAVE_CONFIG_H
|
---|
17 | #include <config.h>
|
---|
18 | #endif
|
---|
19 |
|
---|
20 | using namespace std;
|
---|
21 |
|
---|
22 | #include <cppunit/CompilerOutputter.h>
|
---|
23 | #include <cppunit/extensions/TestFactoryRegistry.h>
|
---|
24 | #include <cppunit/ui/text/TestRunner.h>
|
---|
25 |
|
---|
26 | #include "MenuDescriptionUnitTest.hpp"
|
---|
27 |
|
---|
28 | #ifdef HAVE_TESTRUNNER
|
---|
29 | #include "UnitTestMain.hpp"
|
---|
30 | #endif /*HAVE_TESTRUNNER*/
|
---|
31 |
|
---|
32 | /********************************************** Test classes **************************************/
|
---|
33 |
|
---|
34 | // Registers the fixture into the 'registry'
|
---|
35 | CPPUNIT_TEST_SUITE_REGISTRATION( MenuDescriptionTest );
|
---|
36 |
|
---|
37 |
|
---|
38 | void MenuDescriptionTest::setUp()
|
---|
39 | {
|
---|
40 | };
|
---|
41 |
|
---|
42 |
|
---|
43 | void MenuDescriptionTest::tearDown()
|
---|
44 | {
|
---|
45 | };
|
---|
46 |
|
---|
47 | /** UnitTest for SensibilityTest().
|
---|
48 | */
|
---|
49 | void MenuDescriptionTest::SensibilityTest()
|
---|
50 | {
|
---|
51 | // from MenuSet
|
---|
52 | for(MenuDescription::const_iterator iter = md.MenuSet.begin(); iter != md.MenuSet.end(); ++iter) {
|
---|
53 | CPPUNIT_ASSERT_MESSAGE( "menu token not contained in MenuDescription::MenuDewscriptionsMap", md.MenuDescriptionsMap.find(*iter) != md.MenuDescriptionsMap.end());
|
---|
54 | CPPUNIT_ASSERT_MESSAGE( "menu token not contained in MenuDescription::MenuNameMap", md.MenuNameMap.find(*iter) != md.MenuNameMap.end());
|
---|
55 | }
|
---|
56 |
|
---|
57 | // from MenuDescriptionsMap
|
---|
58 | for(std::map<std::string, std::string>::const_iterator iter = md.MenuDescriptionsMap.begin(); iter != md.MenuDescriptionsMap.end(); ++iter) {
|
---|
59 | CPPUNIT_ASSERT_MESSAGE( "menu token not contained in MenuDescription::MenuSet", md.MenuSet.find(iter->first) != md.MenuSet.end());
|
---|
60 | CPPUNIT_ASSERT_MESSAGE( "menu token not contained in MenuDescription::MenuNameMap", md.MenuNameMap.find(iter->first) != md.MenuNameMap.end());
|
---|
61 | }
|
---|
62 |
|
---|
63 | // from MenuNameMap
|
---|
64 | for(std::map<std::string, std::string>::const_iterator iter = md.MenuNameMap.begin(); iter != md.MenuNameMap.end(); ++iter) {
|
---|
65 | CPPUNIT_ASSERT_MESSAGE( "menu token not contained in MenuDescription::MenuDewscriptionsMap", md.MenuDescriptionsMap.find(iter->first) != md.MenuDescriptionsMap.end());
|
---|
66 | CPPUNIT_ASSERT_MESSAGE( "menu token not contained in MenuDescription::MenuSet", md.MenuSet.find(iter->first) != md.MenuSet.end());
|
---|
67 | }
|
---|
68 |
|
---|
69 | };
|
---|