xref: /freebsd/contrib/lutok/api-docs/html/a00056_source.html (revision 132f818ddbf457ee67d502cd89b5a18e0a34713d)
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<meta http-equiv="X-UA-Compatible" content="IE=11"/>
6<meta name="generator" content="Doxygen 1.9.6"/>
7<meta name="viewport" content="width=device-width, initial-scale=1"/>
8<title>Lutok: test_utils.hpp Source File</title>
9<link href="tabs.css" rel="stylesheet" type="text/css"/>
10<script type="text/javascript" src="jquery.js"></script>
11<script type="text/javascript" src="dynsections.js"></script>
12<link href="search/search.css" rel="stylesheet" type="text/css"/>
13<script type="text/javascript" src="search/searchdata.js"></script>
14<script type="text/javascript" src="search/search.js"></script>
15<link href="doxygen.css" rel="stylesheet" type="text/css" />
16</head>
17<body>
18<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
19<div id="titlearea">
20<table cellspacing="0" cellpadding="0">
21 <tbody>
22 <tr id="projectrow">
23  <td id="projectalign">
24   <div id="projectname">Lutok<span id="projectnumber">&#160;0.6.2</span>
25   </div>
26  </td>
27 </tr>
28 </tbody>
29</table>
30</div>
31<!-- end header part -->
32<!-- Generated by Doxygen 1.9.6 -->
33<script type="text/javascript">
34/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
35var searchBox = new SearchBox("searchBox", "search/",'.html');
36/* @license-end */
37</script>
38<script type="text/javascript" src="menudata.js"></script>
39<script type="text/javascript" src="menu.js"></script>
40<script type="text/javascript">
41/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
42$(function() {
43  initMenu('',true,false,'search.php','Search');
44  $(document).ready(function() { init_search(); });
45});
46/* @license-end */
47</script>
48<div id="main-nav"></div>
49</div><!-- top -->
50<!-- window showing the filter options -->
51<div id="MSearchSelectWindow"
52     onmouseover="return searchBox.OnSearchSelectShow()"
53     onmouseout="return searchBox.OnSearchSelectHide()"
54     onkeydown="return searchBox.OnSearchSelectKey(event)">
55</div>
56
57<!-- iframe showing the search results (closed by default) -->
58<div id="MSearchResultsWindow">
59<div id="MSearchResults">
60<div class="SRPage">
61<div id="SRIndex">
62<div id="SRResults"></div>
63<div class="SRStatus" id="Loading">Loading...</div>
64<div class="SRStatus" id="Searching">Searching...</div>
65<div class="SRStatus" id="NoMatches">No Matches</div>
66</div>
67</div>
68</div>
69</div>
70
71<div class="header">
72  <div class="headertitle"><div class="title">test_utils.hpp</div></div>
73</div><!--header-->
74<div class="contents">
75<a href="a00056.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">// Copyright 2011 Google Inc.</span></div>
76<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment">// All rights reserved.</span></div>
77<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment">//</span></div>
78<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment">// Redistribution and use in source and binary forms, with or without</span></div>
79<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment">// modification, are permitted provided that the following conditions are</span></div>
80<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="comment">// met:</span></div>
81<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="comment">//</span></div>
82<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="comment">// * Redistributions of source code must retain the above copyright</span></div>
83<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="comment">//   notice, this list of conditions and the following disclaimer.</span></div>
84<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="comment">// * Redistributions in binary form must reproduce the above copyright</span></div>
85<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="comment">//   notice, this list of conditions and the following disclaimer in the</span></div>
86<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="comment">//   documentation and/or other materials provided with the distribution.</span></div>
87<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="comment">// * Neither the name of Google Inc. nor the names of its contributors</span></div>
88<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="comment">//   may be used to endorse or promote products derived from this software</span></div>
89<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="comment">//   without specific prior written permission.</span></div>
90<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span><span class="comment">//</span></div>
91<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="comment">// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS</span></div>
92<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="comment">// &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT</span></div>
93<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span><span class="comment">// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR</span></div>
94<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span><span class="comment">// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT</span></div>
95<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span><span class="comment">// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</span></div>
96<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span><span class="comment">// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</span></div>
97<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span><span class="comment">// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,</span></div>
98<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span><span class="comment">// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY</span></div>
99<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span><span class="comment">// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span></div>
100<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span><span class="comment">// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE</span></div>
101<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span><span class="comment">// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></div>
102<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span> </div>
103<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span> </div>
104<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span><span class="preprocessor">#if !defined(LUTOK_TEST_UTILS_HPP)</span></div>
105<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span><span class="preprocessor">#   define LUTOK_TEST_UTILS_HPP</span></div>
106<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span><span class="preprocessor">#else</span></div>
107<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span><span class="preprocessor">#   error &quot;test_utils.hpp can only be included once&quot;</span></div>
108<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span><span class="preprocessor">#endif</span></div>
109<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span> </div>
110<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span><span class="preprocessor">#include &lt;atf-c++.hpp&gt;</span></div>
111<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span> </div>
112<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span><span class="preprocessor">#include &quot;<a class="code" href="a00032.html">c_gate.hpp</a>&quot;</span></div>
113<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span><span class="preprocessor">#include &quot;<a class="code" href="a00053.html">exceptions.hpp</a>&quot;</span></div>
114<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span><span class="preprocessor">#include &quot;<a class="code" href="a00029.html">state.hpp</a>&quot;</span></div>
115<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span> </div>
116<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span> </div>
117<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"><a class="line" href="a00067.html">   49</a></span><span class="keyword">namespace </span>{</div>
118<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span> </div>
119<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span> </div>
120<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"><a class="line" href="a00056.html#a8f10eccfd8799f9631163705fb92ea5a">   61</a></span><span class="preprocessor">#define REQUIRE_API_ERROR(exp_api_function, statement) \</span></div>
121<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span><span class="preprocessor">    do { \</span></div>
122<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span><span class="preprocessor">        try { \</span></div>
123<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span><span class="preprocessor">            statement; \</span></div>
124<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span><span class="preprocessor">            ATF_FAIL(&quot;api_error not raised by &quot;</span> #statement); \</div>
125<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span>        } catch (const lutok::api_error&amp; api_error) { \</div>
126<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span>            ATF_REQUIRE_EQ(exp_api_function, api_error.api_function()); \</div>
127<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span>        } \</div>
128<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span>    } while (0)</div>
129<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span> </div>
130<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span> </div>
131<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span><span class="keyword">static</span> <span class="keyword">inline</span> lua_State*</div>
132<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"><a class="line" href="a00067.html#a790da0edff2966ce9a413e689d522c19">   80</a></span><a class="code hl_function" href="a00067.html#a790da0edff2966ce9a413e689d522c19">raw</a>(<a class="code hl_class" href="a00919.html">lutok::state</a>&amp; state)</div>
133<div class="line"><a id="l00081" name="l00081"></a><span class="lineno">   81</span>{</div>
134<div class="line"><a id="l00082" name="l00082"></a><span class="lineno">   82</span>    <span class="keywordflow">return</span> <a class="code hl_class" href="a00883.html">lutok::state_c_gate</a>(state).<a class="code hl_function" href="a00883.html#a9ca464b39c2f2ee1326590893d12aeba">c_state</a>();</div>
135<div class="line"><a id="l00083" name="l00083"></a><span class="lineno">   83</span>}</div>
136<div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span> </div>
137<div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span> </div>
138<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"><a class="line" href="a00923.html">   92</a></span><span class="keyword">class </span><a class="code hl_class" href="a00923.html">stack_balance_checker</a> {</div>
139<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"><a class="line" href="a00923.html#a5a82e10af0379f4961958389b461ad7b">   94</a></span>    <a class="code hl_class" href="a00919.html">lutok::state</a>&amp; <a class="code hl_variable" href="a00923.html#a5a82e10af0379f4961958389b461ad7b">_state</a>;</div>
140<div class="line"><a id="l00095" name="l00095"></a><span class="lineno">   95</span> </div>
141<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"><a class="line" href="a00923.html#ae83eb0b565eeec675516b790d5526391">   97</a></span>    <span class="keywordtype">bool</span> <a class="code hl_variable" href="a00923.html#ae83eb0b565eeec675516b790d5526391">_with_sentinel</a>;</div>
142<div class="line"><a id="l00098" name="l00098"></a><span class="lineno">   98</span> </div>
143<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"><a class="line" href="a00923.html#ab9d0aae743f764d0b7a71e9c2202f9d9">  100</a></span>    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="a00923.html#ab9d0aae743f764d0b7a71e9c2202f9d9">_old_count</a>;</div>
144<div class="line"><a id="l00101" name="l00101"></a><span class="lineno">  101</span> </div>
145<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span><span class="keyword">public</span>:</div>
146<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"><a class="line" href="a00923.html#a1801f4117fb8801b914c7a834992fc1f">  110</a></span>    <a class="code hl_function" href="a00923.html#a1801f4117fb8801b914c7a834992fc1f">stack_balance_checker</a>(<a class="code hl_class" href="a00919.html">lutok::state</a>&amp; state_,</div>
147<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span>                          <span class="keyword">const</span> <span class="keywordtype">bool</span> with_sentinel_ = <span class="keyword">true</span>) :</div>
148<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span>        _state(state_),</div>
149<div class="line"><a id="l00113" name="l00113"></a><span class="lineno">  113</span>        _with_sentinel(with_sentinel_),</div>
150<div class="line"><a id="l00114" name="l00114"></a><span class="lineno">  114</span>        _old_count(_state.get_top())</div>
151<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span>    {</div>
152<div class="line"><a id="l00116" name="l00116"></a><span class="lineno">  116</span>        <span class="keywordflow">if</span> (_with_sentinel)</div>
153<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span>            _state.<a class="code hl_function" href="a00919.html#a5c5b08f88a143cb48a600c044e2e3a56">push_integer</a>(987654321);</div>
154<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span>    }</div>
155<div class="line"><a id="l00119" name="l00119"></a><span class="lineno">  119</span> </div>
156<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"><a class="line" href="a00923.html#a4a77624ad3c7c3968056993d05b8d076">  124</a></span>    <a class="code hl_function" href="a00923.html#a4a77624ad3c7c3968056993d05b8d076">~stack_balance_checker</a>(<span class="keywordtype">void</span>)</div>
157<div class="line"><a id="l00125" name="l00125"></a><span class="lineno">  125</span>    {</div>
158<div class="line"><a id="l00126" name="l00126"></a><span class="lineno">  126</span>        <span class="keywordflow">if</span> (_with_sentinel) {</div>
159<div class="line"><a id="l00127" name="l00127"></a><span class="lineno">  127</span>            <span class="keywordflow">if</span> (!_state.<a class="code hl_function" href="a00919.html#acd31e0953ee71c94903e5444bf451eb1">is_number</a>(-1) || _state.<a class="code hl_function" href="a00919.html#ad947a5fb78835427838e4e10b16cc34a">to_integer</a>(-1) != 987654321)</div>
160<div class="line"><a id="l00128" name="l00128"></a><span class="lineno">  128</span>                ATF_FAIL(<span class="stringliteral">&quot;Stack corrupted: sentinel not found&quot;</span>);</div>
161<div class="line"><a id="l00129" name="l00129"></a><span class="lineno">  129</span>            _state.<a class="code hl_function" href="a00919.html#ac07258b143ef607dd9f6a9e24e495c20">pop</a>(1);</div>
162<div class="line"><a id="l00130" name="l00130"></a><span class="lineno">  130</span>        }</div>
163<div class="line"><a id="l00131" name="l00131"></a><span class="lineno">  131</span> </div>
164<div class="line"><a id="l00132" name="l00132"></a><span class="lineno">  132</span>        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> new_count = _state.<a class="code hl_function" href="a00919.html#af8591bfdccb2e8732c147a8a6623b2e5">get_top</a>();</div>
165<div class="line"><a id="l00133" name="l00133"></a><span class="lineno">  133</span>        <span class="keywordflow">if</span> (_old_count != new_count)</div>
166<div class="line"><a id="l00134" name="l00134"></a><span class="lineno">  134</span>            <span class="comment">//ATF_FAIL(F(&quot;Stack not balanced: before %d, after %d&quot;) %</span></div>
167<div class="line"><a id="l00135" name="l00135"></a><span class="lineno">  135</span>            <span class="comment">//         _old_count % new_count);</span></div>
168<div class="line"><a id="l00136" name="l00136"></a><span class="lineno">  136</span>            ATF_FAIL(<span class="stringliteral">&quot;Stack not balanced&quot;</span>);</div>
169<div class="line"><a id="l00137" name="l00137"></a><span class="lineno">  137</span>    }</div>
170<div class="line"><a id="l00138" name="l00138"></a><span class="lineno">  138</span>};</div>
171<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span> </div>
172<div class="line"><a id="l00140" name="l00140"></a><span class="lineno">  140</span> </div>
173<div class="line"><a id="l00141" name="l00141"></a><span class="lineno">  141</span>}  <span class="comment">// anonymous namespace</span></div>
174<div class="ttc" id="aa00029_html"><div class="ttname"><a href="a00029.html">state.hpp</a></div><div class="ttdoc">Provides the state wrapper class for the Lua C state.</div></div>
175<div class="ttc" id="aa00032_html"><div class="ttname"><a href="a00032.html">c_gate.hpp</a></div><div class="ttdoc">Provides direct access to the C state of the Lua wrappers.</div></div>
176<div class="ttc" id="aa00053_html"><div class="ttname"><a href="a00053.html">exceptions.hpp</a></div><div class="ttdoc">Exception types raised by lutok.</div></div>
177<div class="ttc" id="aa00067_html_a790da0edff2966ce9a413e689d522c19"><div class="ttname"><a href="a00067.html#a790da0edff2966ce9a413e689d522c19">anonymous_namespace{test_utils.hpp}::raw</a></div><div class="ttdeci">static lua_State * raw(lutok::state &amp;state)</div><div class="ttdoc">Gets the pointer to the internal lua_State of a state object.</div><div class="ttdef"><b>Definition:</b> test_utils.hpp:80</div></div>
178<div class="ttc" id="aa00883_html"><div class="ttname"><a href="a00883.html">lutok::state_c_gate</a></div><div class="ttdoc">Gateway to the raw C state of Lua.</div><div class="ttdef"><b>Definition:</b> c_gate.hpp:55</div></div>
179<div class="ttc" id="aa00883_html_a9ca464b39c2f2ee1326590893d12aeba"><div class="ttname"><a href="a00883.html#a9ca464b39c2f2ee1326590893d12aeba">lutok::state_c_gate::c_state</a></div><div class="ttdeci">lua_State * c_state(void)</div><div class="ttdoc">Returns the C native Lua state.</div><div class="ttdef"><b>Definition:</b> c_gate.cpp:73</div></div>
180<div class="ttc" id="aa00919_html"><div class="ttname"><a href="a00919.html">lutok::state</a></div><div class="ttdoc">A RAII model for the Lua state.</div><div class="ttdef"><b>Definition:</b> state.hpp:71</div></div>
181<div class="ttc" id="aa00919_html_a5c5b08f88a143cb48a600c044e2e3a56"><div class="ttname"><a href="a00919.html#a5c5b08f88a143cb48a600c044e2e3a56">lutok::state::push_integer</a></div><div class="ttdeci">void push_integer(const int)</div><div class="ttdoc">Wrapper around lua_pushinteger.</div><div class="ttdef"><b>Definition:</b> state.cpp:709</div></div>
182<div class="ttc" id="aa00919_html_ac07258b143ef607dd9f6a9e24e495c20"><div class="ttname"><a href="a00919.html#ac07258b143ef607dd9f6a9e24e495c20">lutok::state::pop</a></div><div class="ttdeci">void pop(const int)</div><div class="ttdoc">Wrapper around lua_pop.</div><div class="ttdef"><b>Definition:</b> state.cpp:654</div></div>
183<div class="ttc" id="aa00919_html_acd31e0953ee71c94903e5444bf451eb1"><div class="ttname"><a href="a00919.html#acd31e0953ee71c94903e5444bf451eb1">lutok::state::is_number</a></div><div class="ttdeci">bool is_number(const int)</div><div class="ttdoc">Wrapper around lua_isnumber.</div><div class="ttdef"><b>Definition:</b> state.cpp:442</div></div>
184<div class="ttc" id="aa00919_html_ad947a5fb78835427838e4e10b16cc34a"><div class="ttname"><a href="a00919.html#ad947a5fb78835427838e4e10b16cc34a">lutok::state::to_integer</a></div><div class="ttdeci">long to_integer(const int)</div><div class="ttdoc">Wrapper around lua_tointeger.</div><div class="ttdef"><b>Definition:</b> state.cpp:838</div></div>
185<div class="ttc" id="aa00919_html_af8591bfdccb2e8732c147a8a6623b2e5"><div class="ttname"><a href="a00919.html#af8591bfdccb2e8732c147a8a6623b2e5">lutok::state::get_top</a></div><div class="ttdeci">int get_top(void)</div><div class="ttdoc">Wrapper around lua_gettop.</div><div class="ttdef"><b>Definition:</b> state.cpp:384</div></div>
186<div class="ttc" id="aa00923_html"><div class="ttname"><a href="a00923.html">anonymous_namespace{test_utils.hpp}::stack_balance_checker</a></div><div class="ttdoc">Ensures that the Lua stack maintains its original height upon exit.</div><div class="ttdef"><b>Definition:</b> test_utils.hpp:92</div></div>
187<div class="ttc" id="aa00923_html_a1801f4117fb8801b914c7a834992fc1f"><div class="ttname"><a href="a00923.html#a1801f4117fb8801b914c7a834992fc1f">anonymous_namespace{test_utils.hpp}::stack_balance_checker::stack_balance_checker</a></div><div class="ttdeci">stack_balance_checker(lutok::state &amp;state_, const bool with_sentinel_=true)</div><div class="ttdoc">Constructs a new stack balance checker.</div><div class="ttdef"><b>Definition:</b> test_utils.hpp:110</div></div>
188<div class="ttc" id="aa00923_html_a4a77624ad3c7c3968056993d05b8d076"><div class="ttname"><a href="a00923.html#a4a77624ad3c7c3968056993d05b8d076">anonymous_namespace{test_utils.hpp}::stack_balance_checker::~stack_balance_checker</a></div><div class="ttdeci">~stack_balance_checker(void)</div><div class="ttdoc">Destructor for the object.</div><div class="ttdef"><b>Definition:</b> test_utils.hpp:124</div></div>
189<div class="ttc" id="aa00923_html_a5a82e10af0379f4961958389b461ad7b"><div class="ttname"><a href="a00923.html#a5a82e10af0379f4961958389b461ad7b">anonymous_namespace{test_utils.hpp}::stack_balance_checker::_state</a></div><div class="ttdeci">lutok::state &amp; _state</div><div class="ttdoc">The Lua state.</div><div class="ttdef"><b>Definition:</b> test_utils.hpp:94</div></div>
190<div class="ttc" id="aa00923_html_ab9d0aae743f764d0b7a71e9c2202f9d9"><div class="ttname"><a href="a00923.html#ab9d0aae743f764d0b7a71e9c2202f9d9">anonymous_namespace{test_utils.hpp}::stack_balance_checker::_old_count</a></div><div class="ttdeci">unsigned int _old_count</div><div class="ttdoc">The height of the stack on creation.</div><div class="ttdef"><b>Definition:</b> test_utils.hpp:100</div></div>
191<div class="ttc" id="aa00923_html_ae83eb0b565eeec675516b790d5526391"><div class="ttname"><a href="a00923.html#ae83eb0b565eeec675516b790d5526391">anonymous_namespace{test_utils.hpp}::stack_balance_checker::_with_sentinel</a></div><div class="ttdeci">bool _with_sentinel</div><div class="ttdoc">Whether to install a sentinel on the stack for balance enforcement.</div><div class="ttdef"><b>Definition:</b> test_utils.hpp:97</div></div>
192</div><!-- fragment --></div><!-- contents -->
193<!-- start footer part -->
194<hr class="footer"/><address class="footer"><small>
195Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6
196</small></address>
197</body>
198</html>
199