<?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-Test-Utilities-with-GLib-support">
<refmeta>
<refentrytitle role="top_of_page" id="cutter-Test-Utilities-with-GLib-support.top_of_page">Test Utilities with GLib support</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>CUTTER Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>Test Utilities with GLib support</refname>
<refpurpose>Utilities to write tests more easily
with GLib support.</refpurpose>
</refnamediv>

<refsect1 id="cutter-Test-Utilities-with-GLib-support.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_return" colwidth="150px"/>
<colspec colname="functions_name"/>
<tbody>
<row><entry role="function_type"><link linkend="GObject"><returnvalue>GObject</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gcut-take-object">gcut_take_object</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GError"><returnvalue>GError</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gcut-take-error">gcut_take_error</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gcut-take-list">gcut_take_list</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GHashTable"><returnvalue>GHashTable</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gcut-take-hash-table">gcut_take_hash_table</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="gcut-take-string">gcut_take_string</link><phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="gcut-take-new-string">gcut_take_new_string</link><phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gcut-list-new">gcut_list_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gcut-list-int-new">gcut_list_int_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gcut-list-uint-new">gcut_list_uint_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gcut-list-string-new">gcut_list_string_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gcut-list-string-new-array">gcut_list_string_new_array</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gcut-take-new-list-int">gcut_take_new_list_int</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gcut-take-new-list-uint">gcut_take_new_list_uint</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gcut-take-new-list-string">gcut_take_new_list_string</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="gcut-take-new-list-string-backward-compatibility">gcut_take_new_list_string_backward_compatibility</link><phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gcut-take-new-list-string-array">gcut_take_new_list_string_array</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="gcut-take-new-list-object">gcut_take_new_list_object</link><phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gcut-list-string-free">gcut_list_string_free</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gcut-list-object-free">gcut_list_object_free</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GHashTable"><returnvalue>GHashTable</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gcut-hash-table-string-string-new">gcut_hash_table_string_string_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GHashTable"><returnvalue>GHashTable</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gcut-hash-table-string-string-new-va-list">gcut_hash_table_string_string_new_va_list</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GHashTable"><returnvalue>GHashTable</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gcut-take-new-hash-table-string-string">gcut_take_new_hash_table_string_string</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="gcut-get-fixture-data">gcut_get_fixture_data</link><phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>


<refsect1 id="cutter-Test-Utilities-with-GLib-support.description" role="desc">
<title role="desc.title">Description</title>
<para>To write tests, you need to write codes that
set up/tear down test environment, prepare expected and
actual values and so on. Cutter provides test utilities
to you write your tests more easily.</para>
<para>The utilities work with GLib.</para>

</refsect1>
<refsect1 id="cutter-Test-Utilities-with-GLib-support.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gcut-take-object" role="function" condition="since:1.0.3">
<title>gcut_take_object&#160;()</title>
<indexterm zone="gcut-take-object" role="1.0.3"><primary>gcut_take_object</primary></indexterm>
<programlisting language="C"><link linkend="GObject"><returnvalue>GObject</returnvalue></link>&#160;*
gcut_take_object (<parameter><link linkend="GObject"><type>GObject</type></link> *object</parameter>);</programlisting>
<para>Passes ownership of <parameter>object</parameter>
 to Cutter and returns <parameter>object</parameter>
.</para>
<refsect3 id="gcut-take-object.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>object</para></entry>
<entry role="parameter_description"><para>the <link linkend="GObject"><type>GObject</type></link> to be owned by Cutter.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gcut-take-object.returns" role="returns">
<title>Returns</title>
<para> <parameter>object</parameter>
owned by Cutter. Don't <link linkend="g-object-unref"><function>g_object_unref()</function></link> it.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.0.3">1.0.3</link></para></refsect2>
<refsect2 id="gcut-take-error" role="function" condition="since:1.0.3">
<title>gcut_take_error&#160;()</title>
<indexterm zone="gcut-take-error" role="1.0.3"><primary>gcut_take_error</primary></indexterm>
<programlisting language="C"><link linkend="GError"><returnvalue>GError</returnvalue></link>&#160;*
gcut_take_error (<parameter><link linkend="GError"><type>GError</type></link> *error</parameter>);</programlisting>
<para>Passes ownership of <parameter>error</parameter>
 to Cutter and returns
