ready to demo

master
Denes Matetelki 12 years ago
parent 5a137f1d75
commit d3c2f02816

Binary file not shown.

@ -4,6 +4,8 @@
\usepackage{fancyvrb}
\usepackage{color}
\usepackage{graphicx}
% \usepackage{wrapfig}
\usepackage{verbatim}
\usetheme{Darmstadt}
@ -16,12 +18,21 @@
\include{colordefs}
\makeatother
\begin{document}
%----------- slide --------------------------------------------------%
\begin{frame}
\titlepage
% \titlepage
\begin{titlepage}
\begin{center}
\includegraphics[height=3.3cm]{qr_cc_and_dod.png}
\end{center}
\end{titlepage}
% \end{center}
\end{frame}
%----------- slide --------------------------------------------------%
@ -35,24 +46,41 @@
\section{Definitions}
\subsection{Testing}
% \subsection{Testing}
\subsection{Legacy code}
%----------- slide --------------------------------------------------%
\begin{frame}{Testing}
\begin{frame}{Legacy code, unit test, functional test}
\begin{block}{Legacy code}
\small
% \small
"Code without tests is bad code. It doesn't matter how well written it is; it doesn't matter how pretty or object-oriented or well-encapsulated it is. With tests, we can change the behaviour of our code quickly and verifiably. Without them, we really don't know if our code is getting better or worse." \cite{legacy}
\end{block}
\end{frame}
%----------- slide --------------------------------------------------%
\subsection{Tests}
\begin{frame}{Legacy code, unit test, functional test}
% \subsection{Unit test}
\begin{block}{Unit Test (UT) - white box testing}
\small
"The goal of unit testing is to isolate each part of the program and show that the individual parts are correct. A unit test provides a strict, written contract that the piece of code must satisfy." \cite{ut}
% \small
"The goal of unit testing is to isolate each part of the program and show that the individual parts are correct. A unit test provides a strict, written \textcolor{red}{contract} \cite{dbc} that the piece of code must satisfy." \cite{ut}
\end{block}
% \subsection{Functional test}
\begin{block}{Functional Test (FT) - black box testing}
\small
% \small
"Bases its test cases on the specifications of the software component under test. Functions are tested by feeding them input and examining the output, and internal program structure is rarely considered." \cite{ft}
\end{block}
@ -60,33 +88,43 @@
%----------- slide --------------------------------------------------%
\begin{frame}{Testing}
\subsection{Definition of Done, Continuous Integration}
\begin{block}{Definition of Done (DoD)}
\begin{frame}{Definition of Done, Continuous Integration}
\begin{block}{Definition of Done - DoD}
\small
\begin{itemize}
\item "A checklist of valuable activities required to produce software." \cite{dod}
\item "Writing code, coding comments, unit testing, integration testing, release notes, design documents, etc"
\item "A checklist of valuable activities required to produce software." \cite{dod}
% "Writing code, coding comments, unit testing, integration testing, release notes, design documents, etc"
\item "Different DoD at various levels: feature, sprint, release."
\item Each team come up with their own DoD which is reviewed and updated as needed.
\item Example: unit tests cover >90% lines of the code
% \item Example: unit tests cover > 90\% lines of the code
\end{itemize}
\end{block}
\begin{block}{Continuous Integration (CI)}
% \subsection{Continuous Integration}
\begin{block}{Continuous Integration - CI}
\small
"Implements continuous processes of applying quality control - small pieces of effort, applied frequently." \cite{ci}
\begin{itemize}
\item Automate the build
\item Make the build self-testing
\item Everyone can see the results of the latest build
\item ...verifies DOD.
\item Automate the build.
\item Make the build self-testing.
% \item Everyone can see the results of the latest build.
\item ...verifies the DoD.
\end{itemize}
\end{block}
\end{frame}
\section{Code coverage}
\subsection{gcov and gprof}
%----------- slide --------------------------------------------------%
\begin{frame}{gcov and gprof}
@ -96,17 +134,20 @@
"gcov is a tool you can use in conjunction with GCC to test code coverage in your programs." \cite{gcov}
\begin{itemize}
\item how often each line of code executes
\item which lines of code are actually executed
\item How often each line of code executes.
\item Which lines of code are actually executed.
\end{itemize}
\end{block}
% \subsection{gprof}
\begin{block}{gprof}
\small
The GNU profiler. \cite{gprof}
\begin{itemize}
\item how much computing time each section of code uses.
\item How much computing time each section of code uses.
\item Can be used with gcov to locate costy algorithms.
\end{itemize}
\end{block}
@ -115,103 +156,112 @@ The GNU profiler. \cite{gprof}
%----------- slide --------------------------------------------------%
\begin{frame}{how gcov works}
\subsection{How gcov works}
\begin{frame}{How gcov works}
\begin{block}{how gcov works}
\begin{block}{gcno}
\small
\begin{itemize}
\item "The .gcno notes file is generated when the source file is compiled with the GCC -ftest-coverage option. It contains information to reconstruct the basic block graphs and assign source line numbers to blocks."
\item "The .gcda count data file is generated when a program containing object files built with the GCC -fprofile-arcs option is executed. A separate .gcda file is created for each object file compiled with this option. It contains arc transition counts, value profile counts, and some summary information."
\end{itemize}
"The .gcno notes file is generated when the source file is compiled with the GCC \textcolor{red}{-ftest-coverage} option. It contains information to reconstruct the basic block graphs and assign source line numbers to blocks."
\end{block}
\begin{block}{gcda}
\small
"The .gcda count data file is generated when a program containing object files built with the GCC \textcolor{red}{-fprofile-arcs} option is executed. A separate .gcda file is created for each object file compiled with this option. It contains arc transition counts, value profile counts, and some summary information."
\end{block}
\end{frame}
%----------- slide --------------------------------------------------%
\begin{frame}{example}
\subsection{Example}
\begin{block}{sample c code}
\small
\begin{frame}[fragile]{Example}
#include <stdio.h>
int main (void)
{
int i, total;
total = 0;
for (i = 0; i < 10; i++)
total += i;
if (total != 45)
printf ("Failure\n");
else
printf ("Success\n");
return 0;
}
$ gcc -fprofile-arcs -ftest-coverage tmp.c
$ a.out
gcov
$ gcov tmp.c
File 'tmp.c'
Lines executed:87.50% of 8
tmp.c:creating 'tmp.c.gcov'
$cat tmp.c.gcov
-: 0:Source:tmp.c
-: 0:Graph:tmp.gcno
-: 0:Data:tmp.gcda
-: 0:Runs:1
-: 0:Programs:1
-: 1:#include <stdio.h>
-: 2:
1: 3:int main (void)
-: 4:{
-: 5: int i, total;
-: 6:
1: 7: total = 0;
-: 8:
11: 9: for (i = 0; i < 10; i++)
10: 10: total += i;
-: 11:
1: 12: if (total != 45)
#####: 13: printf ("Failure\n");
-: 14: else
1: 15: printf ("Success\n");
1: 16: return 0;
-: 17:}
\end{block}
\begin{exampleblock}{compile and execute}
\tiny
\begin{Verbatim}[numbers=left,firstnumber=1,stepnumber=1]
gcc -fprofile-arcs -ftest-coverage tmp.c
./a.out
gcov tmp.c
\end{Verbatim}
\end{exampleblock}
\begin{columns}[t]
\column{1.5in}
\begin{exampleblock}{tmp.c}
\tiny
\begin{Verbatim}[commandchars=\\\{\},numbers=left,firstnumber=1,stepnumber=1]
\PY{c+cp}{\PYZsh{}}\PY{c+cp}{include \PYZlt{}stdio.h\PYZgt{}}
\PY{k+kt}{int} \PY{n+nf}{main} \PY{p}{(}\PY{k+kt}{void}\PY{p}{)}
\PY{p}{\PYZob{}}
\PY{k+kt}{int} \PY{n}{i}\PY{p}{,} \PY{n}{total}\PY{p}{;}
\PY{n}{total} \PY{o}{=} \PY{l+m+mi}{0}\PY{p}{;}
\PY{k}{for} \PY{p}{(}\PY{n}{i} \PY{o}{=} \PY{l+m+mi}{0}\PY{p}{;} \PY{n}{i} \PY{o}{\PYZlt{}} \PY{l+m+mi}{10}\PY{p}{;} \PY{n}{i}\PY{o}{+}\PY{o}{+}\PY{p}{)}
\PY{n}{total} \PY{o}{+}\PY{o}{=} \PY{n}{i}\PY{p}{;}
\PY{k}{if} \PY{p}{(}\PY{n}{total} \PY{o}{!}\PY{o}{=} \PY{l+m+mi}{45}\PY{p}{)}
\PY{n}{printf} \PY{p}{(}\PY{l+s}{"}\PY{l+s}{Failure}\PY{l+s+se}{\PYZbs{}n}\PY{l+s}{"}\PY{p}{)}\PY{p}{;}
\PY{k}{else}
\PY{n}{printf} \PY{p}{(}\PY{l+s}{"}\PY{l+s}{Success}\PY{l+s+se}{\PYZbs{}n}\PY{l+s}{"}\PY{p}{)}\PY{p}{;}
\PY{k}{return} \PY{l+m+mi}{0}\PY{p}{;}
\PY{p}{\PYZcb{}}
\end{Verbatim}
\end{exampleblock}
\column{2in}
\begin{exampleblock}{gcov output}
\tiny
\begin{Verbatim}[numbers=left,firstnumber=1,stepnumber=1]
-: 1:#include <stdio.h>
-: 2:
1: 3:int main (void)
-: 4:{
-: 5: int i, total;
1: 6: total = 0;
11: 7: for (i = 0; i < 10; i++)
10: 8: total += i;
-: 9:
1: 10: if (total != 45)
#####: 11: printf ("Failure\n");
-: 12: else
1: 13: printf ("Success\n");
1: 14: return 0;
-: 15:}
\end{Verbatim}
\end{exampleblock}
\end{columns}
\end{frame}
%----------- slide --------------------------------------------------%
\begin{frame}{how gcov works}
\begin{frame}{Notes and pitfalls}
\begin{block}{note}
\begin{block}{Note}
\small
\begin{itemize}
\item You can combine the results of many runs into one gcda data.
\item UTs' and FTs' results can be combined.
\item UTs' and FTs' results can be combined too.
\end{itemize}
\end{block}
\end{frame}
\begin{block}{note}
\begin{block}{Watch out}
\small
\begin{itemize}
\item "You should compile your code without optimization." - "optimizer can eliminate some simple code lines by combining them with other lines"
\item "You should compile your code without optimization."
\item "It works best with a programming style that uses only one statement per line."
\item "Inlineable functions can create unexpected line counts."
\end{itemize}
@ -221,93 +271,101 @@ $cat tmp.c.gcov
%----------- slide --------------------------------------------------%
\begin{frame}{lcov}
\subsection{lcov}
\begin{frame}[fragile]{lcov}
\begin{block}{lcov}
\small
"LCOV is a graphical front-end for GCC's coverage testing tool gcov. It collects gcov data for multiple source files and creates HTML pages containing the source code annotated with coverage information. It also adds overview pages for easy navigation within the file structure." \cite{lcov}
\end{block}
\end{frame}
\begin{block}{asdasd}
$ gcc -fprofile-arcs -ftest-coverage tmp.c
$ a.out
$ lcov --directory . --capture -o lcov.info
$ mkdir cov
$ genhtml --frames --legend --function-coverage --branch-coverage --highlight --demangle-cpp -o ./cov lcov.info
\end{block}
\begin{exampleblock}{compile and execute}
\tiny
\begin{Verbatim}[numbers=left,firstnumber=1,stepnumber=1]
gcc -fprofile-arcs -ftest-coverage tmp.c
./a.out
lcov --directory . --capture -o lcov.info
mkdir cov
genhtml lcov.info --frames -o ./cov
\end{Verbatim}
\end{exampleblock}
\end{frame}
%----------- slide --------------------------------------------------%
\begin{frame}{lcov picture 1}
\begin{frame}{lcov picture - overview}
\begin{center}
\includegraphics[height=5cm]{tmp.c_lcov_overview.png}
\includegraphics[height=3.6cm]{tmp_c_lcov_overview.png}
\end{center}
\end{frame}
%----------- slide --------------------------------------------------%
\begin{frame}{lcov picture 2}
\begin{frame}{lcov picture - source browser}
\begin{center}
\includegraphics[height=5cm]{tmp.c_lcov_source.png}
\includegraphics[height=5cm]{tmp_c_lcov_source.png}
\end{center}
\end{frame}
%----------- slide --------------------------------------------------%
\begin{frame}{lcov picture 2}
What we actually got:
\section{Final thoughts}
+ how often each line of code executes
+ what lines of code are actually executed
\subsection{What have we got actually}
But! Line testing is not funtionality testing
\begin{frame}{Final thoughts}
- UTs report code correctness.
- CC reports...UT correctness?
It's easy to write meaningless UTs to raise CC.
UTs should cover functionality.
Without understanding the UTs, all we can get from CC is:
\begin{block}{What have we got actually}
\small
\begin{itemize}
\item How often each line of code executes.
\item What are the untested parts.
\item Dead code detection.
\end{itemize}
\end{block}
+ Discovering untested parts.
+ Detecting dead code.
\begin{block}{Line testing != funtionality testing}
\small
\begin{itemize}
\item UTs report code correctness.
\item CC reports...UT correctness?
\end{itemize}
It's easy to write meaningless UTs to raise CC...it is not enough by itself.
\end{block}
\end{frame}
%----------- slide --------------------------------------------------%
\begin{frame}{final thoughs}
\subsection{CC and Dod}
\begin{frame}{Final thoughs}
\begin{block}{Testing}
\small
\begin{itemize}
\item FTs can be written by a "test team" which is sometimes the specification team.
% \item FTs can be written by a "test team" which is sometimes the specification team.
\item UTs can be written with Test Driven Development - TDD \cite{tdd}
\item Test and code writer better be a different person otherwise if the code writer misunderstood the requirement, he tests his false model.
\item Review tests, not just code.
\item Test code quality should meet the same level as code quality.
\item Test plan.
\item Test documentation.
\item Review tests, not just code. Test code quality should meet the same level as code quality.
\item Test plan and test documentation.
\end{itemize}
\end{block}
\begin{block}{Code coverage as a part of DoD}
\begin{block}{CC as a part of the DoD}
\small
\begin{itemize}
\item The team agrees on testing principles.
\item Code coverage can be >X%
\item This rule can be enforced by CI: build fails if CC<X%.
\item CC should be \textgreater X\%
\item This rule can be enforced by CI: build fails if CC \textless X\%.
\end{itemize}
\end{block}
@ -317,9 +375,8 @@ Without understanding the UTs, all we can get from CC is:
\begin{frame}{Links}
\begin{center}
\includegraphics[height=5cm]{qr_code.png}
\end{center}
% \begin{wrapfigure}{r}{2cm}
\tiny
@ -328,6 +385,9 @@ Without understanding the UTs, all we can get from CC is:
\bibitem{legacy}
Michael C. Feathers, \emph{Working Effectively with Legacy Code} Prentice Hall, 2004 ISBN 0-13-117705-2
\bibitem{dbc}
\url{http://en.wikipedia.org/wiki/Design_by_contract}
\bibitem{ut}
Kolawa, Adam; Huizinga, Dorota (2007). \emph{Automated Defect Prevention: Best Practices in Software Management} Wiley-IEEE Computer Society Press. p. 426. ISBN 0-470-04212-5.
@ -335,26 +395,53 @@ Kolawa, Adam; Huizinga, Dorota (2007). \emph{Automated Defect Prevention: Best P
Kaner, Falk, Nguyen. \emph{Testing Computer Software} Wiley Computer Publishing, 1999, p. 42. ISBN 0-471-35846-0.
\bibitem{dod}
http://www.scrumalliance.org/articles/105-what-is-definition-of-done-dod
\url{http://www.scrumalliance.org/articles/105-what-is-definition-of-done-dod}
\bibitem{ci}
http://en.wikipedia.org/wiki/Continuous_integration
\url{http://en.wikipedia.org/wiki/Continuous_integration}
\bibitem{gcov}
http://gcc.gnu.org/onlinedocs/gcc/Gcov.html
\url{http://gcc.gnu.org/onlinedocs/gcc/Gcov.html}
\bibitem{gprof}
http://www.cs.utah.edu/dept/old/texinfo/as/gprof_toc.html
\url{http://www.cs.utah.edu/dept/old/texinfo/as/gprof_toc.html}
\bibitem{lcov}
http://ltp.sourceforge.net/coverage/lcov.php
\url{http://ltp.sourceforge.net/coverage/lcov.php}
\bibitem{tdd}
http://en.wikipedia.org/wiki/Test-driven_development
\url{http://en.wikipedia.org/wiki/Test-driven_development}
\end{thebibliography}
\end{frame}
%----------- slide --------------------------------------------------%
%----------- slide --------------------------------------------------%
\begin{frame}{Thank you for your attention!}
\begin{center}
This presentation can be found at:
\small
\url{http://github.com/cs0rbagomba/cc_and_dod/cc_and_dod.pdf}
\smallskip
or
\smallskip
\includegraphics[height=3.3cm]{qr_cc_and_dod.png}
\smallskip
Any questions?
\end{center}
\end{frame}
%----------- slide --------------------------------------------------%
\end{document}

@ -8,72 +8,75 @@
\PY@it{\PY@bf{\PY@ff{#1}}}}}}}
\def\PY#1#2{\PY@reset\PY@toks#1+\relax+\PY@do{#2}}
\def\PY@tok@gd{\def\PY@tc##1{\textcolor[rgb]{0.63,0.00,0.00}{##1}}}
\def\PY@tok@gu{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.50,0.00,0.50}{##1}}}
\def\PY@tok@gt{\def\PY@tc##1{\textcolor[rgb]{0.00,0.25,0.82}{##1}}}
\def\PY@tok@gs{\let\PY@bf=\textbf}
\def\PY@tok@gr{\def\PY@tc##1{\textcolor[rgb]{1.00,0.00,0.00}{##1}}}
\def\PY@tok@cm{\let\PY@it=\textit\def\PY@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
\def\PY@tok@vg{\def\PY@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
\def\PY@tok@m{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
\def\PY@tok@mh{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
\def\PY@tok@go{\def\PY@tc##1{\textcolor[rgb]{0.50,0.50,0.50}{##1}}}
\def\PY@tok@ge{\let\PY@it=\textit}
\def\PY@tok@vc{\def\PY@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
\def\PY@tok@il{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
\def\PY@tok@cs{\let\PY@it=\textit\def\PY@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
\def\PY@tok@cp{\def\PY@tc##1{\textcolor[rgb]{0.74,0.48,0.00}{##1}}}
\def\PY@tok@gi{\def\PY@tc##1{\textcolor[rgb]{0.00,0.63,0.00}{##1}}}
\def\PY@tok@gh{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.00,0.50}{##1}}}
\def\PY@tok@ni{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.60,0.60,0.60}{##1}}}
\def\PY@tok@nl{\def\PY@tc##1{\textcolor[rgb]{0.63,0.63,0.00}{##1}}}
\def\PY@tok@nn{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
\def\PY@tok@no{\def\PY@tc##1{\textcolor[rgb]{0.53,0.00,0.00}{##1}}}
\def\PY@tok@na{\def\PY@tc##1{\textcolor[rgb]{0.49,0.56,0.16}{##1}}}
\def\PY@tok@nb{\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\def\PY@tok@nc{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
\def\PY@tok@nd{\def\PY@tc##1{\textcolor[rgb]{0.67,0.13,1.00}{##1}}}
\def\PY@tok@ne{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.82,0.25,0.23}{##1}}}
\def\PY@tok@nf{\def\PY@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
\def\PY@tok@si{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.73,0.40,0.53}{##1}}}
\def\PY@tok@s2{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
\def\PY@tok@vi{\def\PY@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
\def\PY@tok@nt{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\def\PY@tok@nv{\def\PY@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
\def\PY@tok@s1{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
\def\PY@tok@sh{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
\def\PY@tok@sc{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
\def\PY@tok@sx{\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\def\PY@tok@bp{\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\def\PY@tok@c1{\let\PY@it=\textit\def\PY@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
\def\PY@tok@kc{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\def\PY@tok@c{\let\PY@it=\textit\def\PY@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
\def\PY@tok@mf{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
\def\PY@tok@err{\def\PY@bc##1{\fcolorbox[rgb]{1.00,0.00,0.00}{1,1,1}{##1}}}
\def\PY@tok@kd{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\def\PY@tok@ss{\def\PY@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
\def\PY@tok@sr{\def\PY@tc##1{\textcolor[rgb]{0.73,0.40,0.53}{##1}}}
\def\PY@tok@mo{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
\def\PY@tok@kn{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\def\PY@tok@mi{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
\def\PY@tok@gp{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.00,0.50}{##1}}}
\def\PY@tok@o{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
\def\PY@tok@kr{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\def\PY@tok@s{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
\def\PY@tok@kp{\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\def\PY@tok@w{\def\PY@tc##1{\textcolor[rgb]{0.73,0.73,0.73}{##1}}}
\def\PY@tok@kt{\def\PY@tc##1{\textcolor[rgb]{0.69,0.00,0.25}{##1}}}
\def\PY@tok@ow{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.67,0.13,1.00}{##1}}}
\def\PY@tok@sb{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
\def\PY@tok@k{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\def\PY@tok@se{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.73,0.40,0.13}{##1}}}
\def\PY@tok@sd{\let\PY@it=\textit\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
\expandafter\def\csname PY@tok@gd\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.63,0.00,0.00}{##1}}}
\expandafter\def\csname PY@tok@gu\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.50,0.00,0.50}{##1}}}
\expandafter\def\csname PY@tok@gt\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.25,0.82}{##1}}}
\expandafter\def\csname PY@tok@gs\endcsname{\let\PY@bf=\textbf}
\expandafter\def\csname PY@tok@gr\endcsname{\def\PY@tc##1{\textcolor[rgb]{1.00,0.00,0.00}{##1}}}
\expandafter\def\csname PY@tok@cm\endcsname{\let\PY@it=\textit\def\PY@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
\expandafter\def\csname PY@tok@vg\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
\expandafter\def\csname PY@tok@m\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
\expandafter\def\csname PY@tok@mh\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
\expandafter\def\csname PY@tok@go\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.50,0.50,0.50}{##1}}}
\expandafter\def\csname PY@tok@ge\endcsname{\let\PY@it=\textit}
\expandafter\def\csname PY@tok@vc\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
\expandafter\def\csname PY@tok@il\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
\expandafter\def\csname PY@tok@cs\endcsname{\let\PY@it=\textit\def\PY@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
\expandafter\def\csname PY@tok@cp\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.74,0.48,0.00}{##1}}}
\expandafter\def\csname PY@tok@gi\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.63,0.00}{##1}}}
\expandafter\def\csname PY@tok@gh\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.00,0.50}{##1}}}
\expandafter\def\csname PY@tok@ni\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.60,0.60,0.60}{##1}}}
\expandafter\def\csname PY@tok@nl\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.63,0.63,0.00}{##1}}}
\expandafter\def\csname PY@tok@nn\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
\expandafter\def\csname PY@tok@no\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.53,0.00,0.00}{##1}}}
\expandafter\def\csname PY@tok@na\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.49,0.56,0.16}{##1}}}
\expandafter\def\csname PY@tok@nb\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\expandafter\def\csname PY@tok@nc\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
\expandafter\def\csname PY@tok@nd\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.67,0.13,1.00}{##1}}}
\expandafter\def\csname PY@tok@ne\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.82,0.25,0.23}{##1}}}
\expandafter\def\csname PY@tok@nf\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
\expandafter\def\csname PY@tok@si\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.73,0.40,0.53}{##1}}}
\expandafter\def\csname PY@tok@s2\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
\expandafter\def\csname PY@tok@vi\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
\expandafter\def\csname PY@tok@nt\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\expandafter\def\csname PY@tok@nv\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
\expandafter\def\csname PY@tok@s1\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
\expandafter\def\csname PY@tok@sh\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
\expandafter\def\csname PY@tok@sc\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
\expandafter\def\csname PY@tok@sx\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\expandafter\def\csname PY@tok@bp\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\expandafter\def\csname PY@tok@c1\endcsname{\let\PY@it=\textit\def\PY@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
\expandafter\def\csname PY@tok@kc\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\expandafter\def\csname PY@tok@c\endcsname{\let\PY@it=\textit\def\PY@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
\expandafter\def\csname PY@tok@mf\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
\expandafter\def\csname PY@tok@err\endcsname{\def\PY@bc##1{\setlength{\fboxsep}{0pt}\fcolorbox[rgb]{1.00,0.00,0.00}{1,1,1}{\strut ##1}}}
\expandafter\def\csname PY@tok@kd\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\expandafter\def\csname PY@tok@ss\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
\expandafter\def\csname PY@tok@sr\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.40,0.53}{##1}}}
\expandafter\def\csname PY@tok@mo\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
\expandafter\def\csname PY@tok@kn\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\expandafter\def\csname PY@tok@mi\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
\expandafter\def\csname PY@tok@gp\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.00,0.50}{##1}}}
\expandafter\def\csname PY@tok@o\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
\expandafter\def\csname PY@tok@kr\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\expandafter\def\csname PY@tok@s\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
\expandafter\def\csname PY@tok@kp\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\expandafter\def\csname PY@tok@w\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.73,0.73}{##1}}}
\expandafter\def\csname PY@tok@kt\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.69,0.00,0.25}{##1}}}
\expandafter\def\csname PY@tok@ow\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.67,0.13,1.00}{##1}}}
\expandafter\def\csname PY@tok@sb\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
\expandafter\def\csname PY@tok@k\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\expandafter\def\csname PY@tok@se\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.73,0.40,0.13}{##1}}}
\expandafter\def\csname PY@tok@sd\endcsname{\let\PY@it=\textit\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
\def\PYZbs{\char`\\}
\def\PYZus{\char`\_}
\def\PYZob{\char`\{}
\def\PYZcb{\char`\}}
\def\PYZca{\char`\^}
\def\PYZam{\char`\&}
\def\PYZlt{\char`\<}
\def\PYZgt{\char`\>}
\def\PYZsh{\char`\#}
\def\PYZpc{\char`\%}
\def\PYZdl{\char`\$}
@ -81,4 +84,5 @@
% for compatibility with earlier versions
\def\PYZat{@}
\def\PYZlb{[}
\def\PYZrb{]}
\def\PYZrb{]}

@ -2,9 +2,7 @@
rm -rf *.gcda *.gcno a.out *.gcov lcov.info cov
gcc -fprofile-arcs -ftest-coverage tmp.c
./a.out
gcov tmp.c
cat tmp.c.gcov

@ -3,9 +3,7 @@
int main (void)
{
int i, total;
total = 0;
for (i = 0; i < 10; i++)
total += i;

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Loading…
Cancel
Save