\hypertarget{gtest__lite_8h}{}\doxysection{/home/balazs/\+C\+Lion\+Projects/prog2/hf\+\_\+naptar/gtest\+\_\+lite.h fájlreferencia}
\label{gtest__lite_8h}\index{/home/balazs/CLionProjects/prog2/hf\_naptar/gtest\_lite.h@{/home/balazs/CLionProjects/prog2/hf\_naptar/gtest\_lite.h}}
{\ttfamily \#include \char`\"{}../../../../../usr/lib/gcc/x86\+\_\+64-\/pc-\/linux-\/gnu/9.\+2.\+0/include/g++-\/v9/iostream\char`\"{}}\newline
{\ttfamily \#include \char`\"{}../../../../../usr/lib/gcc/x86\+\_\+64-\/pc-\/linux-\/gnu/9.\+2.\+0/include/g++-\/v9/cassert\char`\"{}}\newline
{\ttfamily \#include \char`\"{}../../../../../usr/lib/gcc/x86\+\_\+64-\/pc-\/linux-\/gnu/9.\+2.\+0/include/g++-\/v9/cmath\char`\"{}}\newline
{\ttfamily \#include \char`\"{}../../../../../usr/lib/gcc/x86\+\_\+64-\/pc-\/linux-\/gnu/9.\+2.\+0/include/g++-\/v9/cstring\char`\"{}}\newline
{\ttfamily \#include \char`\"{}../../../../../usr/lib/gcc/x86\+\_\+64-\/pc-\/linux-\/gnu/9.\+2.\+0/include/g++-\/v9/limits\char`\"{}}\newline
{\ttfamily \#include \char`\"{}../../../../../usr/lib/gcc/x86\+\_\+64-\/pc-\/linux-\/gnu/9.\+2.\+0/include/g++-\/v9/string\char`\"{}}\newline
{\ttfamily \#include \char`\"{}../../../../../usr/lib/gcc/x86\+\_\+64-\/pc-\/linux-\/gnu/9.\+2.\+0/include/g++-\/v9/fstream\char`\"{}}\newline
A gtest\+\_\+lite.\+h definíciós fájl függési gráfja\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{gtest__lite_8h__incl}
\end{center}
\end{figure}
\doxysubsection*{Osztályok}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structgtest__lite_1_1_test}{gtest\+\_\+lite\+::\+Test}}
\end{DoxyCompactItemize}
\doxysubsection*{Névterek}
\begin{DoxyCompactItemize}
\item 
 \mbox{\hyperlink{namespacegtest__lite}{gtest\+\_\+lite}}
\begin{DoxyCompactList}\small\item\em \mbox{\hyperlink{namespacegtest__lite}{gtest\+\_\+lite}}\+: a keretrendszer függvényinek és objektumainak névtere \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Makródefiníciók}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{gtest__lite_8h_a379a7b57e74521cb2c8e99f0e2779a72}{T\+E\+ST}}(C,  N)~\{ gtest\+\_\+lite\+::test.\+begin(\#C\char`\"{}.\char`\"{}\#N);
\item 
\mbox{\Hypertarget{gtest__lite_8h_a29fd18bed01c4d836c7ebfe73a125c3f}\label{gtest__lite_8h_a29fd18bed01c4d836c7ebfe73a125c3f}} 
\#define \mbox{\hyperlink{gtest__lite_8h_a29fd18bed01c4d836c7ebfe73a125c3f}{E\+ND}}~gtest\+\_\+lite\+::test.\+end(); \}
\begin{DoxyCompactList}\small\item\em Teszteset vége. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{gtest__lite_8h_a75adcdf89f69b0b615e395daafc315af}\label{gtest__lite_8h_a75adcdf89f69b0b615e395daafc315af}} 
\#define \mbox{\hyperlink{gtest__lite_8h_a75adcdf89f69b0b615e395daafc315af}{S\+U\+C\+C\+E\+ED}}()~gtest\+\_\+lite\+::test.\+tstatus(true, \+\_\+\+\_\+\+F\+I\+L\+E\+\_\+\+\_\+, \+\_\+\+\_\+\+L\+I\+N\+E\+\_\+\+\_\+)
\begin{DoxyCompactList}\small\item\em Sikeres teszt makrója. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{gtest__lite_8h_a3e26a8d27caa386ed0ea7ce9d5b7c4ed}\label{gtest__lite_8h_a3e26a8d27caa386ed0ea7ce9d5b7c4ed}} 
\#define \mbox{\hyperlink{gtest__lite_8h_a3e26a8d27caa386ed0ea7ce9d5b7c4ed}{F\+A\+IL}}()~gtest\+\_\+lite\+::test.\+tstatus(false, \+\_\+\+\_\+\+F\+I\+L\+E\+\_\+\+\_\+, \+\_\+\+\_\+\+L\+I\+N\+E\+\_\+\+\_\+)
\begin{DoxyCompactList}\small\item\em Sikertelen teszt makrója. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{gtest__lite_8h_aff8385840165a184edc29446aa51936f}\label{gtest__lite_8h_aff8385840165a184edc29446aa51936f}} 
\#define \mbox{\hyperlink{gtest__lite_8h_aff8385840165a184edc29446aa51936f}{E\+X\+P\+E\+C\+T\+\_\+\+EQ}}(expected,  actual)~\mbox{\hyperlink{gtest__lite_8h_a9cdc1c650facbb9f2ee0276f7db4da0a}{E\+X\+P\+E\+C\+T\+C\+MP}}((expected) == (actual), expected, actual)
\begin{DoxyCompactList}\small\item\em Azonosságot elváró makró \end{DoxyCompactList}\item 
\mbox{\Hypertarget{gtest__lite_8h_adb8a724f2c5c63ead11073c21fd51198}\label{gtest__lite_8h_adb8a724f2c5c63ead11073c21fd51198}} 
\#define \mbox{\hyperlink{gtest__lite_8h_adb8a724f2c5c63ead11073c21fd51198}{E\+X\+P\+E\+C\+T\+\_\+\+NE}}(expected,  actual)~\mbox{\hyperlink{gtest__lite_8h_a3ce925975ddfdf0021a91b91ba2d6cd4}{E\+X\+P\+E\+C\+T\+NE}}((expected) != (actual), expected, actual)
\begin{DoxyCompactList}\small\item\em Eltérést elváró makró \end{DoxyCompactList}\item 
\mbox{\Hypertarget{gtest__lite_8h_ab400890edc9f419e40c28a224e8ed79f}\label{gtest__lite_8h_ab400890edc9f419e40c28a224e8ed79f}} 
\#define \mbox{\hyperlink{gtest__lite_8h_ab400890edc9f419e40c28a224e8ed79f}{E\+X\+P\+E\+C\+T\+\_\+\+T\+R\+UE}}(actual)~\mbox{\hyperlink{gtest__lite_8h_a9cdc1c650facbb9f2ee0276f7db4da0a}{E\+X\+P\+E\+C\+T\+C\+MP}}(actual, \char`\"{}true\char`\"{}, actual)
\begin{DoxyCompactList}\small\item\em Igaz értéket elváró makró \end{DoxyCompactList}\item 
\mbox{\Hypertarget{gtest__lite_8h_a58cae60fff88d713c4850b50d3e592a6}\label{gtest__lite_8h_a58cae60fff88d713c4850b50d3e592a6}} 
\#define \mbox{\hyperlink{gtest__lite_8h_a58cae60fff88d713c4850b50d3e592a6}{E\+X\+P\+E\+C\+T\+\_\+\+F\+A\+L\+SE}}(actual)~\mbox{\hyperlink{gtest__lite_8h_a9cdc1c650facbb9f2ee0276f7db4da0a}{E\+X\+P\+E\+C\+T\+C\+MP}}(!(actual), \char`\"{}false\char`\"{}, actual)
\begin{DoxyCompactList}\small\item\em Hamis értéket elváró makró \end{DoxyCompactList}\item 
\mbox{\Hypertarget{gtest__lite_8h_a6e6277442d96cd18300619c321614397}\label{gtest__lite_8h_a6e6277442d96cd18300619c321614397}} 
\#define \mbox{\hyperlink{gtest__lite_8h_a6e6277442d96cd18300619c321614397}{E\+X\+P\+E\+C\+T\+\_\+\+D\+O\+U\+B\+L\+E\+\_\+\+EQ}}(expected,  actual)~\mbox{\hyperlink{gtest__lite_8h_a9cdc1c650facbb9f2ee0276f7db4da0a}{E\+X\+P\+E\+C\+T\+C\+MP}}(\mbox{\hyperlink{namespacegtest__lite_aa3b9c4a2a70bc8e32502c118a5b69699}{gtest\+\_\+lite\+::almost\+EQ}}(expected, actual), expected, actual)
\begin{DoxyCompactList}\small\item\em Valós számok azonosságát elváró makró \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{gtest__lite_8h_a5b4b193a92c39b99d7b9404c49feef0b}{E\+X\+P\+E\+C\+T\+\_\+\+S\+T\+R\+EQ}}(expected,  actual)
\begin{DoxyCompactList}\small\item\em C stringek (const char $\ast$) azonosságát tesztelő makró \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{gtest__lite_8h_aa511aad7b6a6a8e8d0279f16d925b094}{E\+X\+P\+E\+C\+T\+\_\+\+S\+T\+R\+NE}}(expected,  actual)
\begin{DoxyCompactList}\small\item\em C stringek (const char $\ast$) eltéréset tesztelő makró \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{gtest__lite_8h_a4b4fe697f312ef7d2618905a9bc12f04}{E\+X\+P\+E\+C\+T\+\_\+\+T\+H\+R\+OW}}(statement,  exception\+\_\+type)
\begin{DoxyCompactList}\small\item\em Kivételt várunk. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{gtest__lite_8h_a5129ea3a961fbd7fe71e6621452047bf}{E\+X\+P\+E\+C\+T\+\_\+\+T\+H\+R\+O\+W\+\_\+\+T\+H\+R\+OW}}(statement,  exception\+\_\+type)
\begin{DoxyCompactList}\small\item\em Kivételt várunk és továbbdobjuk -- ilyen nincs a gtest-\/ben. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{gtest__lite_8h_a2743a1438137ad857aa3f9fec3ff67ec}{E\+X\+P\+E\+C\+T\+\_\+\+N\+O\+\_\+\+T\+H\+R\+OW}}(statement)
\begin{DoxyCompactList}\small\item\em Nem várunk kivételt. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{gtest__lite_8h_a34bf9a881eb6b2800b0e6cb0abdbd319}{C\+R\+E\+A\+T\+E\+\_\+\+Has\+\_\+}}(X)
\item 
\#define \mbox{\hyperlink{gtest__lite_8h_a7dd74b63d3e7bc18b6ce8b5da636c1cd}{E\+X\+P\+E\+CT}}(expr,  msg)~gtest\+\_\+lite\+::test.\+expect(expr, \+\_\+\+\_\+\+F\+I\+L\+E\+\_\+\+\_\+, \+\_\+\+\_\+\+L\+I\+N\+E\+\_\+\+\_\+, \#msg)
\begin{DoxyCompactList}\small\item\em E\+X\+P\+E\+CT\+: makró, hogy könnyen lecserélhető legyen. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{gtest__lite_8h_a2de0bdca6acdd37ac44277a6412860c7}{E\+X\+P\+E\+C\+T\+E\+XP}}(expr,  exp,  act)
\begin{DoxyCompactList}\small\item\em E\+X\+P\+E\+C\+T\+E\+XP\+: általános kifejezés kiértékelése. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{gtest__lite_8h_a9cdc1c650facbb9f2ee0276f7db4da0a}{E\+X\+P\+E\+C\+T\+C\+MP}}(expr,  exp,  act)
\begin{DoxyCompactList}\small\item\em E\+X\+P\+E\+C\+T\+C\+MP\+: összehasonlítás. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{gtest__lite_8h_a3ce925975ddfdf0021a91b91ba2d6cd4}{E\+X\+P\+E\+C\+T\+NE}}(expr,  exp,  act)
\begin{DoxyCompactList}\small\item\em E\+X\+P\+E\+C\+T\+NE\+: összehasonlítás. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{gtest__lite_8h_a59f6c1f1654aa9d5adf5c143efd1a454}{E\+X\+P\+E\+C\+T\+T\+H\+R\+OW}}(statement,  exp,  act)
\begin{DoxyCompactList}\small\item\em E\+X\+P\+E\+C\+T\+T\+H\+R\+OW\+: kivételkezelés. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{gtest__lite_8h_a428e5e5ea2b7f67a0b68fbf57ea0faa7}\label{gtest__lite_8h_a428e5e5ea2b7f67a0b68fbf57ea0faa7}} 
\#define {\bfseries G\+T\+I\+N\+IT}(IS)
\item 
\mbox{\Hypertarget{gtest__lite_8h_a20ba54bca307f985eb448f71e6896dd5}\label{gtest__lite_8h_a20ba54bca307f985eb448f71e6896dd5}} 
\#define {\bfseries G\+T\+E\+ND}(os)
\end{DoxyCompactItemize}
\doxysubsection*{Függvények}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{gtest__lite_8h_aa57e54fc7cbf742de576263d90ee1660}\label{gtest__lite_8h_aa57e54fc7cbf742de576263d90ee1660}} 
void \mbox{\hyperlink{gtest__lite_8h_aa57e54fc7cbf742de576263d90ee1660}{has\+Member}} (...)
\begin{DoxyCompactList}\small\item\em Segédfüggvény egy publikus adattag, vagy tagfüggvény létezésének tesztelésére fordítási időben. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{namespacegtest__lite_aa3b9c4a2a70bc8e32502c118a5b69699}{gtest\+\_\+lite\+::almost\+EQ}} (double a, double b)
\end{DoxyCompactItemize}


