• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>BOOST_&lt;level&gt;_GT</title>
5<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="../../../index.html" title="Boost.Test">
8<link rel="up" href="../testing_tool_ref.html" title="Reference API for writing tests">
9<link rel="prev" href="assertion_boost_level_ge.html" title="BOOST_&lt;level&gt;_GE">
10<link rel="next" href="assertion_boost_level_le.html" title="BOOST_&lt;level&gt;_LE">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr>
14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
15<td align="center"><a href="../../../../../../../index.html">Home</a></td>
16<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="assertion_boost_level_ge.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../testing_tool_ref.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="assertion_boost_level_le.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h4 class="title">
27<a name="boost_test.utf_reference.testing_tool_ref.assertion_boost_level_gt"></a><a class="link" href="assertion_boost_level_gt.html" title="BOOST_&lt;level&gt;_GT"><code class="computeroutput"><span class="identifier">BOOST_</span><span class="special">&lt;</span><span class="identifier">level</span><span class="special">&gt;</span><span class="identifier">_GT</span></code></a>
28</h4></div></div></div>
29<pre class="programlisting"><span class="identifier">BOOST_WARN_GT</span><span class="special">(</span><span class="identifier">left</span><span class="special">,</span> <span class="identifier">right</span><span class="special">);</span>
30<span class="identifier">BOOST_CHECK_GT</span><span class="special">(</span><span class="identifier">left</span><span class="special">,</span> <span class="identifier">right</span><span class="special">);</span>
31<span class="identifier">BOOST_REQUIRE_GT</span><span class="special">(</span><span class="identifier">left</span><span class="special">,</span> <span class="identifier">right</span><span class="special">);</span>
32</pre>
33<p>
34          Check performed by these tools is the same as the one performed by <a class="link" href="assertion_boost_level.html" title="BOOST_&lt;level&gt;"><code class="computeroutput"><span class="identifier">BOOST_</span><span class="special">&lt;</span><span class="identifier">level</span><span class="special">&gt;</span></code></a><code class="computeroutput"><span class="special">(</span> <span class="identifier">left</span> <span class="special">&gt;</span> <span class="identifier">right</span>
35          <span class="special">)</span></code>. The difference is that the argument
36          values are reported as well.
37        </p>
38<h6>
39<a name="boost_test.utf_reference.testing_tool_ref.assertion_boost_level_gt.h0"></a>
40          <span class="phrase"><a name="boost_test.utf_reference.testing_tool_ref.assertion_boost_level_gt.example_descr"></a></span><a class="link" href="assertion_boost_level_gt.html#boost_test.utf_reference.testing_tool_ref.assertion_boost_level_gt.example_descr">Example:
41          BOOST_&lt;level&gt;_GT usage</a>
42        </h6>
43<div class="informaltable"><table class="table">
44<colgroup><col></colgroup>
45<thead><tr><th>
46                  <p>
47                    Code
48                  </p>
49                </th></tr></thead>
50<tbody><tr><td>
51<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_TEST_MODULE</span> <span class="identifier">example</span>
52<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">test</span><span class="special">/</span><span class="identifier">included</span><span class="special">/</span><span class="identifier">unit_test</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
53
54<span class="identifier">BOOST_AUTO_TEST_CASE</span><span class="special">(</span> <span class="identifier">test</span> <span class="special">)</span>
55<span class="special">{</span>
56  <span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span>
57  <span class="keyword">int</span> <span class="identifier">j</span> <span class="special">=</span> <span class="number">14</span><span class="special">;</span>
58  <span class="identifier">BOOST_CHECK_GT</span><span class="special">(</span> <span class="identifier">i</span><span class="special">,</span> <span class="identifier">j</span> <span class="special">);</span>
59<span class="special">}</span>
60</pre>
61                </td></tr></tbody>
62</table></div>
63<div class="informaltable"><table class="table">
64<colgroup><col></colgroup>
65<thead><tr><th>
66                  <p>
67                    Output
68                  </p>
69                </th></tr></thead>
70<tbody><tr><td>
71<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="special">&gt;</span><span class="identifier">example</span>
72<span class="identifier">Running</span> <span class="number">1</span> <span class="identifier">test</span> <span class="keyword">case</span><span class="special">...</span>
73<span class="identifier">test</span><span class="special">.</span><span class="identifier">cpp</span><span class="special">(</span><span class="number">10</span><span class="special">):</span> <span class="identifier">error</span> <span class="identifier">in</span> <span class="string">"test"</span><span class="special">:</span> <span class="identifier">check</span> <span class="identifier">i</span> <span class="special">&gt;</span> <span class="identifier">j</span> <span class="identifier">failed</span> <span class="special">[</span><span class="number">2</span> <span class="special">&lt;</span> <span class="number">14</span><span class="special">]</span>
74
75<span class="special">***</span> <span class="number">1</span> <span class="identifier">failures</span> <span class="identifier">is</span> <span class="identifier">detected</span> <span class="identifier">in</span> <span class="identifier">test</span> <span class="identifier">suite</span> <span class="string">"example"</span>
76</pre>
77                </td></tr></tbody>
78</table></div>
79<p>
80          See also:
81        </p>
82<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
83<li class="listitem">
84              <a class="link" href="assertion_boost_level_le.html" title="BOOST_&lt;level&gt;_LE"><code class="computeroutput"><span class="identifier">BOOST_</span><span class="special">&lt;</span><span class="identifier">level</span><span class="special">&gt;</span><span class="identifier">_LE</span></code></a>
85            </li>
86<li class="listitem">
87              <a class="link" href="assertion_boost_level_lt.html" title="BOOST_&lt;level&gt;_LT"><code class="computeroutput"><span class="identifier">BOOST_</span><span class="special">&lt;</span><span class="identifier">level</span><span class="special">&gt;</span><span class="identifier">_LT</span></code></a>
88            </li>
89<li class="listitem">
90              <a class="link" href="assertion_boost_level_ge.html" title="BOOST_&lt;level&gt;_GE"><code class="computeroutput"><span class="identifier">BOOST_</span><span class="special">&lt;</span><span class="identifier">level</span><span class="special">&gt;</span><span class="identifier">_GE</span></code></a>
91            </li>
92</ul></div>
93</div>
94<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
95<td align="left"></td>
96<td align="right"><div class="copyright-footer">Copyright © 2001-2020 Boost.Test contributors<p>
97        Distributed under the Boost Software License, Version 1.0. (See accompanying
98        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
99      </p>
100</div></td>
101</tr></table>
102<hr>
103<div class="spirit-nav">
104<a accesskey="p" href="assertion_boost_level_ge.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../testing_tool_ref.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="assertion_boost_level_le.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
105</div>
106</body>
107</html>
108