<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="cutter-Assertions-with-C++-support">
<refmeta>
<refentrytitle role="top_of_page" id="cutter-Assertions-with-C++-support.top_of_page">Assertions with C++ support</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>
  CUTTER Library
</refmiscinfo>
</refmeta>
<refnamediv>
<refname>Assertions with C++ support</refname>
<refpurpose>Checks that your program works as you
expect with C++ support.</refpurpose>
</refnamediv>

<refsynopsisdiv id="cutter-Assertions-with-C++-support.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>#define             <link linkend="cppcut-assert-equal">cppcut_assert_equal</link>                 (expected,
                                                         actual,
                                                         ...)
</synopsis>
</refsynopsisdiv>

<refsect1 id="cutter-Assertions-with-C++-support.description" role="desc">
<title role="desc.title">Description</title>

</refsect1>
<refsect1 id="cutter-Assertions-with-C++-support.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="cppcut-assert-equal" role="macro" condition="since:1.0.9">
<title>cppcut_assert_equal()</title>
<indexterm zone="cppcut-assert-equal" role="1.0.9"><primary>cppcut_assert_equal</primary></indexterm>
<programlisting>#define             cppcut_assert_equal(expected, actual, ...)</programlisting>
<para>
This assertion is a generic method based on template. You
can pass any object's reference as <parameter>expected</parameter> and <parameter>actual</parameter>.
</para>
<para>
Passes if <parameter>expected</parameter> == <parameter>actual</parameter>.
</para>
<para>
e.g.:
<informalexample><programlisting>
cppcut_assert_equal(3, 1 + 2);
cppcut_assert_equal(3, 1 + 2, cppcut_message("easy expression"));
cppcut_assert_equal(3, 1 + 2, cppcut_message() &lt;&lt; "easy expression"));
</programlisting></informalexample>
</para><variablelist role="params">
<varlistentry><term><parameter>expected</parameter>&#160;:</term>
<listitem><simpara>an expected value.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>actual</parameter>&#160;:</term>
<listitem><simpara>an actual value.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>...</parameter>&#160;:</term>
<listitem><simpara>an optional message. Use <link linkend="cppcut-message"><function>cppcut_message()</function></link> for this.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 1.0.9</para></refsect2>

</refsect1>

</refentry>
