<?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-Assertion-Utilities-for-GError">
<refmeta>
<refentrytitle role="top_of_page" id="cutter-Assertion-Utilities-for-GError.top_of_page">Assertion Utilities for GError</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>
  CUTTER Library
</refmiscinfo>
</refmeta>
<refnamediv>
<refname>Assertion Utilities for GError</refname>
<refpurpose>Utilities to write assertions related
to <link linkend="GError"><type>GError</type></link> more easily.</refpurpose>
</refnamediv>

<refsynopsisdiv id="cutter-Assertion-Utilities-for-GError.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            <link linkend="gcut-error-equal">gcut_error_equal</link>                    (<parameter>const <link linkend="GError"><type>GError</type></link> *error1</parameter>,
                                                         <parameter>const <link linkend="GError"><type>GError</type></link> *error2</parameter>);
<link linkend="gchar"><returnvalue>gchar</returnvalue></link> *             <link linkend="gcut-error-inspect">gcut_error_inspect</link>                  (<parameter>const <link linkend="GError"><type>GError</type></link> *error</parameter>);
</synopsis>
</refsynopsisdiv>

<refsect1 id="cutter-Assertion-Utilities-for-GError.description" role="desc">
<title role="desc.title">Description</title>
<para>
To write assertions, you need to check equality and show
expected and actual values.
</para>
<para>
The utilities help you to write assertions that are
related to <link linkend="GError"><type>GError</type></link>.
</para>
</refsect1>
<refsect1 id="cutter-Assertion-Utilities-for-GError.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="gcut-error-equal" role="function" condition="since:1.0.5">
<title>gcut_error_equal ()</title>
<indexterm zone="gcut-error-equal" role="1.0.5"><primary>gcut_error_equal</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            gcut_error_equal                    (<parameter>const <link linkend="GError"><type>GError</type></link> *error1</parameter>,
                                                         <parameter>const <link linkend="GError"><type>GError</type></link> *error2</parameter>);</programlisting>
<para>
Compares two <link linkend="GError"><type>GError</type></link>, <parameter>error1</parameter> and <parameter>error2</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>error1</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GError"><type>GError</type></link> to be compared.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error2</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GError"><type>GError</type></link> to be compared.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if both of <parameter>error1</parameter> and <parameter>error2</parameter> have the same
domain, code and message, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 1.0.5</para></refsect2>
<refsect2 id="gcut-error-inspect" role="function" condition="since:1.0.5">
<title>gcut_error_inspect ()</title>
<indexterm zone="gcut-error-inspect" role="1.0.5"><primary>gcut_error_inspect</primary></indexterm>
<programlisting><link linkend="gchar"><returnvalue>gchar</returnvalue></link> *             gcut_error_inspect                  (<parameter>const <link linkend="GError"><type>GError</type></link> *error</parameter>);</programlisting>
<para>
Inspects <parameter>error</parameter>. The returned string should be freed when
no longer needed.
</para><variablelist role="params">
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GError"><type>GError</type></link> value.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> inspected <parameter>error</parameter> as a string.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 1.0.5</para></refsect2>

</refsect1>

</refentry>