a <parameter>error</parameter>
 itself.</para>
<refsect3 id="gcut-take-error.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>error</para></entry>
<entry role="parameter_description"><para>the <link linkend="GError"><type>GError</type></link> to be owned by Cutter.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gcut-take-error.returns" role="returns">
<title>Returns</title>
<para> a <link linkend="GError"><type>GError</type></link> owned by Cutter. Don't <link linkend="g-error-free"><function>g_error_free()</function></link>
it.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.0.3">1.0.3</link></para></refsect2>
<refsect2 id="gcut-take-list" role="function" condition="since:1.0.3">
<title>gcut_take_list&#160;()</title>
<indexterm zone="gcut-take-list" role="1.0.3"><primary>gcut_take_list</primary></indexterm>
<programlisting language="C">const <link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
gcut_take_list (<parameter>const <link linkend="GList"><type>GList</type></link> *list</parameter>,
                <parameter><link linkend="CutDestroyFunction"><type>CutDestroyFunction</type></link> destroy_function</parameter>);</programlisting>
<para>Passes ownership of <parameter>list</parameter>
 to Cutter and returns
<parameter>list</parameter>
 itself.</para>
<refsect3 id="gcut-take-list.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>list</para></entry>
<entry role="parameter_description"><para>the <link linkend="GList"><type>GList</type></link> to be owned by Cutter.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>destroy_function</para></entry>
<entry role="parameter_description"><para>the destroy function that destroys the
elements of <parameter>list</parameter>
, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gcut-take-list.returns" role="returns">
<title>Returns</title>
<para> a <link linkend="GList"><type>GList</type></link> owned by Cutter. Don't <link linkend="g-list-free"><function>g_list_free()</function></link>
it.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.0.3">1.0.3</link></para></refsect2>
<refsect2 id="gcut-take-hash-table" role="function" condition="since:1.0.4">
<title>gcut_take_hash_table&#160;()</title>
<indexterm zone="gcut-take-hash-table" role="1.0.4"><primary>gcut_take_hash_table</primary></indexterm>
<programlisting language="C"><link linkend="GHashTable"><returnvalue>GHashTable</returnvalue></link>&#160;*
gcut_take_hash_table (<parameter><link linkend="GHashTable"><type>GHashTable</type></link> *hash_table</parameter>);</programlisting>
<para>Passes ownership of <parameter>hash_table</parameter>
 to Cutter and returns
<parameter>hash_table</parameter>
 itself.</para>
<refsect3 id="gcut-take-hash-table.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>hash_table</para></entry>
<entry role="parameter_description"><para>the <link linkend="GHashTable"><type>GHashTable</type></link> to be owned by Cutter.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gcut-take-hash-table.returns" role="returns">
<title>Returns</title>
<para> a <link linkend="GHashTable"><type>GHashTable</type></link> owned by Cutter. Don't
<link linkend="g-hash-table-unref"><function>g_hash_table_unref()</function></link> it.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.0.4">1.0.4</link></para></refsect2>
<refsect2 id="gcut-take-string" role="macro" condition="since:1.1.6">
<title>gcut_take_string()</title>
<indexterm zone="gcut-take-string" role="1.1.6"><primary>gcut_take_string</primary></indexterm>
<programlisting language="C">#define             gcut_take_string(string)</programlisting>
<para>Passes ownership of <parameter>string</parameter>
 to Cutter and returns
<parameter>string</parameter>
 itself.</para>
