LCOV - code coverage report
Current view: top level - source/tests - TestOntRegistry.cpp (source / functions) Hit Total Coverage
Test: LibForBES Unit Tests Lines: 22 22 100.0 %
Date: 2016-04-18 Functions: 8 8 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :  * File:   TestOntRegistry.cpp
       3             :  * Author: chung
       4             :  *
       5             :  * Created on Oct 29, 2015, 1:28:41 AM
       6             :  */
       7             : 
       8             : #include "TestOntRegistry.h"
       9             : #include "FunctionOntologicalClass.h"
      10             : #include "FunctionOntologyRegistry.h"
      11             : 
      12             : 
      13           1 : CPPUNIT_TEST_SUITE_REGISTRATION(TestOntRegistry);
      14             : 
      15           1 : TestOntRegistry::TestOntRegistry() {
      16           1 : }
      17             : 
      18           2 : TestOntRegistry::~TestOntRegistry() {
      19           2 : }
      20             : 
      21           1 : void TestOntRegistry::setUp() {
      22           1 : }
      23             : 
      24           1 : void TestOntRegistry::tearDown() {
      25           1 : }
      26             : 
      27           1 : void TestOntRegistry::testOntologyRegistry() {
      28           1 :     FunctionOntologicalClass myfun = FunctionOntologyRegistry::function();
      29           1 :     _ASSERT_NOT(myfun.defines_f());
      30           1 :     _ASSERT_NOT(myfun.defines_conjugate());
      31           1 :     _ASSERT_NOT(myfun.defines_grad());
      32           1 :     _ASSERT_NOT(myfun.defines_prox());
      33           1 :     _ASSERT_EQ(string("Function"), myfun.getName());
      34           2 :     list<FunctionOntologicalClass> superClasses = myfun.getSuperclasses();
      35           1 :     _ASSERT(superClasses.empty());
      36             :     
      37           1 :     myfun = FunctionOntologyRegistry::distance();
      38           1 :     superClasses = myfun.getSuperclasses();
      39           2 :     _ASSERT_NOT(superClasses.empty());
      40             :     
      41           4 : }
      42             : 

Generated by: LCOV version 1.10