Line data Source code
1 : /*
2 : * File: TestFunctionOntologicalClass.cpp
3 : * Author: Pantelis Sopasakis
4 : *
5 : * Created on Nov 2, 2015, 12:11:07 AM
6 : *
7 : * ForBES is free software: you can redistribute it and/or modify
8 : * it under the terms of the GNU Lesser General Public License as published by
9 : * the Free Software Foundation, either version 3 of the License, or
10 : * (at your option) any later version.
11 : *
12 : * ForBES is distributed in the hope that it will be useful,
13 : * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 : * GNU Lesser General Public License for more details.
16 : *
17 : * You should have received a copy of the GNU Lesser General Public License
18 : * along with ForBES. If not, see <http://www.gnu.org/licenses/>.
19 : */
20 :
21 : #include "TestFunctionOntologicalClass.h"
22 : #include "FunctionOntologicalClass.h"
23 : #include "ForBES.h"
24 :
25 :
26 1 : CPPUNIT_TEST_SUITE_REGISTRATION(TestFunctionOntologicalClass);
27 :
28 1 : TestFunctionOntologicalClass::TestFunctionOntologicalClass() {
29 1 : }
30 :
31 2 : TestFunctionOntologicalClass::~TestFunctionOntologicalClass() {
32 2 : }
33 :
34 1 : void TestFunctionOntologicalClass::setUp() {
35 1 : }
36 :
37 1 : void TestFunctionOntologicalClass::tearDown() {
38 1 : }
39 :
40 1 : void TestFunctionOntologicalClass::testFunctionOntologicalClass() {
41 1 : FunctionOntologicalClass ont("test");
42 1 : _ASSERT_EQ(string("test"), ont.getName());
43 1 : _ASSERT(ont.getSuperclasses().empty());
44 :
45 1 : _ASSERT_NOT(ont.defines_grad());
46 1 : ont.set_defines_grad(true);
47 1 : _ASSERT(ont.defines_grad());
48 :
49 1 : _ASSERT_NOT(ont.defines_f());
50 1 : ont.set_defines_f(true);
51 1 : _ASSERT(ont.defines_f());
52 :
53 1 : _ASSERT_NOT(ont.defines_conjugate());
54 1 : ont.set_defines_conjugate(true);
55 1 : _ASSERT(ont.defines_conjugate());
56 :
57 1 : _ASSERT_NOT(ont.defines_conjugate_grad());
58 1 : ont.set_defines_conjugate_grad(true);
59 1 : _ASSERT(ont.defines_conjugate_grad());
60 :
61 1 : _ASSERT_NOT(ont.defines_prox());
62 1 : ont.set_defines_prox(true);
63 1 : _ASSERT(ont.defines_prox());
64 :
65 4 : }
66 :
|