<refsect3 id="gcut-take-string.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>string</para></entry>
<entry role="parameter_description"><para>the <link linkend="GString"><type>GString</type></link> to be owned by Cutter.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gcut-take-string.returns" role="returns">
<title>Returns</title>
<para> a <link linkend="GString"><type>GString</type></link> owned by Cutter. Don't
<link linkend="g-string-free"><function>g_string_free()</function></link> it.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.1.6">1.1.6</link></para></refsect2>
<refsect2 id="gcut-take-new-string" role="macro" condition="since:1.1.6">
<title>gcut_take_new_string()</title>
<indexterm zone="gcut-take-new-string" role="1.1.6"><primary>gcut_take_new_string</primary></indexterm>
<programlisting language="C">#define             gcut_take_new_string(string)</programlisting>
<para>Creates a <link linkend="GString"><type>GString</type></link> object from passed string.</para>
<refsect3 id="gcut-take-new-string.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>string</para></entry>
<entry role="parameter_description"><para>the string. It can be <link linkend="NULL:CAPS"><literal>NULL</literal></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gcut-take-new-string.returns" role="returns">
<title>Returns</title>
<para> a <link linkend="GString"><type>GString</type></link> owned by Cutter. Don't
<link linkend="g-string-free"><function>g_string_free()</function></link> it.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.1.6">1.1.6</link></para></refsect2>
<refsect2 id="gcut-list-new" role="function" condition="since:1.1.1">
<title>gcut_list_new&#160;()</title>
<indexterm zone="gcut-list-new" role="1.1.1"><primary>gcut_list_new</primary></indexterm>
<programlisting language="C"><link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
gcut_list_new (<parameter>const <link linkend="gpointer"><type>gpointer</type></link> element</parameter>,
               <parameter>...</parameter>);</programlisting>
<para>Creates a list from passed elements.</para>
<para>e.g.:</para>
<informalexample><programlisting><![CDATA[
GCutEgg *echo_egg, *cat_egg;

echo_egg = gcut_egg_new("echo", "Hello", NULL);
cat_egg = gcut_egg_new("cat", "/etc/hosts", NULL);
egg_list = gcut_list_new(echo_egg, cat_egg, NULL);
]]></programlisting></informalexample>
<para></para>
<refsect3 id="gcut-list-new.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>element</para></entry>
<entry role="parameter_description"><para>the first <link linkend="gpointer"><type>gpointer</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>...</para></entry>
<entry role="parameter_description"><para>remaining elements in list. <link linkend="NULL:CAPS"><literal>NULL</literal></link>-terminate.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gcut-list-new.returns" role="returns">
<title>Returns</title>
<para> a newly-allocated <link linkend="GList"><type>GList</type></link> that contains passed
elements.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.1.1">1.1.1</link></para></refsect2>
<refsect2 id="gcut-list-int-new" role="function" condition="since:1.1.5">
<title>gcut_list_int_new&#160;()</title>
<indexterm zone="gcut-list-int-new" role="1.1.5"><primary>gcut_list_int_new</primary></indexterm>
<programlisting language="C"><link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
gcut_list_int_new (<parameter><link linkend="guint"><type>guint</type></link> n</parameter>,
                   <parameter><link linkend="gint"><type>gint</type></link> value</parameter>,
                   <parameter>...</parameter>);</programlisting>
<para>Creates a list from passed integer values.</para>
<para>e.g.:</para>
<informalexample><programlisting><![CDATA[
gcut_list_int_new(3, -10, 1, 29); -> (-10, 1, 29)
]]></programlisting></informalexample>
<para></para>
<refsect3 id="gcut-list-int-new.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>n</para></entry>
<entry role="parameter_description"><para>the number of integer values.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>value</para></entry>
<entry role="parameter_description"><para>the first integer value.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>...</para></entry>
<entry role="parameter_description"><para>remaining integer values in list.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gcut-list-int-new.returns" role="returns">
<title>Returns</title>
<para> a newly-allocated <link linkend="GList"><type>GList</type></link> that contains passed
integer values and must be freed with <link linkend="g-list-free"><function>g_list_free()</function></link>.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.1.5">1.1.5</link></para></refsect2>
<refsect2 id="gcut-list-uint-new" role="function" condition="since:1.1.5">
<title>gcut_list_uint_new&#160;()</title>
<indexterm zone="gcut-list-uint-new" role="1.1.5"><primary>gcut_list_uint_new</primary></indexterm>
<programlisting language="C"><link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
gcut_list_uint_new (<parameter><link linkend="guint"><type>guint</type></link> n</parameter>,
                    <parameter><link linkend="guint"><type>guint</type></link> value</parameter>,
                    <parameter>...</parameter>);</programlisting>
