CTC++ Coverage Report - Untested Code

Directory Summary | Files Summary | Functions Summary | Untested Code | Execution Profile
To files: Index | No Index


File: .\calc.c
Instrumentation mode: multicondition   Reduced to: MC/DC coverage
TER: 63 % (10/16) structural, 82 % (9/11) statement

Hits/True False -Line Source

 
  FUNCTION is_prime()
  -8     MC/DC (cond 1): 1 - 4
  -8     MC/DC (cond 3): 3 - 4
-12   for (;divisor < val / 2;)
-14     if (val % divisor == 0)
 -15       return 0
***TER 63% (10/16) of SOURCE FILE calc.c
82% (9/11) statement

File: .\io.c
Instrumentation mode: multicondition   Reduced to: MC/DC coverage
TER: 83 % (5/6) structural, 86 % (6/7) statement

Hits/True False -Line Source

 
  FUNCTION io_ask()
-11   if (( amount = scanf ( "%u" , & val ) ) <= 0)
***TER 83% (5/6) of SOURCE FILE io.c
86% (6/7) statement

File: f:\ctcwork\demos\cube\cube.cpp
Instrumentation mode: multicondition   Reduced to: MC/DC coverage
TER: 95 % (19/20) structural, 96 % (24/25) statement

Hits/True False -Line Source

 
  55 FUNCTION CCubeApp::InitInstance()
-78   if (m_lpCmdLine [ 0 ] != '\0')
***TER 95% (19/20) of SOURCE FILE cube.cpp
96% (24/25) statement

File: f:\ctcwork\demos\cube\cubedoc.cpp
Instrumentation mode: multicondition   Reduced to: MC/DC coverage
TER: 72 % (21/29) structural, 75 % (15/20) statement

Hits/True False -Line Source

 
  47 FUNCTION CCubeDoc::OnNewDocument()
-49   if (! CDocument::OnNewDocument ( ))
 -50     return 0
 
 -61 FUNCTION CCubeDoc::Serialize()
-63   if (ar . IsStoring ( ))
 -71 }
 
 -82 FUNCTION CCubeDoc::Dump()
 -85 }
***TER 72% (21/29) of SOURCE FILE cubedoc.cpp
75% (15/20) statement

File: f:\ctcwork\demos\cube\cubeview.cpp
Instrumentation mode: multicondition   Reduced to: MC/DC coverage
TER: 63 % (67/107) structural, 79 % (155/196) statement

Hits/True False -Line Source

 
 -123 FUNCTION CCubeView::Dump()
 -126 }
 
  161 FUNCTION CCubeView::OnCreate()
-163   if (CView::OnCreate ( lpCreateStruct ) == - 1)
 -164     return - 1
 
  171 FUNCTION CCubeView::OnDestroy()
-181   if (hrc)
-184   if (m_pOldPalette)
-187   if (m_pDC)
 
  193 FUNCTION CCubeView::OnSize()
  -201       MC/DC (cond 1): 1 - 3
 
  228 FUNCTION CCubeView::Init()
-240   if (! bSetupPixelFormat ( ))
 -241     return
-255   if (m_oldRect . bottom)
 
  270 FUNCTION CCubeView::bSetupPixelFormat()
-295   if (( pixelformat = ChoosePixelFormat ( m_pDC -> GetSafeHdc ( ) , & pfd ) ) == 0)
 -298     return 0
-301   if (SetPixelFormat ( m_pDC -> GetSafeHdc ( ) , pixelformat , & pfd ) == 0)
 -304     return 0
 
 -310 FUNCTION CCubeView::ComponentFromIndex()
 -318   case 1:
 -320     return oneto8 [ val ]
 -321   case 2:
 -323     return twoto8 [ val ]
 -324   case 3:
 -326     return threeto8 [ val ]
 -328   default:
 -329     return 0
 
  334 FUNCTION CCubeView::CreateRGBPalette()
-343   if (pfd . dwFlags & 0x00000080)
-352     for (;i < n;)
-367     if (( pfd . cColorBits == 8 ) && ( pfd . cRedBits == 3 ) && ( pfd . cRedShift == 0 ) && ( pfd . cGreenBits == 3 ) && ( pfd . cGreenShift == 3 ) && ( pfd . cBlueBits == 2 ) && ( pfd . cBlueShift == 6 ))
  -367       MC/DC (cond 1): 1 - 8
  -367       MC/DC (cond 2): 1 - 7
  -367       MC/DC (cond 3): 1 - 6
  -367       MC/DC (cond 4): 1 - 5
  -367       MC/DC (cond 5): 1 - 4
  -367       MC/DC (cond 6): 1 - 3
  -367       MC/DC (cond 7): 1 - 2
-370       for (;i <= 12;)
 
625   383 FUNCTION CCubeView::DrawScene()
625 -390   if (bBusy)
 -391     return
***TER 63% (67/107) of SOURCE FILE cubeview.cpp
79% (155/196) statement

File: f:\ctcwork\demos\cube\mainfrm.cpp
Instrumentation mode: multicondition   Reduced to: MC/DC coverage
TER: 59 % (24/41) structural, 56 % (22/39) statement

Hits/True False -Line Source

 
  61 FUNCTION CMainFrame::OnCreate()
-63   if (CFrameWnd::OnCreate ( lpCreateStruct ) == - 1)
 -64     return - 1
-69   if (! m_wndToolBar . Create ( this ) || ! m_wndToolBar . LoadBitmapA ( 128 ) || ! m_wndToolBar . SetButtons ( buttons , sizeof ( buttons ) / sizeof ( UINT ) ))
  -69     MC/DC (cond 1): 1 - 4
  -69     MC/DC (cond 2): 2 - 4
  -69     MC/DC (cond 3): 3 - 4
 -72     return - 1
 
 -97 FUNCTION CMainFrame::Dump()
 -100 }
 
 -107 FUNCTION CMainFrame::OnPaletteChanged()
-111   if (pFocusWnd != this)
 -113 }
 
 -115 FUNCTION CMainFrame::OnQueryNewPalette()
-127   if (i > 0)
 -131   return CFrameWnd::OnQueryNewPalette ( )
***TER 59% (24/41) of SOURCE FILE mainfrm.cpp
56% (22/39) statement

Directory Summary | Files Summary | Functions Summary | Untested Code | Execution Profile
To files: Index | No Index