cppunit.html   [plain text]


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML
><HEAD
><TITLE
>C++ Unit Testing API</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.64
"><LINK
REL="HOME"
TITLE="DejaGnu"
HREF="book1.html"><LINK
REL="UP"
TITLE="Unit Testing API"
HREF="unittestapi.html"><LINK
REL="PREVIOUS"
TITLE="Unit Testing API"
HREF="unittestapi.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>DejaGnu: The GNU Testing Framework</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="unittestapi.html"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Unit Testing API</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
>&nbsp;</TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="CPPUNIT"
>C++ Unit Testing API</A
></H1
><P
>All of the methods that take a
	   	  <TT
CLASS="PARAMETER"
><I
>msg</I
></TT
> parameter use a C char *
		  or STL string, that is the message to be
	   	  dislayed. There currently is no support for variable
	   	  length arguments.</P
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="PASSMETH"
>Pass Method</A
></H2
><P
>This prints a message for a successful test
	  completion.</P
><DIV
CLASS="FUNCSYNOPSIS"
><A
NAME="AEN5165"
></A
><P
></P
><CODE
CLASS="FUNCDEF"
><TT
CLASS="FUNCTION"
>TestState::pass</TT
></CODE
>(<TT
CLASS="PARAMETER"
><I
>msg</I
></TT
>);<P
></P
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="FAILMETH"
>Fail Method</A
></H2
><P
>This prints a message for an unsuccessful test
	  completion.</P
><DIV
CLASS="FUNCSYNOPSIS"
><A
NAME="AEN5173"
></A
><P
></P
><CODE
CLASS="FUNCDEF"
><TT
CLASS="FUNCTION"
>TestState::fail</TT
></CODE
>(<TT
CLASS="PARAMETER"
><I
>msg</I
></TT
>);<P
></P
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="UNTESTEDMETH"
>Untested Method</A
></H2
><P
>This prints a message for an test case that isn't run
	  for some technical reason.</P
><DIV
CLASS="FUNCSYNOPSIS"
><A
NAME="AEN5181"
></A
><P
></P
><CODE
CLASS="FUNCDEF"
><TT
CLASS="FUNCTION"
>TestState::untested</TT
></CODE
>(<TT
CLASS="PARAMETER"
><I
>msg</I
></TT
>);<P
></P
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="UNRESOLVEDMETH"
>Unresolved Method</A
></H2
><P
>This prints a message for an test case that is run,
	  but there is no clear result. These output states require a
	  human to look over the results to determine what happened.
	  </P
><DIV
CLASS="FUNCSYNOPSIS"
><A
NAME="AEN5189"
></A
><P
></P
><CODE
CLASS="FUNCDEF"
><TT
CLASS="FUNCTION"
>TestState::unresolved</TT
></CODE
>(<TT
CLASS="PARAMETER"
><I
>msg</I
></TT
>);<P
></P
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="TOTALSMETH"
>Totals Method</A
></H2
><P
>This prints out the total numbers of all the test
	  state outputs.</P
><DIV
CLASS="FUNCSYNOPSIS"
><A
NAME="AEN5197"
></A
><P
></P
><CODE
CLASS="FUNCDEF"
><TT
CLASS="FUNCTION"
>TestState::totals</TT
></CODE
>(<TT
CLASS="PARAMETER"
><I
></I
></TT
>);<P
></P
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="unittestapi.html"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="book1.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>&nbsp;</TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Unit Testing API</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="unittestapi.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>&nbsp;</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>