<para>Creates a list from passed unsigned integer values.</para>
<para>e.g.:</para>
<informalexample><programlisting><![CDATA[
gcut_list_uint_new(3, 0, 1, 2); -> (0, 1, 2)
]]></programlisting></informalexample>
<para></para>
<refsect3 id="gcut-list-uint-new.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>n</para></entry>
<entry role="parameter_description"><para>the number of unsigned integer values.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>value</para></entry>
<entry role="parameter_description"><para>the first unsigned integer value.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>...</para></entry>
<entry role="parameter_description"><para>remaining unsigned integer values in list.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gcut-list-uint-new.returns" role="returns">
<title>Returns</title>
<para> a newly-allocated <link linkend="GList"><type>GList</type></link> that contains passed
unsigned integer values and must be freed with
<link linkend="g-list-free"><function>g_list_free()</function></link>.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.1.5">1.1.5</link></para></refsect2>
<refsect2 id="gcut-list-string-new" role="function" condition="since:1.0.3">
<title>gcut_list_string_new&#160;()</title>
<indexterm zone="gcut-list-string-new" role="1.0.3"><primary>gcut_list_string_new</primary></indexterm>
<programlisting language="C"><link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
gcut_list_string_new (<parameter>const <link linkend="gchar"><type>gchar</type></link> *value</parameter>,
                      <parameter>...</parameter>);</programlisting>
<para>Creates a list from passed strings.</para>
<refsect3 id="gcut-list-string-new.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>value</para></entry>
<entry role="parameter_description"><para>the first string.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>...</para></entry>
<entry role="parameter_description"><para>remaining strings in list. <link linkend="NULL:CAPS"><literal>NULL</literal></link>-terminate.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gcut-list-string-new.returns" role="returns">
<title>Returns</title>
<para> a newly-allocated <link linkend="GList"><type>GList</type></link> that contains passed
strings and must be freed with <link linkend="gcut-list-string-free"><function>gcut_list_string_free()</function></link>.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.0.3">1.0.3</link></para></refsect2>
<refsect2 id="gcut-list-string-new-array" role="function" condition="since:1.0.6">
<title>gcut_list_string_new_array&#160;()</title>
<indexterm zone="gcut-list-string-new-array" role="1.0.6"><primary>gcut_list_string_new_array</primary></indexterm>
<programlisting language="C"><link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
gcut_list_string_new_array (<parameter>const <link linkend="gchar"><type>gchar</type></link> **strings</parameter>);</programlisting>
<para>Creates a list from passed string array.</para>
<refsect3 id="gcut-list-string-new-array.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>strings</para></entry>
<entry role="parameter_description"><para>the string array. <link linkend="NULL:CAPS"><literal>NULL</literal></link>-terminate.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gcut-list-string-new-array.returns" role="returns">
<title>Returns</title>
<para> a newly-allocated <link linkend="GList"><type>GList</type></link> that contains passed
string array and must be freed with <link linkend="gcut-list-string-free"><function>gcut_list_string_free()</function></link>.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.0.6">1.0.6</link></para></refsect2>
<refsect2 id="gcut-take-new-list-int" role="function" condition="since:1.1.5">
<title>gcut_take_new_list_int&#160;()</title>
<indexterm zone="gcut-take-new-list-int" role="1.1.5"><primary>gcut_take_new_list_int</primary></indexterm>
<programlisting language="C">const <link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
gcut_take_new_list_int (<parameter><link linkend="guint"><type>guint</type></link> n</parameter>,
                        <parameter><link linkend="gint"><type>gint</type></link> value</parameter>,
                        <parameter>...</parameter>);</programlisting>
<para>Creates a list from passed integer values that is owned
by Cutter.</para>
<para>e.g.:</para>
<informalexample><programlisting><![CDATA[
gcut_take_new_list_int(3, -10, 1, 29); -> (-10, 1, 29)
]]></programlisting></informalexample>
<para></para>
<refsect3 id="gcut-take-new-list-int.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>n</para></entry>
<entry role="parameter_description"><para>the number of integer values.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>value</para></entry>
<entry role="parameter_description"><para>the first integer value.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>...</para></entry>
<entry role="parameter_description"><para>remaining strings in list.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gcut-take-new-list-int.returns" role="returns">
<title>Returns</title>
<para> a newly-allocated <link linkend="GList"><type>GList</type></link> that contains passed
integer values and is owned by Cutter.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.1.5">1.1.5</link></para></refsect2>
<refsect2 id="gcut-take-new-list-uint" role="function" condition="since:1.1.5">
<title>gcut_take_new_list_uint&#160;()</title>
<indexterm zone="gcut-take-new-list-uint" role="1.1.5"><primary>gcut_take_new_list_uint</primary></indexterm>
<programlisting language="C">const <link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
gcut_take_new_list_uint (<parameter><link linkend="guint"><type>guint</type></link> n</parameter>,
                         <parameter><link linkend="guint"><type>guint</type></link> value</parameter>,
                         <parameter>...</parameter>);</programlisting>