\doxysubsection{Részletes leírás}
Google gtest keretrendszerhez hasonló rendszer. Sz.\+I. 2015., 2016., 2017. (\+\_\+\+Has\+\_\+X)

A tesztelés legalapvetőbb funkcióit támogató függvények és makrók. Nem szálbiztos megvalósítás. Szabadon felhasználható, bővíthető.

Használati példa\+: Teszteljük az f(x)=2$\ast$x függvényt\+: int f(int x) \{ return 2$\ast$x; \}

int main() \{ \mbox{\hyperlink{gtest__lite_8h_a379a7b57e74521cb2c8e99f0e2779a72}{T\+E\+S\+T(\+Tesz\+Eset\+Neve, Teszt\+Neve)}} \mbox{\hyperlink{gtest__lite_8h_aff8385840165a184edc29446aa51936f}{E\+X\+P\+E\+C\+T\+\_\+\+E\+Q(0, f(0))}}; \mbox{\hyperlink{gtest__lite_8h_aff8385840165a184edc29446aa51936f}{E\+X\+P\+E\+C\+T\+\_\+\+E\+Q(4, f(2))}} $<$$<$ \char`\"{}\+A függvény hibás eredményt adott\char`\"{} $<$$<$ std\+::endl; ... E\+ND ...

A működés részleteinek megértése szorgalmi feladat. 

\doxysubsection{Makródefiníciók dokumentációja}
\mbox{\Hypertarget{gtest__lite_8h_a34bf9a881eb6b2800b0e6cb0abdbd319}\label{gtest__lite_8h_a34bf9a881eb6b2800b0e6cb0abdbd319}} 
\index{gtest\_lite.h@{gtest\_lite.h}!CREATE\_Has\_@{CREATE\_Has\_}}
\index{CREATE\_Has\_@{CREATE\_Has\_}!gtest\_lite.h@{gtest\_lite.h}}
\doxysubsubsection{\texorpdfstring{CREATE\_Has\_}{CREATE\_Has\_}}
{\footnotesize\ttfamily \#define C\+R\+E\+A\+T\+E\+\_\+\+Has\+\_\+(\begin{DoxyParamCaption}\item[{}]{X }\end{DoxyParamCaption})}

{\bfseries Érték\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keyword}{template}<\textcolor{keyword}{typename} T> \textcolor{keyword}{struct }Has\_\#\#X \{  \(\backslash\)}
\DoxyCodeLine{    struct Fallback \{ \textcolor{keywordtype}{int} X; \};         \(\backslash\)}
\DoxyCodeLine{    struct Derived : T, Fallback \{\};    \(\backslash\)}
\DoxyCodeLine{    template<typename C, C> \textcolor{keyword}{struct }ChT; \(\backslash\)}
\DoxyCodeLine{    template<typename D> \textcolor{keyword}{static} char (\&f(ChT<int Fallback::*, \&D::X>*))[1]; \(\backslash\)}
\DoxyCodeLine{    template<typename D> \textcolor{keyword}{static} char (\&f(...))[2]; \(\backslash\)}
\DoxyCodeLine{    static \textcolor{keywordtype}{bool} \textcolor{keyword}{const} member = \textcolor{keyword}{sizeof}(f<Derived>(0)) == 2; \(\backslash\)}
\DoxyCodeLine{\};}

\end{DoxyCode}
Segédmakró egy adattag, vagy tagfüggvény létezésének tesztelésére futási időben Ötlet\+: \href{https://cpptalk.wordpress.com/2009/09/12/substitution-failure-is-not-an-error-2}{\texttt{ https\+://cpptalk.\+wordpress.\+com/2009/09/12/substitution-\/failure-\/is-\/not-\/an-\/error-\/2}} \mbox{\Hypertarget{gtest__lite_8h_a7dd74b63d3e7bc18b6ce8b5da636c1cd}\label{gtest__lite_8h_a7dd74b63d3e7bc18b6ce8b5da636c1cd}} 
\index{gtest\_lite.h@{gtest\_lite.h}!EXPECT@{EXPECT}}
\index{EXPECT@{EXPECT}!gtest\_lite.h@{gtest\_lite.h}}
\doxysubsubsection{\texorpdfstring{EXPECT}{EXPECT}}
{\footnotesize\ttfamily \#define E\+X\+P\+E\+CT(\begin{DoxyParamCaption}\item[{}]{expr,  }\item[{}]{msg }\end{DoxyParamCaption})~gtest\+\_\+lite\+::test.\+expect(expr, \+\_\+\+\_\+\+F\+I\+L\+E\+\_\+\+\_\+, \+\_\+\+\_\+\+L\+I\+N\+E\+\_\+\+\_\+, \#msg)}



E\+X\+P\+E\+CT\+: makró, hogy könnyen lecserélhető legyen. 

\DoxyHorRuler{0}
 Belső megvalósításhoz tartozó makrók, és osztályok. \hypertarget{gtest__lite_8h_autotoc_md0}{}\doxysubsubsection{Nem célszerű közvetlenül használni, vagy módosítani}\label{gtest__lite_8h_autotoc_md0}
\mbox{\Hypertarget{gtest__lite_8h_a2743a1438137ad857aa3f9fec3ff67ec}\label{gtest__lite_8h_a2743a1438137ad857aa3f9fec3ff67ec}} 
\index{gtest\_lite.h@{gtest\_lite.h}!EXPECT\_NO\_THROW@{EXPECT\_NO\_THROW}}
\index{EXPECT\_NO\_THROW@{EXPECT\_NO\_THROW}!gtest\_lite.h@{gtest\_lite.h}}
\doxysubsubsection{\texorpdfstring{EXPECT\_NO\_THROW}{EXPECT\_NO\_THROW}}
{\footnotesize\ttfamily \#define E\+X\+P\+E\+C\+T\+\_\+\+N\+O\+\_\+\+T\+H\+R\+OW(\begin{DoxyParamCaption}\item[{}]{statement }\end{DoxyParamCaption})}

{\bfseries Érték\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{    \textcolor{keywordflow}{try} \{ gtest\_lite::test.\mbox{\hyperlink{structgtest__lite_1_1_test_a1145ceb335a60a808b7b4d5d1624b2a5}{tmp}} = \textcolor{keyword}{true}; statement; \} \(\backslash\)}
\DoxyCodeLine{    catch (...) \{ gtest\_lite::test.\mbox{\hyperlink{structgtest__lite_1_1_test_a1145ceb335a60a808b7b4d5d1624b2a5}{tmp}} = \textcolor{keyword}{false}; \}\(\backslash\)}
\DoxyCodeLine{    EXPECTTHROW(statement, \textcolor{stringliteral}{"nem dob kivetelt."}, \textcolor{stringliteral}{"kivetelt dobott."})}

\end{DoxyCode}


Nem várunk kivételt. 

\mbox{\Hypertarget{gtest__lite_8h_a5b4b193a92c39b99d7b9404c49feef0b}\label{gtest__lite_8h_a5b4b193a92c39b99d7b9404c49feef0b}} 
\index{gtest\_lite.h@{gtest\_lite.h}!EXPECT\_STREQ@{EXPECT\_STREQ}}
\index{EXPECT\_STREQ@{EXPECT\_STREQ}!gtest\_lite.h@{gtest\_lite.h}}
\doxysubsubsection{\texorpdfstring{EXPECT\_STREQ}{EXPECT\_STREQ}}
{\footnotesize\ttfamily \#define E\+X\+P\+E\+C\+T\+\_\+\+S\+T\+R\+EQ(\begin{DoxyParamCaption}\item[{}]{expected,  }\item[{}]{actual }\end{DoxyParamCaption})}

{\bfseries Érték\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{    ((actual != NULL) ? \(\backslash\)}
\DoxyCodeLine{    \mbox{\hyperlink{gtest__lite_8h_a9cdc1c650facbb9f2ee0276f7db4da0a}{EXPECTCMP}}(strcmp(expected, actual) == 0, expected, actual) : \(\backslash\)}
\DoxyCodeLine{    \mbox{\hyperlink{gtest__lite_8h_a7dd74b63d3e7bc18b6ce8b5da636c1cd}{EXPECT}}(\textcolor{keyword}{false}, \textcolor{stringliteral}{"STR\_EQ NULL pointert kapott!"}))}

\end{DoxyCode}


C stringek (const char $\ast$) azonosságát tesztelő makró 

\mbox{\Hypertarget{gtest__lite_8h_aa511aad7b6a6a8e8d0279f16d925b094}\label{gtest__lite_8h_aa511aad7b6a6a8e8d0279f16d925b094}} 
\index{gtest\_lite.h@{gtest\_lite.h}!EXPECT\_STRNE@{EXPECT\_STRNE}}
\index{EXPECT\_STRNE@{EXPECT\_STRNE}!gtest\_lite.h@{gtest\_lite.h}}
\doxysubsubsection{\texorpdfstring{EXPECT\_STRNE}{EXPECT\_STRNE}}
{\footnotesize\ttfamily \#define E\+X\+P\+E\+C\+T\+\_\+\+S\+T\+R\+NE(\begin{DoxyParamCaption}\item[{}]{expected,  }\item[{}]{actual }\end{DoxyParamCaption})}

{\bfseries Érték\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{    ((actual != NULL) ? \(\backslash\)}
\DoxyCodeLine{    \mbox{\hyperlink{gtest__lite_8h_a3ce925975ddfdf0021a91b91ba2d6cd4}{EXPECTNE}}(strcmp(expected, actual) != 0, expected, actual) : \(\backslash\)}
\DoxyCodeLine{    \mbox{\hyperlink{gtest__lite_8h_a7dd74b63d3e7bc18b6ce8b5da636c1cd}{EXPECT}}(\textcolor{keyword}{false}, \textcolor{stringliteral}{"STR\_EQ NULL pointert kapott!"}))}

\end{DoxyCode}


C stringek (const char $\ast$) eltéréset tesztelő makró 

\mbox{\Hypertarget{gtest__lite_8h_a4b4fe697f312ef7d2618905a9bc12f04}\label{gtest__lite_8h_a4b4fe697f312ef7d2618905a9bc12f04}} 
\index{gtest\_lite.h@{gtest\_lite.h}!EXPECT\_THROW@{EXPECT\_THROW}}
\index{EXPECT\_THROW@{EXPECT\_THROW}!gtest\_lite.h@{gtest\_lite.h}}
\doxysubsubsection{\texorpdfstring{EXPECT\_THROW}{EXPECT\_THROW}}
{\footnotesize\ttfamily \#define E\+X\+P\+E\+C\+T\+\_\+\+T\+H\+R\+OW(\begin{DoxyParamCaption}\item[{}]{statement,  }\item[{}]{exception\+\_\+type }\end{DoxyParamCaption})}

{\bfseries Érték\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{    \textcolor{keywordflow}{try} \{ gtest\_lite::test.\mbox{\hyperlink{structgtest__lite_1_1_test_a1145ceb335a60a808b7b4d5d1624b2a5}{tmp}} = \textcolor{keyword}{false}; statement; \} \(\backslash\)}
\DoxyCodeLine{    catch (exception\_type) \{ gtest\_lite::test.\mbox{\hyperlink{structgtest__lite_1_1_test_a1145ceb335a60a808b7b4d5d1624b2a5}{tmp}} = \textcolor{keyword}{true}; \} \(\backslash\)}
\DoxyCodeLine{    catch (...) \{ \} \(\backslash\)}
\DoxyCodeLine{    EXPECTTHROW(statement, \textcolor{stringliteral}{"kivetelt dob."}, \textcolor{stringliteral}{"nem dobott '"}\#exception\_type\textcolor{stringliteral}{"' kivetelt."})}

\end{DoxyCode}


Kivételt várunk. 

\mbox{\Hypertarget{gtest__lite_8h_a5129ea3a961fbd7fe71e6621452047bf}\label{gtest__lite_8h_a5129ea3a961fbd7fe71e6621452047bf}} 
\index{gtest\_lite.h@{gtest\_lite.h}!EXPECT\_THROW\_THROW@{EXPECT\_THROW\_THROW}}
\index{EXPECT\_THROW\_THROW@{EXPECT\_THROW\_THROW}!gtest\_lite.h@{gtest\_lite.h}}
\doxysubsubsection{\texorpdfstring{EXPECT\_THROW\_THROW}{EXPECT\_THROW\_THROW}}
{\footnotesize\ttfamily \#define E\+X\+P\+E\+C\+T\+\_\+\+T\+H\+R\+O\+W\+\_\+\+T\+H\+R\+OW(\begin{DoxyParamCaption}\item[{}]{statement,  }\item[{}]{exception\+\_\+type }\end{DoxyParamCaption})}

{\bfseries Érték\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{    \textcolor{keywordflow}{try} \{ gtest\_lite::test.\mbox{\hyperlink{structgtest__lite_1_1_test_a1145ceb335a60a808b7b4d5d1624b2a5}{tmp}} = \textcolor{keyword}{false}; statement; \} \(\backslash\)}
\DoxyCodeLine{    catch (exception\_type) \{ gtest\_lite::test.\mbox{\hyperlink{structgtest__lite_1_1_test_a1145ceb335a60a808b7b4d5d1624b2a5}{tmp}} = \textcolor{keyword}{true}; \textcolor{keywordflow}{throw}; \} \(\backslash\)}
\DoxyCodeLine{    EXPECTTHROW(statement, \textcolor{stringliteral}{"kivetelt dob."}, \textcolor{stringliteral}{"nem dobott '"}\#exception\_type\textcolor{stringliteral}{"' kivetelt."})}

\end{DoxyCode}


Kivételt várunk és továbbdobjuk -- ilyen nincs a gtest-\/ben. 

\mbox{\Hypertarget{gtest__lite_8h_a9cdc1c650facbb9f2ee0276f7db4da0a}\label{gtest__lite_8h_a9cdc1c650facbb9f2ee0276f7db4da0a}} 
\index{gtest\_lite.h@{gtest\_lite.h}!EXPECTCMP@{EXPECTCMP}}
\index{EXPECTCMP@{EXPECTCMP}!gtest\_lite.h@{gtest\_lite.h}}
\doxysubsubsection{\texorpdfstring{EXPECTCMP}{EXPECTCMP}}
{\footnotesize\ttfamily \#define E\+X\+P\+E\+C\+T\+C\+MP(\begin{DoxyParamCaption}\item[{}]{expr,  }\item[{}]{exp,  }\item[{}]{act }\end{DoxyParamCaption})}

{\bfseries Érték\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{    gtest\_lite::test.\mbox{\hyperlink{structgtest__lite_1_1_test_a75616ab47de83dd502d0b1fb4cfd8992}{expect}}(expr, \_\_FILE\_\_, \_\_LINE\_\_, \#act) \(\backslash\)}
\DoxyCodeLine{    << \textcolor{stringliteral}{"**A(z) '"}\#act << \textcolor{stringliteral}{"'kifejezes\(\backslash\)n**   erteke: "} << std::boolalpha << (act) \(\backslash\)}
\DoxyCodeLine{    << \textcolor{stringliteral}{"\(\backslash\)n**   elvart: "} << (exp) << std::endl}

\end{DoxyCode}


E\+X\+P\+E\+C\+T\+C\+MP\+: összehasonlítás. 

\mbox{\Hypertarget{gtest__lite_8h_a2de0bdca6acdd37ac44277a6412860c7}\label{gtest__lite_8h_a2de0bdca6acdd37ac44277a6412860c7}} 
\index{gtest\_lite.h@{gtest\_lite.h}!EXPECTEXP@{EXPECTEXP}}
\index{EXPECTEXP@{EXPECTEXP}!gtest\_lite.h@{gtest\_lite.h}}
\doxysubsubsection{\texorpdfstring{EXPECTEXP}{EXPECTEXP}}
{\footnotesize\ttfamily \#define E\+X\+P\+E\+C\+T\+E\+XP(\begin{DoxyParamCaption}\item[{}]{expr,  }\item[{}]{exp,  }\item[{}]{act }\end{DoxyParamCaption})}

{\bfseries Érték\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{    gtest\_lite::test.\mbox{\hyperlink{structgtest__lite_1_1_test_a75616ab47de83dd502d0b1fb4cfd8992}{expect}}(expr, \_\_FILE\_\_, \_\_LINE\_\_, \#expr) \(\backslash\)}
\DoxyCodeLine{    << \textcolor{stringliteral}{"**A(z) '"}\#act << \textcolor{stringliteral}{"'kifejezes\(\backslash\)n**   erteke: "} << std::boolalpha << (act) \(\backslash\)}
\DoxyCodeLine{    << \textcolor{stringliteral}{"\(\backslash\)n**   elvart: "} << (exp) << std::endl}

\end{DoxyCode}


E\+X\+P\+E\+C\+T\+E\+XP\+: általános kifejezés kiértékelése. 

\mbox{\Hypertarget{gtest__lite_8h_a3ce925975ddfdf0021a91b91ba2d6cd4}\label{gtest__lite_8h_a3ce925975ddfdf0021a91b91ba2d6cd4}} 
\index{gtest\_lite.h@{gtest\_lite.h}!EXPECTNE@{EXPECTNE}}
\index{EXPECTNE@{EXPECTNE}!gtest\_lite.h@{gtest\_lite.h}}
\doxysubsubsection{\texorpdfstring{EXPECTNE}{EXPECTNE}}
{\footnotesize\ttfamily \#define E\+X\+P\+E\+C\+T\+NE(\begin{DoxyParamCaption}\item[{}]{expr,  }\item[{}]{exp,  }\item[{}]{act }\end{DoxyParamCaption})}

{\bfseries Érték\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{    gtest\_lite::test.\mbox{\hyperlink{structgtest__lite_1_1_test_a75616ab47de83dd502d0b1fb4cfd8992}{expect}}(expr, \_\_FILE\_\_, \_\_LINE\_\_, \#act) \(\backslash\)}
\DoxyCodeLine{    << \textcolor{stringliteral}{"**A(z) '"}\#act << \textcolor{stringliteral}{"'kifejezes\(\backslash\)n**   erteke: "} << std::boolalpha << (act) \(\backslash\)}
\DoxyCodeLine{    << \textcolor{stringliteral}{"\(\backslash\)n**   elvart, hogy nem: "} << (exp) << std::endl}

\end{DoxyCode}


E\+X\+P\+E\+C\+T\+NE\+: összehasonlítás. 

\mbox{\Hypertarget{gtest__lite_8h_a59f6c1f1654aa9d5adf5c143efd1a454}\label{gtest__lite_8h_a59f6c1f1654aa9d5adf5c143efd1a454}} 
\index{gtest\_lite.h@{gtest\_lite.h}!EXPECTTHROW@{EXPECTTHROW}}
\index{EXPECTTHROW@{EXPECTTHROW}!gtest\_lite.h@{gtest\_lite.h}}
\doxysubsubsection{\texorpdfstring{EXPECTTHROW}{EXPECTTHROW}}
{\footnotesize\ttfamily \#define E\+X\+P\+E\+C\+T\+T\+H\+R\+OW(\begin{DoxyParamCaption}\item[{}]{statement,  }\item[{}]{exp,  }\item[{}]{act }\end{DoxyParamCaption})}

{\bfseries Érték\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{    gtest\_lite::test.\mbox{\hyperlink{structgtest__lite_1_1_test_a75616ab47de83dd502d0b1fb4cfd8992}{expect}}(gtest\_lite::test.tmp, \_\_FILE\_\_, \_\_LINE\_\_, \#statement) \(\backslash\)}
\DoxyCodeLine{    << \textcolor{stringliteral}{"**Az utasitas "} << (act) \(\backslash\)}
\DoxyCodeLine{    << \textcolor{stringliteral}{"\(\backslash\)n**Azt vartuk, hogy "} << (exp) << std::endl}

\end{DoxyCode}


E\+X\+P\+E\+C\+T\+T\+H\+R\+OW\+: kivételkezelés. 

\mbox{\Hypertarget{gtest__lite_8h_a379a7b57e74521cb2c8e99f0e2779a72}\label{gtest__lite_8h_a379a7b57e74521cb2c8e99f0e2779a72}} 
\index{gtest\_lite.h@{gtest\_lite.h}!TEST@{TEST}}
\index{TEST@{TEST}!gtest\_lite.h@{gtest\_lite.h}}
\doxysubsubsection{\texorpdfstring{TEST}{TEST}}
{\footnotesize\ttfamily \#define T\+E\+ST(\begin{DoxyParamCaption}\item[{}]{C,  }\item[{}]{N }\end{DoxyParamCaption})~\{ gtest\+\_\+lite\+::test.\+begin(\#C\char`\"{}.\char`\"{}\#N);}

Teszt kezdete. A makró paraméterezése hasonlít a gtest paraméterezéséhez. Így az itt elkészített testek könnyen átemelhetők a gtest keretrendszerbe. 
\begin{DoxyParams}{Paraméterek}
{\em C} & -\/ teszteset neve (csak a gtest kompatibilitás miatt van külön neve az eseteknek) \\
\hline
{\em N} & -\/ teszt neve \\
\hline
\end{DoxyParams}
