CTC++ Coverage Report- Execution Profile#1/7

Directory Summary | Files Summary | Functions Summary | Untested Code | Execution Profile
To files: First | Previous | Next | Last | Index | No Index


Source file:f:\ctcwork\Demos\cube\cube.cpp
Instrumentation mode:multicondition+inclusive_timingReduced to:MC/DC coverage
TER:95 % (19/20) structural,96 % (24/25) statement

Hits/TrueFalseLineSource
1// cube.cpp : Defines the class behaviors for the application.
2//
3// This is a part of the Microsoft Foundation Classes C++ library.
4// Copyright (c) Microsoft Corporation.  All rights reserved.
5//
6// This source code is only intended as a supplement to the
7// Microsoft Foundation Classes Reference and related
8// electronic documentation provided with the library.
9// See these sources for detailed information regarding the
10// Microsoft Foundation Classes product.
11
12#include "stdafx.h"
13#include "cube.h"
14
15#include "mainfrm.h"
16#include "cubedoc.h"
17#include "cubeview.h"
18
19#ifdef _DEBUG
20#undef THIS_FILE
21static char BASED_CODE THIS_FILE[] = __FILE__;
22#endif
23
24/////////////////////////////////////////////////////////////////////////////
25// CCubeApp
26
Top
82827BEGIN_MESSAGE_MAP(CCubeApp, CWinApp)
82827  return GetThisMessageMap ( )
27}
Top
82827FUNCTION CCubeApp::GetThisMessageMap()
28   //{{AFX_MSG_MAP(CCubeApp)
29   ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
30      // NOTE - the ClassWizard will add and remove mapping macros here.
31      //    DO NOT EDIT what you see in these blocks of generated code!
32   //}}AFX_MSG_MAP
33   // Standard file based document commands
34   ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
35   ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
82836END_MESSAGE_MAP()
36}
37
38/////////////////////////////////////////////////////////////////////////////
39// CCubeApp construction
40
Top
141CCubeApp::CCubeApp()
42{
43   // TODO: add construction code here,
44   // Place all significant initialization in InitInstance
145}
46
47/////////////////////////////////////////////////////////////////////////////
48// The one and only CCubeApp object
49
50CCubeApp theApp;
51
52/////////////////////////////////////////////////////////////////////////////
53// CCubeApp initialization
54
Top
155BOOL CCubeApp::InitInstance()
56{
57   // Standard initialization
58   // If you are not using these features and wish to reduce the size
59   //  of your final executable, you should remove from the following
60   //  the specific initialization routines you do not need.
61
62   LoadStdProfileSettings();  // Load standard INI file options (including MRU)
63
64   // Register the application's document templates.  Document templates
65   //  serve as the connection between documents, frame windows and views.
66
67   CSingleDocTemplate* pDocTemplate;
68   pDocTemplate = new CSingleDocTemplate(
69      IDR_MAINFRAME,
70      RUNTIME_CLASS(CCubeDoc),
71      RUNTIME_CLASS(CMainFrame),       // main SDI frame window
72      RUNTIME_CLASS(CCubeView));
73   AddDocTemplate(pDocTemplate);
74
75   // create a new (empty) document
76   OnFileNew();
77
0 178   if (m_lpCmdLine[0] != '\0')
79   {
80      // TODO: add command line processing here
81   }
82
183   return TRUE;
84}
85
86/////////////////////////////////////////////////////////////////////////////
87// CAboutDlg dialog used for App About
88
89class CAboutDlg : public CDialog
90{
91public:
92   CAboutDlg();
93
94// Dialog Data
95   //{{AFX_DATA(CAboutDlg)
96   enum { IDD = IDD_ABOUTBOX };
97   //}}AFX_DATA
98
99// Implementation
100protected:
101   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
102   //{{AFX_MSG(CAboutDlg)
103      // No message handlers
104   //}}AFX_MSG
105   DECLARE_MESSAGE_MAP()
106};
107
Top
2108CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
109{
110   //{{AFX_DATA_INIT(CAboutDlg)
111   //}}AFX_DATA_INIT
2112}
113
Top
4114void CAboutDlg::DoDataExchange(CDataExchange* pDX)
115{
116   CDialog::DoDataExchange(pDX);
117   //{{AFX_DATA_MAP(CAboutDlg)
118   //}}AFX_DATA_MAP
4119}
120
Top
567121BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
567121  return GetThisMessageMap ( )
121}
Top
567121FUNCTION CAboutDlg::GetThisMessageMap()
122   //{{AFX_MSG_MAP(CAboutDlg)
123      // No message handlers
124   //}}AFX_MSG_MAP
567125END_MESSAGE_MAP()
125}
126
127// App command to run the dialog
Top
2128void CCubeApp::OnAppAbout()
129{
130   CAboutDlg aboutDlg;
131   aboutDlg.DoModal();
2132}
133
134/////////////////////////////////////////////////////////////////////////////
135// CCubeApp commands
***TER95 % (19/20) of FILE cube.cpp
96 % (24/25) statement

Directory Summary | Files Summary | Functions Summary | Untested Code | Execution Profile
To files: First | Previous | Next | Last | Top | Index | No Index