<para>Creates a list from passed unsigned integer values that
is owned by Cutter.</para>
<para>e.g.:</para>
<informalexample><programlisting><![CDATA[
gcut_take_new_list_uint(3, 0, 1, 2); -> (0, 1, 2)
]]></programlisting></informalexample>
<para></para>
<refsect3 id="gcut-take-new-list-uint.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>n</para></entry>
<entry role="parameter_description"><para>the number of unsigned integer values.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>value</para></entry>
<entry role="parameter_description"><para>the first unsigned integer value.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>...</para></entry>
<entry role="parameter_description"><para>remaining strings in list.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gcut-take-new-list-uint.returns" role="returns">
<title>Returns</title>
<para> a newly-allocated <link linkend="GList"><type>GList</type></link> that contains passed
unsigned integer values and is owned by Cutter.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.1.5">1.1.5</link></para></refsect2>
<refsect2 id="gcut-take-new-list-string" role="function" condition="since:1.0.5">
<title>gcut_take_new_list_string&#160;()</title>
<indexterm zone="gcut-take-new-list-string" role="1.0.5"><primary>gcut_take_new_list_string</primary></indexterm>
<programlisting language="C">const <link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
gcut_take_new_list_string (<parameter>const <link linkend="gchar"><type>gchar</type></link> *value</parameter>,
                           <parameter>...</parameter>);</programlisting>
<para>Creates a list from passed strings that is owned by
Cutter.</para>
<refsect3 id="gcut-take-new-list-string.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>value</para></entry>
<entry role="parameter_description"><para>the first string.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>...</para></entry>
<entry role="parameter_description"><para>remaining strings in list. <link linkend="NULL:CAPS"><literal>NULL</literal></link>-terminate.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gcut-take-new-list-string.returns" role="returns">
<title>Returns</title>
<para> a newly-allocated <link linkend="GList"><type>GList</type></link> that contains passed
strings and is owned by Cutter.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.0.5">1.0.5</link></para></refsect2>
<refsect2 id="gcut-take-new-list-string-backward-compatibility" role="macro" condition="deprecated:">
<title>gcut_take_new_list_string_backward_compatibility()</title>
<indexterm zone="gcut-take-new-list-string-backward-compatibility" role="deprecated"><primary>gcut_take_new_list_string_backward_compatibility</primary></indexterm>
<programlisting language="C">#define             gcut_take_new_list_string_backward_compatibility(value, ...)</programlisting>
<warning><para><literal>gcut_take_new_list_string_backward_compatibility</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
</para>
</refsect2>
<refsect2 id="gcut-take-new-list-string-array" role="function" condition="since:1.0.6">
<title>gcut_take_new_list_string_array&#160;()</title>
<indexterm zone="gcut-take-new-list-string-array" role="1.0.6"><primary>gcut_take_new_list_string_array</primary></indexterm>
<programlisting language="C">const <link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
gcut_take_new_list_string_array (<parameter>const <link linkend="gchar"><type>gchar</type></link> **strings</parameter>);</programlisting>
<para>Creates a list from passed string array that is owned by
Cutter.</para>
<refsect3 id="gcut-take-new-list-string-array.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>strings</para></entry>
<entry role="parameter_description"><para>the string array. <link linkend="NULL:CAPS"><literal>NULL</literal></link>-terminate.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gcut-take-new-list-string-array.returns" role="returns">
<title>Returns</title>
<para> a newly-allocated <link linkend="GList"><type>GList</type></link> that contains passed
string array and is owned by Cutter.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.0.6">1.0.6</link></para></refsect2>
<refsect2 id="gcut-take-new-list-object" role="macro" condition="since:1.1.1">
<title>gcut_take_new_list_object()</title>
<indexterm zone="gcut-take-new-list-object" role="1.1.1"><primary>gcut_take_new_list_object</primary></indexterm>
<programlisting language="C">#define             gcut_take_new_list_object(object, ...)</programlisting>
<para>Creates a list from passed objects that is owned by
Cutter.</para>
<refsect3 id="gcut-take-new-list-object.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>object</para></entry>
<entry role="parameter_description"><para>the first <link linkend="GObject"><type>GObject</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>...</para></entry>
<entry role="parameter_description"><para>remaining objects in list. <link linkend="NULL:CAPS"><literal>NULL</literal></link>-terminate.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gcut-take-new-list-object.returns" role="returns">
<title>Returns</title>
<para> a newly-allocated <link linkend="GList"><type>GList</type></link> that contains passed
objects and is owned by Cutter.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.1.1">1.1.1</link></para></refsect2>
<refsect2 id="gcut-list-string-free" role="function" condition="since:1.0.3">
<title>gcut_list_string_free&#160;()</title>
<indexterm zone="gcut-list-string-free" role="1.0.3"><primary>gcut_list_string_free</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gcut_list_string_free (<parameter><link linkend="GList"><type>GList</type></link> *list</parameter>);</programlisting>
<para>Frees <parameter>list</parameter>
 and contained strings.</para>
