LTP GCOV extension - code coverage report
Current view: directory - src/test_libraries - DemoCases.c
Test: min.info
Date: 2009-06-18 Instrumented lines: 9
Code covered: 100.0 % Executed lines: 9

       1                 : /*
       2                 :  * This file is part of MIN Test Framework. Copyright © 2008 Nokia Corporation
       3                 :  * and/or its subsidiary(-ies).
       4                 :  * Contact: Sampo Saaristo
       5                 :  * Contact e-mail: DG.MIN-Support@nokia.com
       6                 :  * 
       7                 :  * This program is free software: you can redistribute it and/or modify it 
       8                 :  * under the terms of the GNU General Public License as published by the Free 
       9                 :  * Software Foundation, version 2 of the License. 
      10                 :  * 
      11                 :  * This program is distributed in the hope that it will be useful, but WITHOUT 
      12                 :  * ANY WARRANTY; without even the implied warranty of  MERCHANTABILITY or 
      13                 :  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General  Public License for
      14                 :  * more details. You should have received a copy of the GNU General Public 
      15                 :  * License along with this program. If not,  see 
      16                 :  * <http://www.gnu.org/licenses/>.
      17                 :  */
      18                 : 
      19                 : 
      20                 : /**
      21                 :  * GLOBAL VARIABLES SECTION
      22                 :  */
      23                 : #ifdef TEST_VAR_DECLARATIONS
      24                 :         /**
      25                 :          * Example of variable common for some test cases
      26                 :          */
      27                 : 
      28                 : #endif                          /* TEST_VAR_DECLARATIONS */
      29                 : /**
      30                 :  * END OF GLOBAL VARIABLES SECTION
      31                 :  */
      32                 : 
      33                 : 
      34                 : /**
      35                 :  * TEST CASES SECTION
      36                 :  */
      37                 : #ifdef TEST_CASES
      38                 : /**
      39                 :  * MIN_SETUP defines activities needed before every test case.
      40                 :  */
      41             407 : MIN_SETUP {
      42              25 :         MIN_INFO ("UNIT Demo SETUP\n");
      43                 : }
      44                 : 
      45                 : /**
      46                 :  * MIN_TEARDOWN defines activities needed after every test case
      47                 :  */
      48             407 : MIN_TEARDOWN {
      49              25 :         MIN_INFO ("UNIT Demo TEARDOWN\n");
      50                 : }
      51                 : 
      52                 : /**
      53                 :  * MIN_TESTDEFINE defines a test case
      54                 :  *
      55                 :  */
      56             407 : MIN_TESTDEFINE (Demo_1)
      57                 : {
      58                 : 
      59              14 :         tm_printf (0, "", "this is from the Demo module");
      60                 :         MIN_ASSERT_NOT_EQUALS (0, 1);
      61                 : }
      62                 : 
      63                 : /*
      64                 : ** This one fails
      65                 : */
      66             407 : MIN_TESTDEFINE (Demo_2)
      67                 : {
      68              11 :         sleep (5);
      69              11 :         tm_printf (0, "", "This is from the case Demo_2");
      70                 :         MIN_ASSERT_EQUALS (0, 0);
      71                 : }
      72                 : 
      73                 : #endif
      74                 : /**
      75                 :  * END OF TEST CASES SECTION
      76                 :  */

Generated by: LTP GCOV extension version 1.6