270 lines
4.3 KiB
HTML
270 lines
4.3 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html>
|
|
<head>
|
|
<title>Luadocs for utils/test.lua</title>
|
|
<link rel="stylesheet" href="../../luadoc.css" type="text/css" />
|
|
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
|
</head>
|
|
|
|
<body>
|
|
<div id="container">
|
|
|
|
<div id="product">
|
|
<div id="product_logo"></div>
|
|
<div id="product_name"><big><b></b></big></div>
|
|
<div id="product_description"></div>
|
|
</div> <!-- id="product" -->
|
|
|
|
<div id="main">
|
|
|
|
<div id="navigation">
|
|
|
|
|
|
<h1>LuaDoc</h1>
|
|
<ul>
|
|
|
|
<li><a href="../../index.html">Index</a></li>
|
|
|
|
</ul>
|
|
|
|
|
|
<!-- Module list -->
|
|
|
|
|
|
|
|
<!-- File list -->
|
|
|
|
<h1>Files</h1>
|
|
<ul>
|
|
|
|
<li>
|
|
<a href="../../files/utils/blockedcache.html">utils/blockedcache.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/blockutil.html">utils/blockutil.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/constants.html">utils/constants.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/fisheryates.html">utils/fisheryates.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/init.html">utils/init.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/interpolate.html">utils/interpolate.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/list.html">utils/list.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/log.html">utils/log.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/mapmanipulator.html">utils/mapmanipulator.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/mathutil.html">utils/mathutil.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/noisemanager.html">utils/noisemanager.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/scatterer.html">utils/scatterer.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/stopwatch.html">utils/stopwatch.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/stringutil.html">utils/stringutil.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/tableutil.html">utils/tableutil.lua</a>
|
|
</li>
|
|
|
|
<li><strong>utils/test.lua</strong></li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/transform.html">utils/transform.lua</a>
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div> <!-- id="navigation" -->
|
|
|
|
<div id="content">
|
|
|
|
<h1>File <code>utils/test.lua</code></h1>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h2>Functions</h2>
|
|
<table class="function_list">
|
|
|
|
<tr>
|
|
<td class="name" nowrap><a href="#test.equals">test.equals</a> (expected, actual, message)</td>
|
|
<td class="summary">Test if the given value matches the given expected value.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="name" nowrap><a href="#test.run">test.run</a> (name, test_method)</td>
|
|
<td class="summary">Runs the given method and prints a formatted information including the name.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="name" nowrap><a href="#test.start">test.start</a> (name)</td>
|
|
<td class="summary">Prints the given name as header.</td>
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<br/>
|
|
<br/>
|
|
|
|
|
|
|
|
|
|
<h2><a name="functions"></a>Functions</h2>
|
|
<dl class="function">
|
|
|
|
|
|
|
|
<dt><a name="test.equals"></a><strong>test.equals</strong> (expected, actual, message)</dt>
|
|
<dd>
|
|
Test if the given value matches the given expected value. If the values do not match, an error with the given message (if any) and an additional message containing both values will be shown. The values will be compared with ==.
|
|
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
|
|
<li>
|
|
expected: The expected value.
|
|
</li>
|
|
|
|
<li>
|
|
actual: The actual value.
|
|
</li>
|
|
|
|
<li>
|
|
message: Optional. The additional message to be printed.
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
<dt><a name="test.run"></a><strong>test.run</strong> (name, test_method)</dt>
|
|
<dd>
|
|
Runs the given method and prints a formatted information including the name.
|
|
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
|
|
<li>
|
|
name: The name of the method that is being run.
|
|
</li>
|
|
|
|
<li>
|
|
test_method: The method to run.
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
<dt><a name="test.start"></a><strong>test.start</strong> (name)</dt>
|
|
<dd>
|
|
Prints the given name as header.
|
|
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
|
|
<li>
|
|
name: The name of the header.
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div> <!-- id="content" -->
|
|
|
|
</div> <!-- id="main" -->
|
|
|
|
<div id="about">
|
|
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
|
</div> <!-- id="about" -->
|
|
|
|
</div> <!-- id="container" -->
|
|
</body>
|
|
</html>
|