<refsect3 id="gcut-list-string-free.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>list</para></entry>
<entry role="parameter_description"><para>the list that contains strings to be freed.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.0.3">1.0.3</link></para></refsect2>
<refsect2 id="gcut-list-object-free" role="function" condition="since:1.1.1">
<title>gcut_list_object_free&#160;()</title>
<indexterm zone="gcut-list-object-free" role="1.1.1"><primary>gcut_list_object_free</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gcut_list_object_free (<parameter><link linkend="GList"><type>GList</type></link> *list</parameter>);</programlisting>
<para>Frees <parameter>list</parameter>
 and contained objects. It's safe that <parameter>list</parameter>

contains <link linkend="NULL:CAPS"><literal>NULL</literal></link>.</para>
<refsect3 id="gcut-list-object-free.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>list</para></entry>
<entry role="parameter_description"><para>the list that contains <link linkend="GObject"><type>GObject</type></link>'s to be unrefed.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.1.1">1.1.1</link></para></refsect2>
<refsect2 id="gcut-hash-table-string-string-new" role="function" condition="since:1.0.4">
<title>gcut_hash_table_string_string_new&#160;()</title>
<indexterm zone="gcut-hash-table-string-string-new" role="1.0.4"><primary>gcut_hash_table_string_string_new</primary></indexterm>
<programlisting language="C"><link linkend="GHashTable"><returnvalue>GHashTable</returnvalue></link>&#160;*
gcut_hash_table_string_string_new (<parameter>const <link linkend="gchar"><type>gchar</type></link> *key</parameter>,
                                   <parameter>...</parameter>);</programlisting>
<para>Creates a hash table that has string key and string value
from passed key/value pairs.</para>
<refsect3 id="gcut-hash-table-string-string-new.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>key</para></entry>
<entry role="parameter_description"><para>The first key string.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>...</para></entry>
<entry role="parameter_description"><para>A <link linkend="NULL:CAPS"><literal>NULL</literal></link>-terminated list of rest arguments. The
first item is the string value of the first key,
followed optionally by more key/value pairs. It
must end with <link linkend="NULL:CAPS"><literal>NULL</literal></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gcut-hash-table-string-string-new.returns" role="returns">
<title>Returns</title>
<para> a newly-allocated <link linkend="GHashTable"><type>GHashTable</type></link> that contains
passed key/value pairs and must be freed with
<link linkend="g-hash-table-unref"><function>g_hash_table_unref()</function></link>.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.0.4">1.0.4</link></para></refsect2>
<refsect2 id="gcut-hash-table-string-string-new-va-list" role="function" condition="since:1.0.5">
<title>gcut_hash_table_string_string_new_va_list&#160;()</title>
<indexterm zone="gcut-hash-table-string-string-new-va-list" role="1.0.5"><primary>gcut_hash_table_string_string_new_va_list</primary></indexterm>
<programlisting language="C"><link linkend="GHashTable"><returnvalue>GHashTable</returnvalue></link>&#160;*
gcut_hash_table_string_string_new_va_list
                               (<parameter>const <link linkend="gchar"><type>gchar</type></link> *key</parameter>,
                                <parameter><link linkend="va-list"><type>va_list</type></link> args</parameter>);</programlisting>
