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

          Line data    Source code
       1             : /*
       2             :  * File:   TestMatrixExtras.h
       3             :  * Author: Pantelis Sopasakis
       4             :  *
       5             :  * Created on Nov 8, 2015, 4:33:45 PM
       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             : #ifndef TESTMATRIXEXTRAS_H
      22             : #define TESTMATRIXEXTRAS_H
      23             : 
      24             : #define FORBES_TEST_UTILS
      25             : 
      26             : #include <cppunit/extensions/HelperMacros.h>
      27             : 
      28             : class TestMatrixExtras : public CPPUNIT_NS::TestFixture {
      29           2 :     CPPUNIT_TEST_SUITE(TestMatrixExtras);
      30             :     
      31           1 :     CPPUNIT_TEST(test_add_wrong_args);
      32           1 :     CPPUNIT_TEST(test_mult_wrong_args);
      33             : 
      34             :     /* ADDITION */
      35           1 :     CPPUNIT_TEST(test_add_DD);
      36           1 :     CPPUNIT_TEST(test_add_DDT);
      37           1 :     CPPUNIT_TEST(test_add_DTD);
      38           1 :     CPPUNIT_TEST(test_add_DTDT);
      39             :     
      40           1 :     CPPUNIT_TEST(test_add_DS);
      41           1 :     CPPUNIT_TEST(test_add_DX);
      42           1 :     CPPUNIT_TEST(test_add_DST);
      43             :     
      44           1 :     CPPUNIT_TEST(test_add_SS);
      45           1 :     CPPUNIT_TEST(test_add_SST);
      46           1 :     CPPUNIT_TEST(test_add_STS);
      47           1 :     CPPUNIT_TEST(test_add_STST);
      48             :     
      49             :     
      50             :     
      51             :     /* MULTIPLICATION */    
      52           1 :     CPPUNIT_TEST(test_mult_DD);
      53           1 :     CPPUNIT_TEST(test_mult_DDT);
      54           1 :     CPPUNIT_TEST(test_mult_DX);
      55           1 :     CPPUNIT_TEST(test_mult_DH);
      56             :     
      57           1 :     CPPUNIT_TEST(test_mult_SS);
      58           1 :     CPPUNIT_TEST(test_mult_SST);
      59           1 :     CPPUNIT_TEST(test_mult_SS2);
      60           1 :     CPPUNIT_TEST(test_mult_SS3);
      61             :     
      62           1 :     CPPUNIT_TEST(test_mult_SX);
      63             :     
      64           1 :     CPPUNIT_TEST(test_mult_Hv);
      65             : 
      66           5 :     CPPUNIT_TEST_SUITE_END();
      67             : 
      68             : public:
      69             :     TestMatrixExtras();
      70             :     virtual ~TestMatrixExtras();
      71             :     void setUp();
      72             :     void tearDown();
      73             : 
      74             : private:
      75             :     void test_add_wrong_args();
      76             :     void test_mult_wrong_args();
      77             :     
      78             :     // dense with dense: fully tested!
      79             :     void test_add_DD(); 
      80             :     void test_add_DDT();
      81             :     void test_add_DTD();
      82             :     void test_add_DTDT();
      83             :     
      84             :     void test_add_DS();
      85             :     void test_add_DX();
      86             :     void test_add_DST();
      87             :     
      88             :     // sparse with sparse: fully tested!
      89             :     void test_add_SS();
      90             :     void test_add_SST();
      91             :     void test_add_STS();
      92             :     void test_add_STST();
      93             :     
      94             :     
      95             :     
      96             :     void test_mult_DD();
      97             :     void test_mult_DDT();
      98             :     void test_mult_DX();
      99             :     void test_mult_DH();
     100             :     
     101             :     void test_mult_SS();
     102             :     void test_mult_SST();
     103             :     void test_mult_SS2();
     104             :     void test_mult_SS3();
     105             :     
     106             :     void test_mult_SX();
     107             :     void test_mult_Hv();
     108             : };
     109             : 
     110             : #endif  /* TESTMATRIXEXTRAS_H */
     111             : 

Generated by: LCOV version 1.10