<para>Creates a hash table that has string key and string value
from passed key/value pairs.</para>
<refsect3 id="gcut-hash-table-string-string-new-va-list.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>key</para></entry>
<entry role="parameter_description"><para>The first key string.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>args</para></entry>
<entry role="parameter_description"><para>A <link linkend="NULL:CAPS"><literal>NULL</literal></link>-terminated list of rest arguments. The
first item is the string value of the first key,
followed optionally by more key/value pairs. It
must end with <link linkend="NULL:CAPS"><literal>NULL</literal></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gcut-hash-table-string-string-new-va-list.returns" role="returns">
<title>Returns</title>
<para> a newly-allocated <link linkend="GHashTable"><type>GHashTable</type></link> that contains
passed key/value pairs and must be freed with
<link linkend="g-hash-table-unref"><function>g_hash_table_unref()</function></link>.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.0.5">1.0.5</link></para></refsect2>
<refsect2 id="gcut-take-new-hash-table-string-string" role="function" condition="since:1.0.5">
<title>gcut_take_new_hash_table_string_string&#160;()</title>
<indexterm zone="gcut-take-new-hash-table-string-string" role="1.0.5"><primary>gcut_take_new_hash_table_string_string</primary></indexterm>
<programlisting language="C"><link linkend="GHashTable"><returnvalue>GHashTable</returnvalue></link>&#160;*
gcut_take_new_hash_table_string_string
                               (<parameter>const <link linkend="gchar"><type>gchar</type></link> *key</parameter>,
                                <parameter>...</parameter>);</programlisting>
<para>Creates a hash table that has string key and string value
from passed key/value pairs. The created hash table is
owned by Cutter. So don't <link linkend="g-hash-table-unref"><function>g_hash_table_unref()</function></link> it.</para>
<refsect3 id="gcut-take-new-hash-table-string-string.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>key</para></entry>
<entry role="parameter_description"><para>The first key string.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>...</para></entry>
<entry role="parameter_description"><para>A <link linkend="NULL:CAPS"><literal>NULL</literal></link>-terminated list of rest arguments. The
string value of the first key, followed optionally
by more key/value pairs. It must end with <link linkend="NULL:CAPS"><literal>NULL</literal></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gcut-take-new-hash-table-string-string.returns" role="returns">
<title>Returns</title>
<para> a newly-allocated <link linkend="GHashTable"><type>GHashTable</type></link> that contains
passed key/value pairs.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.0.5">1.0.5</link></para></refsect2>
<refsect2 id="gcut-get-fixture-data" role="macro" condition="since:1.1.6">
<title>gcut_get_fixture_data()</title>
<indexterm zone="gcut-get-fixture-data" role="1.1.6"><primary>gcut_get_fixture_data</primary></indexterm>
<programlisting language="C">#define             gcut_get_fixture_data(...)</programlisting>
<para>Reads the fixture data at "<parameter>path</parameter>
/..." and returns it as a
<link linkend="GString"><type>GString</type></link> that is owned by Cutter. The description of
<link linkend="cut-build-fixture-path"><function>cut_build_fixture_path()</function></link> shows how the fixture data path
is determined.</para>
<refsect3 id="gcut-get-fixture-data.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>...</para></entry>
<entry role="parameter_description"><para>remaining elements in path.
<link linkend="NULL:CAPS"><literal>NULL</literal></link>-terminate is required.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gcut-get-fixture-data.returns" role="returns">
<title>Returns</title>
<para> a content of the fixture data as <link linkend="GString"><type>GString</type></link> owend by
Cutter. Don't free it.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.1.6">1.1.6</link></para></refsect2>

</refsect1>
<refsect1 id="cutter-Test-Utilities-with-GLib-support.other_details" role="details">
<title role="details.title">Types and Values</title>

</refsect1>

</refentry>
