| |
| |
| <!DOCTYPE html> |
| <html lang="en"> |
| <head> |
| <meta charset="utf-8"> |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| |
| |
| |
| |
| <title>testutil — Apache Mynewt latest documentation</title> |
| |
| |
| |
| |
| <link rel="shortcut icon" href="../../../_static/mynewt-logo-only-newt32x32.png"/> |
| |
| |
| |
| |
| <link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" /> |
| |
| |
| <link rel="stylesheet" href="../../../_static/css/sphinx_theme.css" type="text/css" /> |
| |
| <link rel="stylesheet" href="../../../_static/css/bootstrap-3.0.3.min.css" type="text/css" /> |
| |
| <link rel="stylesheet" href="../../../_static/css/v2.css" type="text/css" /> |
| |
| <link rel="stylesheet" href="../../../_static/css/custom.css" type="text/css" /> |
| |
| <link rel="stylesheet" href="../../../_static/css/restructuredtext.css" type="text/css" /> |
| |
| |
| |
| |
| <link rel="stylesheet" href="../../../_static/css/overrides.css" type="text/css" /> |
| <link rel="index" title="Index" |
| href="../../../genindex.html"/> |
| <link rel="search" title="Search" href="../../../search.html"/> |
| <link rel="top" title="Apache Mynewt latest documentation" href="../../../index.html"/> |
| <link rel="up" title="OS User Guide" href="../../os_user_guide.html"/> |
| <link rel="next" title="JSON" href="../json/json.html"/> |
| <link rel="prev" title="Creating and Configuring a Sensor Device" href="../sensor_framework/sensor_create.html"/> |
| |
| |
| <script src="../../../_static/js/modernizr.min.js"></script> |
| |
| |
| <script> |
| (function(i, s, o, g, r, a, m) { |
| i["GoogleAnalyticsObject"] = r; |
| (i[r] = |
| i[r] || |
| function() { |
| (i[r].q = i[r].q || []).push(arguments); |
| }), |
| (i[r].l = 1 * new Date()); |
| (a = s.createElement(o)), (m = s.getElementsByTagName(o)[0]); |
| a.async = 1; |
| a.src = g; |
| m.parentNode.insertBefore(a, m); |
| })(window, document, "script", "//www.google-analytics.com/analytics.js", "ga"); |
| |
| ga("create", "UA-72162311-1", "auto"); |
| ga("send", "pageview"); |
| </script> |
| |
| |
| </head> |
| |
| <body class="not-front page-documentation" role="document" > |
| <div id="wrapper"> |
| <div class="container"> |
| <div id="banner" class="row v2-main-banner"> |
| <a class="logo-cell" href="/"> |
| <img class="logo" src="../../../_static/img/logo.png"> |
| </a> |
| <div class="tagline-cell"> |
| <h4 class="tagline">An OS to build, deploy and securely manage billions of devices</h4> |
| </div> |
| <div class="news-cell"> |
| <div class="well"> |
| <h4>Latest News:</h4> <a href="/download">Apache Mynewt 1.11.0, Apache NimBLE 1.6.0 </a> released September 7, 2023) |
| </div> |
| </div> |
| </div> |
| </div> |
| |
| <header> |
| <nav id="navbar" class="navbar navbar-inverse" role="navigation"> |
| <div class="container"> |
| <!-- Collapsed navigation --> |
| <div class="navbar-header"> |
| <!-- Expander button --> |
| <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> |
| <span class="sr-only">Toggle navigation</span> |
| <span class="icon-bar"></span> |
| <span class="icon-bar"></span> |
| <span class="icon-bar"></span> |
| </button> |
| |
| </div> |
| |
| <!-- Expanded navigation --> |
| <div class="navbar-collapse collapse"> |
| <!-- Main navigation --> |
| <ul class="nav navbar-nav navbar-right"> |
| <li> |
| <a href="/"><i class="fa fa-home" style="font-size: larger;"></i></a> |
| </li> |
| <li class="important"> |
| <a href="/quick-start/">Quick Start</a> |
| </li> |
| <li> |
| <a href="/about/">About</a> |
| </li> |
| <li> |
| <a href="/talks/">Talks</a> |
| </li> |
| <li class="active"> |
| <a href="/documentation/">Documentation</a> |
| </li> |
| <li> |
| <a href="/download/">Download</a> |
| </li> |
| <li> |
| <a href="/community/">Community</a> |
| </li> |
| <li> |
| <a href="/events/">Events</a> |
| </li> |
| </ul> |
| |
| <!-- Search, Navigation and Repo links --> |
| <ul class="nav navbar-nav navbar-right"> |
| |
| </ul> |
| </div> |
| </div> |
| </nav> |
| </header> |
| <!-- STARTS MAIN CONTENT --> |
| <div id="main-content"> |
| |
| |
| |
| |
| |
| |
| <div id="breadcrumb"> |
| <div class="container"> |
| <a href="/documentation/">Docs</a> / |
| |
| <a href="../../os_user_guide.html">OS User Guide</a> / |
| |
| testutil |
| |
| <div class="sourcelink"> |
| <a href="https://github.com/apache/mynewt-core/edit/master/docs/os/modules/testutil/testutil.rst" class="icon icon-github" |
| rel="nofollow"> Edit on GitHub</a> |
| </div> |
| </div> |
| </div> |
| <!-- STARTS CONTAINER --> |
| <div class="container"> |
| <!-- STARTS .content --> |
| <div id="content" class="row"> |
| |
| <!-- STARTS .container-sidebar --> |
| <div class="container-sidebar col-xs-12 col-sm-3"> |
| <div id="docSidebar" class="sticky-container"> |
| <div role="search" class="sphinx-search"> |
| <form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get"> |
| <input type="text" name="q" placeholder="Search documentation" class="search-documentation" /> |
| <input type="hidden" name="check_keywords" value="yes" /> |
| <input type="hidden" name="area" value="default" /> |
| </form> |
| </div> |
| <!-- Note: only works when deployed --> |
| <select class="form-control" onchange="if (this.value) window.location.href=this.value"> |
| <option value="/latest" selected> |
| Version: latest |
| </option> |
| <option value="/v1_11_0" > |
| Version: 1.11.0 |
| </option> |
| <option value="/v1_10_0" selected="selected" > |
| Version: 1.10.0 |
| </option> |
| <option value="/v1_9_0" > |
| Version: 1.9.0 |
| </option> |
| <option value="/v1_8_0" > |
| Version: 1.8.0 |
| </option> |
| <option value="/v1_7_0" > |
| Version: 1.7.0 |
| </option> |
| <option value="/v1_6_0" > |
| Version: 1.6.0 |
| </option> |
| <option value="/v1_5_0" > |
| Version: 1.5.0 |
| </option> |
| <option value="/v1_4_0" > |
| Version: 1.4.0 |
| </option> |
| <option value="/v1_3_0/os/introduction" > |
| Version: 1.3.0 |
| </option> |
| <option value="/v1_2_0/os/introduction" > |
| Version: 1.2.0 |
| </option> |
| <option value="/v1_1_0/os/introduction" > |
| Version: 1.1.0 |
| </option> |
| <option value="/v1_0_0/os/introduction" > |
| Version: 1.0.0 |
| </option> |
| <option value="/v0_9_0/os/introduction" > |
| Version: 0.9.0 |
| </option> |
| </select> |
| <div class="region region-sidebar"> |
| <div class="docs-menu"> |
| |
| |
| |
| <ul class="current"> |
| <li class="toctree-l1"><a class="reference internal" href="../../../index.html">Introduction</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../get_started/index.html">Setup & Get Started</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../concepts.html">Concepts</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../tutorials/tutorials.html">Tutorials</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../external_links.html">Third-party Resources</a></li> |
| <li class="toctree-l1 current"><a class="reference internal" href="../../os_user_guide.html">OS User Guide</a><ul class="current"> |
| <li class="toctree-l2"><a class="reference internal" href="../../core_os/mynewt_os.html">Kernel</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../system_modules.html">System</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../hal/hal.html">Hardware Abstraction</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../bootloader/bootloader.html">Secure Bootloader</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../split/split.html">Split Images</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../core_os/porting/port_os.html">Porting Guide</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../baselibc.html">Baselibc</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../drivers/driver.html">Drivers</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../devmgmt/newtmgr.html">Device Management with Newt Manager</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../mcumgr/mcumgr.html">Device Management with MCUmgr</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../imgmgr/imgmgr.html">Image Manager</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../sysinitconfig/sysinitconfig.html">Compile-Time Configuration</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../sysinitdown/sysinitdown.html">System Initialization and Shutdown</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../extcmd/extcmd.html">Build-Time Hooks</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../fs/fs.html">File System</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../fcb/fcb.html">Flash Circular Buffer</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../sensor_framework/sensor_framework.html">Sensor Framework</a></li> |
| <li class="toctree-l2 current"><a class="current reference internal" href="#">Test Utilities</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../json/json.html">JSON</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../mfg/mfg.html">Manufacturing support</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../bsp/index.html">Board support</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../network/index.html">BLE User Guide</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../newt/index.html">Newt Tool Guide</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../newtmgr/index.html">Newt Manager Guide</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../mynewt_faq/index.html">Mynewt FAQ</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../misc/index.html">Appendix</a></li> |
| </ul> |
| |
| |
| |
| </div> |
| </div> |
| </div> |
| <!-- ENDS STICKY CONTAINER --> |
| </div> |
| <!-- ENDS .container-sidebar --> |
| |
| <div class="col-xs-12 col-sm-9"> |
| |
| <div class="alert alert-warning"> |
| <p> |
| Version 1.10.0 is not the most recent version of the |
| Apache Mynewt documentation. Click <a href="/latest">here</a> to |
| read the latest version. |
| </p> |
| </div> |
| |
| |
| |
| <div class=""> |
| <div class="rst-content"> |
| <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> |
| <div itemprop="articleBody"> |
| |
| <div class="section" id="testutil"> |
| <h1>testutil<a class="headerlink" href="#testutil" title="Permalink to this headline">¶</a></h1> |
| <p>The testutil package is a test framework that provides facilities for |
| specifying test cases and recording test results.</p> |
| <p>You would use it to build regression tests for your library.</p> |
| <div class="contents local topic" id="contents"> |
| <ul class="simple"> |
| <li><p><a class="reference internal" href="#description" id="id1">Description</a></p></li> |
| <li><p><a class="reference internal" href="#example" id="id2">Example</a></p></li> |
| <li><p><a class="reference internal" href="#data-structures" id="id3">Data structures</a></p></li> |
| <li><p><a class="reference internal" href="#api" id="id4">API</a></p></li> |
| </ul> |
| </div> |
| <div class="section" id="description"> |
| <h2><a class="toc-backref" href="#id1">Description</a><a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2> |
| <p>A package may optionally contain a set of test cases. Test cases are not |
| normally compiled and linked when a package is built; they are only |
| included when the “test” identity is specified. All of a package’s test |
| code goes in its <code class="docutils literal notranslate"><span class="pre">src/test</span></code> directory. For example, the nffs package’s |
| test code is located in the following directory:</p> |
| <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">* fs/nffs/src/test/</span> |
| </pre></div> |
| </div> |
| <p>This directory contains the source and header files that implement the |
| nffs test code.</p> |
| <p>The test code has access to all the header files in the following |
| directories:</p> |
| <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">* src</span> |
| <span class="go">* src/arch/<target-arch></span> |
| <span class="go">* include</span> |
| <span class="go">* src/test</span> |
| <span class="go">* src/test/arch/<target-arch></span> |
| <span class="go">* include directories of all package dependencies</span> |
| </pre></div> |
| </div> |
| <p>Package test code typically depends on the testutil package, described |
| later in this document.</p> |
| <p>Some test cases or test initialization code may be platform-specific. In |
| such cases, the platform-specific function definitions are placed in |
| arch subdirectories within the package test directory.</p> |
| <p>While building the test code (i.e., when the <code class="docutils literal notranslate"><span class="pre">test</span></code> identity is |
| specified), the newt tool defines the <code class="docutils literal notranslate"><span class="pre">TEST</span></code> macro. This macro is |
| defined during compilation of all C source files in all projects and |
| packages.</p> |
| <p>Tests are structured according to the following hierarchy:</p> |
| <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go"> [test]</span> |
| <span class="go"> / \</span> |
| <span class="go"> [suite] [suite]</span> |
| <span class="go"> / \ / \</span> |
| <span class="go">[case] [case] [case] [case]</span> |
| </pre></div> |
| </div> |
| <p>I.e., a test consists of test suites, and a test suite consists of test |
| cases.</p> |
| <p>The test code uses testutil to define test suites and test cases.</p> |
| <p>Regression test can then be executed using ‘newt target test’ command, |
| or by including a call to your test suite from |
| <code class="docutils literal notranslate"><span class="pre">project/test/src/test.c</span></code>.</p> |
| </div> |
| <div class="section" id="example"> |
| <h2><a class="toc-backref" href="#id2">Example</a><a class="headerlink" href="#example" title="Permalink to this headline">¶</a></h2> |
| <p><a class="reference internal" href="../../../tutorials/other/unit_test.html"><span class="doc">This Tutorial</span></a> shows how to create a |
| test suite for a Mynewt package.</p> |
| </div> |
| <div class="section" id="data-structures"> |
| <h2><a class="toc-backref" href="#id3">Data structures</a><a class="headerlink" href="#data-structures" title="Permalink to this headline">¶</a></h2> |
| <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">struct ts_config {</span> |
| <span class="go"> int ts_print_results;</span> |
| <span class="go"> int ts_system_assert;</span> |
| |
| <span class="go"> const char *ts_suite_name;</span> |
| |
| <span class="go"> /*</span> |
| <span class="go"> * Called prior to the first test in the suite</span> |
| <span class="go"> */</span> |
| <span class="go"> tu_init_test_fn_t *ts_suite_init_cb;</span> |
| <span class="go"> void *ts_suite_init_arg;</span> |
| |
| <span class="go"> /*</span> |
| <span class="go"> * Called after the last test in the suite</span> |
| <span class="go"> */</span> |
| <span class="go"> tu_init_test_fn_t *ts_suite_complete_cb;</span> |
| <span class="go"> void *ts_suite_complete_arg;</span> |
| |
| <span class="go"> /*</span> |
| <span class="go"> * Called before every test in the suite</span> |
| <span class="go"> */</span> |
| <span class="go"> tu_pre_test_fn_t *ts_case_pre_test_cb;</span> |
| <span class="go"> void *ts_case_pre_arg;</span> |
| |
| <span class="go"> /*</span> |
| <span class="go"> * Called after every test in the suite</span> |
| <span class="go"> */</span> |
| <span class="go"> tu_post_test_fn_t *ts_case_post_test_cb;</span> |
| <span class="go"> void *ts_case_post_arg;</span> |
| |
| <span class="go"> /*</span> |
| <span class="go"> * Called after test returns success</span> |
| <span class="go"> */</span> |
| <span class="go"> tu_case_report_fn_t *ts_case_pass_cb;</span> |
| <span class="go"> void *ts_case_pass_arg;</span> |
| |
| <span class="go"> /*</span> |
| <span class="go"> * Called after test fails (typically thoough a failed test assert)</span> |
| <span class="go"> */</span> |
| <span class="go"> tu_case_report_fn_t *ts_case_fail_cb;</span> |
| <span class="go"> void *ts_case_fail_arg;</span> |
| |
| <span class="go"> /*</span> |
| <span class="go"> * restart after running the test suite - self-test only</span> |
| <span class="go"> */</span> |
| <span class="go"> tu_suite_restart_fn_t *ts_restart_cb;</span> |
| <span class="go"> void *ts_restart_arg;</span> |
| <span class="go">};</span> |
| </pre></div> |
| </div> |
| <p>The global <code class="docutils literal notranslate"><span class="pre">ts_config</span></code> struct contains all the testutil package’s |
| settings.</p> |
| </div> |
| <div class="section" id="api"> |
| <h2><a class="toc-backref" href="#id4">API</a><a class="headerlink" href="#api" title="Permalink to this headline">¶</a></h2> |
| <dl class="c type"> |
| <dt id="c.tu_case_report_fn_t"> |
| <span class="target" id="group___o_s_testutil_1gaa73b8bae232a167cdee4613926c0ee1d"></span><em class="property"><span class="pre">typedef</span> </em><span class="pre">void</span> <code class="sig-name descname"><span class="pre">tu_case_report_fn_t</span></code><span class="sig-paren">(</span><em class="property"><span class="pre">const</span></em> <span class="pre">char</span> <span class="pre">*</span><em><span class="pre">msg</span></em>, <span class="pre">void</span> <span class="pre">*</span><em><span class="pre">arg</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.tu_case_report_fn_t" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c type"> |
| <dt id="c.tu_pre_test_fn_t"> |
| <span class="target" id="group___o_s_testutil_1ga89ca5b6ecafd993dc48bfd2b4adb6e84"></span><em class="property"><span class="pre">typedef</span> </em><span class="pre">void</span> <code class="sig-name descname"><span class="pre">tu_pre_test_fn_t</span></code><span class="sig-paren">(</span><span class="pre">void</span> <span class="pre">*</span><em><span class="pre">arg</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.tu_pre_test_fn_t" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c type"> |
| <dt id="c.tu_post_test_fn_t"> |
| <span class="target" id="group___o_s_testutil_1gabb8d8bf7fc45de00114783224126d02b"></span><em class="property"><span class="pre">typedef</span> </em><span class="pre">void</span> <code class="sig-name descname"><span class="pre">tu_post_test_fn_t</span></code><span class="sig-paren">(</span><span class="pre">void</span> <span class="pre">*</span><em><span class="pre">arg</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.tu_post_test_fn_t" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c type"> |
| <dt id="c.tu_testsuite_fn_t"> |
| <span class="target" id="group___o_s_testutil_1ga5c7133e248d79a73d9d52373d82a5f4f"></span><em class="property"><span class="pre">typedef</span> </em><span class="pre">void</span> <code class="sig-name descname"><span class="pre">tu_testsuite_fn_t</span></code><span class="sig-paren">(</span><span class="pre">void</span><span class="sig-paren">)</span><a class="headerlink" href="#c.tu_testsuite_fn_t" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c var"> |
| <dt id="c.g_ts_suites"> |
| <span class="target" id="group___o_s_testutil_1gae9c197af587c6ee8deb950d5c528ebe9"></span><em class="property"><span class="pre">struct</span></em> <span class="pre">ts_testsuite_list</span> <code class="sig-name descname"><span class="pre">g_ts_suites</span></code><a class="headerlink" href="#c.g_ts_suites" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c var"> |
| <dt id="c.tu_config"> |
| <span class="target" id="group___o_s_testutil_1ga94adfc65fe329df2787e7877caeb44ad"></span><em class="property"><span class="pre">struct</span></em> <a class="reference internal" href="#c.tu_config" title="tu_config"><span class="pre">tu_config</span></a> <code class="sig-name descname"><span class="pre">tu_config</span></code><a class="headerlink" href="#c.tu_config" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c var"> |
| <dt id="c.tu_suite_name"> |
| <span class="target" id="group___o_s_testutil_1gaaa5e192162c507035a9e3c07aae82245"></span><em class="property"><span class="pre">const</span></em> <span class="pre">char</span> <span class="pre">*</span><code class="sig-name descname"><span class="pre">tu_suite_name</span></code><a class="headerlink" href="#c.tu_suite_name" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c var"> |
| <dt id="c.tu_case_name"> |
| <span class="target" id="group___o_s_testutil_1ga7867f412e50745b92806040ed90d21b6"></span><em class="property"><span class="pre">const</span></em> <span class="pre">char</span> <span class="pre">*</span><code class="sig-name descname"><span class="pre">tu_case_name</span></code><a class="headerlink" href="#c.tu_case_name" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c var"> |
| <dt id="c.tu_any_failed"> |
| <span class="target" id="group___o_s_testutil_1gafa02b631b8f9759122575b4a92a3dfd7"></span><span class="pre">int</span> <code class="sig-name descname"><span class="pre">tu_any_failed</span></code><a class="headerlink" href="#c.tu_any_failed" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c var"> |
| <dt id="c.tu_suite_failed"> |
| <span class="target" id="group___o_s_testutil_1ga2b4bb76a0785b006b6c1580e0ad94cc3"></span><span class="pre">int</span> <code class="sig-name descname"><span class="pre">tu_suite_failed</span></code><a class="headerlink" href="#c.tu_suite_failed" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c var"> |
| <dt id="c.tu_case_reported"> |
| <span class="target" id="group___o_s_testutil_1gae0322a490423f3e48682e4eaba247801"></span><span class="pre">int</span> <code class="sig-name descname"><span class="pre">tu_case_reported</span></code><a class="headerlink" href="#c.tu_case_reported" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c var"> |
| <dt id="c.tu_case_failed"> |
| <span class="target" id="group___o_s_testutil_1gae144654b2bfcadaf9e501c6657b1757e"></span><span class="pre">int</span> <code class="sig-name descname"><span class="pre">tu_case_failed</span></code><a class="headerlink" href="#c.tu_case_failed" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c var"> |
| <dt id="c.tu_case_idx"> |
| <span class="target" id="group___o_s_testutil_1gaa99f206843f9d87b9c5fea9bac34f758"></span><span class="pre">int</span> <code class="sig-name descname"><span class="pre">tu_case_idx</span></code><a class="headerlink" href="#c.tu_case_idx" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c var"> |
| <dt id="c.tu_case_jb"> |
| <span class="target" id="group___o_s_testutil_1ga7d2ed48b8b93939edf3c4e20c22e4fd8"></span><span class="pre">jmp_buf</span> <code class="sig-name descname"><span class="pre">tu_case_jb</span></code><a class="headerlink" href="#c.tu_case_jb" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c function"> |
| <dt id="c.tu_set_pass_cb"> |
| <span class="target" id="group___o_s_testutil_1ga45ddc80e0335a38cdf9911edf4146bb3"></span><span class="pre">void</span> <code class="sig-name descname"><span class="pre">tu_set_pass_cb</span></code><span class="sig-paren">(</span><a class="reference internal" href="#c.tu_case_report_fn_t" title="tu_case_report_fn_t"><span class="pre">tu_case_report_fn_t</span></a> <span class="pre">*</span><em><span class="pre">cb</span></em>, <span class="pre">void</span> <span class="pre">*</span><em><span class="pre">cb_arg</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.tu_set_pass_cb" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c function"> |
| <dt id="c.tu_set_fail_cb"> |
| <span class="target" id="group___o_s_testutil_1gace6c7aca5758bae43dbf02149f98a269"></span><span class="pre">void</span> <code class="sig-name descname"><span class="pre">tu_set_fail_cb</span></code><span class="sig-paren">(</span><a class="reference internal" href="#c.tu_case_report_fn_t" title="tu_case_report_fn_t"><span class="pre">tu_case_report_fn_t</span></a> <span class="pre">*</span><em><span class="pre">cb</span></em>, <span class="pre">void</span> <span class="pre">*</span><em><span class="pre">cb_arg</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.tu_set_fail_cb" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c function"> |
| <dt id="c.tu_suite_init"> |
| <span class="target" id="group___o_s_testutil_1gae5916481e6b9e84715ee70399ac89e18"></span><span class="pre">void</span> <code class="sig-name descname"><span class="pre">tu_suite_init</span></code><span class="sig-paren">(</span><em class="property"><span class="pre">const</span></em> <span class="pre">char</span> <span class="pre">*</span><em><span class="pre">name</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.tu_suite_init" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c function"> |
| <dt id="c.tu_suite_pre_test"> |
| <span class="target" id="group___o_s_testutil_1ga08860e05807d8462eabc736b5283d1fb"></span><span class="pre">void</span> <code class="sig-name descname"><span class="pre">tu_suite_pre_test</span></code><span class="sig-paren">(</span><span class="pre">void</span><span class="sig-paren">)</span><a class="headerlink" href="#c.tu_suite_pre_test" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c function"> |
| <dt id="c.tu_suite_complete"> |
| <span class="target" id="group___o_s_testutil_1ga9c53dccbf3df0f803eb8e5379905c788"></span><span class="pre">void</span> <code class="sig-name descname"><span class="pre">tu_suite_complete</span></code><span class="sig-paren">(</span><span class="pre">void</span><span class="sig-paren">)</span><a class="headerlink" href="#c.tu_suite_complete" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c function"> |
| <dt id="c.tu_suite_register"> |
| <span class="target" id="group___o_s_testutil_1gada2e23c045bdf1b1fa341d9168f579bd"></span><span class="pre">int</span> <code class="sig-name descname"><span class="pre">tu_suite_register</span></code><span class="sig-paren">(</span><a class="reference internal" href="#c.tu_testsuite_fn_t" title="tu_testsuite_fn_t"><span class="pre">tu_testsuite_fn_t</span></a> <span class="pre">*</span><em><span class="pre">ts</span></em>, <em class="property"><span class="pre">const</span></em> <span class="pre">char</span> <span class="pre">*</span><em><span class="pre">name</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.tu_suite_register" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c function"> |
| <dt> |
| <span class="target" id="group___o_s_testutil_1ga68e6d502ffc1da226897ebfcd0e84c3a"></span><code class="sig-name descname"><span class="pre">SLIST_HEAD</span> <span class="pre">(ts_testsuite_list,</span> <span class="pre">ts_suite)</span></code></dt> |
| <dd></dd></dl> |
| |
| <dl class="c function"> |
| <dt id="c.tu_restart"> |
| <span class="target" id="group___o_s_testutil_1ga07638bc3597e50c085833839ef98ed2a"></span><span class="pre">void</span> <code class="sig-name descname"><span class="pre">tu_restart</span></code><span class="sig-paren">(</span><span class="pre">void</span><span class="sig-paren">)</span><a class="headerlink" href="#c.tu_restart" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c function"> |
| <dt id="c.tu_start_os"> |
| <span class="target" id="group___o_s_testutil_1ga19b904fc4663a72a49fc1c0fbae93774"></span><span class="pre">void</span> <code class="sig-name descname"><span class="pre">tu_start_os</span></code><span class="sig-paren">(</span><em class="property"><span class="pre">const</span></em> <span class="pre">char</span> <span class="pre">*</span><em><span class="pre">test_task_name</span></em>, <a class="reference internal" href="../../core_os/task/task.html#c.os_task_func_t" title="os_task_func_t"><span class="pre">os_task_func_t</span></a> <em><span class="pre">test_task_handler</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.tu_start_os" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c function"> |
| <dt id="c.tu_suite_set_pre_test_cb"> |
| <span class="target" id="group___o_s_testutil_1gaef9c4aed6fcd4ecc4f0616f00b09d6f5"></span><span class="pre">void</span> <code class="sig-name descname"><span class="pre">tu_suite_set_pre_test_cb</span></code><span class="sig-paren">(</span><a class="reference internal" href="#c.tu_pre_test_fn_t" title="tu_pre_test_fn_t"><span class="pre">tu_pre_test_fn_t</span></a> <span class="pre">*</span><em><span class="pre">cb</span></em>, <span class="pre">void</span> <span class="pre">*</span><em><span class="pre">cb_arg</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.tu_suite_set_pre_test_cb" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c function"> |
| <dt id="c.tu_case_set_post_test_cb"> |
| <span class="target" id="group___o_s_testutil_1ga5cc422be26c700f12b20f59d8d1ab8cc"></span><span class="pre">void</span> <code class="sig-name descname"><span class="pre">tu_case_set_post_test_cb</span></code><span class="sig-paren">(</span><a class="reference internal" href="#c.tu_post_test_fn_t" title="tu_post_test_fn_t"><span class="pre">tu_post_test_fn_t</span></a> <span class="pre">*</span><em><span class="pre">cb</span></em>, <span class="pre">void</span> <span class="pre">*</span><em><span class="pre">cb_arg</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.tu_case_set_post_test_cb" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c function"> |
| <dt id="c.tu_case_init"> |
| <span class="target" id="group___o_s_testutil_1gaceb8e3d791901bbe6fbd58c23b6faff9"></span><span class="pre">void</span> <code class="sig-name descname"><span class="pre">tu_case_init</span></code><span class="sig-paren">(</span><em class="property"><span class="pre">const</span></em> <span class="pre">char</span> <span class="pre">*</span><em><span class="pre">name</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.tu_case_init" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c function"> |
| <dt id="c.tu_case_complete"> |
| <span class="target" id="group___o_s_testutil_1gaea8856e9cf223d54b580bdd0c3493cb5"></span><span class="pre">void</span> <code class="sig-name descname"><span class="pre">tu_case_complete</span></code><span class="sig-paren">(</span><span class="pre">void</span><span class="sig-paren">)</span><a class="headerlink" href="#c.tu_case_complete" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c function"> |
| <dt id="c.tu_case_pass"> |
| <span class="target" id="group___o_s_testutil_1ga1d40cb10416bbaf283d93d6ab9e5389f"></span><span class="pre">void</span> <code class="sig-name descname"><span class="pre">tu_case_pass</span></code><span class="sig-paren">(</span><span class="pre">void</span><span class="sig-paren">)</span><a class="headerlink" href="#c.tu_case_pass" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c function"> |
| <dt id="c.tu_case_fail"> |
| <span class="target" id="group___o_s_testutil_1gaf69f07f91dc10fbd0773ed3517ef0219"></span><span class="pre">void</span> <code class="sig-name descname"><span class="pre">tu_case_fail</span></code><span class="sig-paren">(</span><span class="pre">void</span><span class="sig-paren">)</span><a class="headerlink" href="#c.tu_case_fail" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c function"> |
| <dt id="c.tu_case_fail_assert"> |
| <span class="target" id="group___o_s_testutil_1ga8f2af34c81642a347927e45794963514"></span><span class="pre">void</span> <code class="sig-name descname"><span class="pre">tu_case_fail_assert</span></code><span class="sig-paren">(</span><span class="pre">int</span> <em><span class="pre">fatal</span></em>, <em class="property"><span class="pre">const</span></em> <span class="pre">char</span> <span class="pre">*</span><em><span class="pre">file</span></em>, <span class="pre">int</span> <em><span class="pre">line</span></em>, <em class="property"><span class="pre">const</span></em> <span class="pre">char</span> <span class="pre">*</span><em><span class="pre">expr</span></em>, <em class="property"><span class="pre">const</span></em> <span class="pre">char</span> <span class="pre">*</span><em><span class="pre">format</span></em>, <span class="pre">...</span><span class="sig-paren">)</span><a class="headerlink" href="#c.tu_case_fail_assert" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c function"> |
| <dt id="c.tu_case_write_pass_auto"> |
| <span class="target" id="group___o_s_testutil_1gabf618edff3fde83c91318220795f34d9"></span><span class="pre">void</span> <code class="sig-name descname"><span class="pre">tu_case_write_pass_auto</span></code><span class="sig-paren">(</span><span class="pre">void</span><span class="sig-paren">)</span><a class="headerlink" href="#c.tu_case_write_pass_auto" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c function"> |
| <dt id="c.tu_case_pass_manual"> |
| <span class="target" id="group___o_s_testutil_1ga3e7c14604f51d0f07020230a5fdb93d8"></span><span class="pre">void</span> <code class="sig-name descname"><span class="pre">tu_case_pass_manual</span></code><span class="sig-paren">(</span><em class="property"><span class="pre">const</span></em> <span class="pre">char</span> <span class="pre">*</span><em><span class="pre">file</span></em>, <span class="pre">int</span> <em><span class="pre">line</span></em>, <em class="property"><span class="pre">const</span></em> <span class="pre">char</span> <span class="pre">*</span><em><span class="pre">format</span></em>, <span class="pre">...</span><span class="sig-paren">)</span><a class="headerlink" href="#c.tu_case_pass_manual" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c function"> |
| <dt id="c.tu_case_post_test"> |
| <span class="target" id="group___o_s_testutil_1ga53155ed864933b373218afa414c99b4c"></span><span class="pre">void</span> <code class="sig-name descname"><span class="pre">tu_case_post_test</span></code><span class="sig-paren">(</span><span class="pre">void</span><span class="sig-paren">)</span><a class="headerlink" href="#c.tu_case_post_test" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c macro"> |
| <dt id="c.TEST_SUITE_DECL"> |
| <span class="target" id="group___o_s_testutil_1ga0c63a10b6081ba361b088df487e8c1c9"></span><code class="sig-name descname"><span class="pre">TEST_SUITE_DECL</span></code><span class="sig-paren">(</span><em><span class="pre">suite_name</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.TEST_SUITE_DECL" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c macro"> |
| <dt id="c.TEST_SUITE_REGISTER"> |
| <span class="target" id="group___o_s_testutil_1gab8c9355dcc16fb84300e86e714b22bc5"></span><code class="sig-name descname"><span class="pre">TEST_SUITE_REGISTER</span></code><span class="sig-paren">(</span><em><span class="pre">suite_name</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.TEST_SUITE_REGISTER" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c macro"> |
| <dt id="c.TEST_SUITE"> |
| <span class="target" id="group___o_s_testutil_1gad311b05f77a7f07e9124b303253fbadf"></span><code class="sig-name descname"><span class="pre">TEST_SUITE</span></code><span class="sig-paren">(</span><em><span class="pre">suite_name</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.TEST_SUITE" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c macro"> |
| <dt id="c.TEST_CASE_DECL"> |
| <span class="target" id="group___o_s_testutil_1gacc578e3366427ac70d8a85ca1871319f"></span><code class="sig-name descname"><span class="pre">TEST_CASE_DECL</span></code><span class="sig-paren">(</span><em><span class="pre">case_name</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.TEST_CASE_DECL" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c macro"> |
| <dt id="c.TEST_CASE_DEFN"> |
| <span class="target" id="group___o_s_testutil_1ga509f565ed477f06cdb555bd149ef2b86"></span><code class="sig-name descname"><span class="pre">TEST_CASE_DEFN</span></code><span class="sig-paren">(</span><em><span class="pre">case_name</span></em>, <em><span class="pre">do_sysinit</span></em>, <em><span class="pre">body</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.TEST_CASE_DEFN" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c macro"> |
| <dt id="c.TEST_CASE"> |
| <span class="target" id="group___o_s_testutil_1ga7e2ab9447254acac447cae31bd661a58"></span><code class="sig-name descname"><span class="pre">TEST_CASE</span></code><span class="sig-paren">(</span><em><span class="pre">case_name</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.TEST_CASE" title="Permalink to this definition">¶</a><br /></dt> |
| <dd><p>Defines a test case suitable for running in an application. </p> |
| <p>The <code class="docutils literal notranslate"><a class="reference internal" href="#group___o_s_testutil_1ga7e2ab9447254acac447cae31bd661a58"><span class="std std-ref"><span class="pre">TEST_CASE()</span></span></a></code> macro should not be used for self-tests (i.e., tests that are run with <code class="docutils literal notranslate"><span class="pre">newt</span> <span class="pre">test</span></code>). Instead, <code class="docutils literal notranslate"><a class="reference internal" href="#group___o_s_testutil_1gabf39159bf56177598cc0b637801205fc"><span class="std std-ref"><span class="pre">TEST_CASE_SELF()</span></span></a></code> or <code class="docutils literal notranslate"><a class="reference internal" href="#group___o_s_testutil_1gab061ba870b526bfe91e35f5610ee283b"><span class="std std-ref"><span class="pre">TEST_CASE_TASK()</span></span></a></code> should be preferred; those macros perform system clean up before the test runs. </p> |
| </dd></dl> |
| |
| <dl class="c macro"> |
| <dt id="c.TEST_CASE_SELF_EMIT_"> |
| <span class="target" id="group___o_s_testutil_1ga747bb48a5ebf0cc465c936cceccd7a7e"></span><code class="sig-name descname"><span class="pre">TEST_CASE_SELF_EMIT_</span></code><span class="sig-paren">(</span><em><span class="pre">case_name</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.TEST_CASE_SELF_EMIT_" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c macro"> |
| <dt id="c.TEST_CASE_TASK_EMIT_"> |
| <span class="target" id="group___o_s_testutil_1gae9a7cf0dabaa22f68fdce8402ed3f303"></span><code class="sig-name descname"><span class="pre">TEST_CASE_TASK_EMIT_</span></code><span class="sig-paren">(</span><em><span class="pre">case_name</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.TEST_CASE_TASK_EMIT_" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c macro"> |
| <dt id="c.TEST_CASE_SELF"> |
| <span class="target" id="group___o_s_testutil_1gabf39159bf56177598cc0b637801205fc"></span><code class="sig-name descname"><span class="pre">TEST_CASE_SELF</span></code><span class="sig-paren">(</span><em><span class="pre">case_name</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.TEST_CASE_SELF" title="Permalink to this definition">¶</a><br /></dt> |
| <dd><p>Defines a test case for self-test mode (i.e., suitable for <code class="docutils literal notranslate"><span class="pre">newt</span> <span class="pre">test</span></code>). </p> |
| <p>Test cases defined with <code class="docutils literal notranslate"><a class="reference internal" href="#group___o_s_testutil_1gabf39159bf56177598cc0b637801205fc"><span class="std std-ref"><span class="pre">TEST_CASE_SELF()</span></span></a></code> execute <code class="docutils literal notranslate"><span class="pre">sysinit()</span></code> before the test body. </p> |
| </dd></dl> |
| |
| <dl class="c macro"> |
| <dt id="c.TEST_CASE_TASK"> |
| <span class="target" id="group___o_s_testutil_1gab061ba870b526bfe91e35f5610ee283b"></span><code class="sig-name descname"><span class="pre">TEST_CASE_TASK</span></code><span class="sig-paren">(</span><em><span class="pre">case_name</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.TEST_CASE_TASK" title="Permalink to this definition">¶</a><br /></dt> |
| <dd><p>Defines a test case that runs inside a temporary task. </p> |
| <p>Most tests don’t utilize the OS scheduler; they simply run in main(), outside the context of a task. However, sometimes the OS is required to fully test a package, e.g., to verify timeouts and other timed events.</p> |
| <p>The <code class="docutils literal notranslate"><a class="reference internal" href="#group___o_s_testutil_1gab061ba870b526bfe91e35f5610ee283b"><span class="std std-ref"><span class="pre">TEST_CASE_TASK()</span></span></a></code> macro simplifies the implementation of test cases that require the OS. This macro is identical in usage to <code class="docutils literal notranslate"><a class="reference internal" href="#group___o_s_testutil_1gabf39159bf56177598cc0b637801205fc"><span class="std std-ref"><span class="pre">TEST_CASE_SELF()</span></span></a></code>, except the test case it defines performs some additional preliminary work:</p> |
| <p><ol class="loweralpha simple"> |
| <li><p>Creates the default task.</p></li> |
| <li><p>Creates the “test task” (the task where the test itself runs).</p></li> |
| <li><p>Starts the OS.</p></li> |
| </ol> |
| </p> |
| <p>The body following the macro invocation is what actually runs in the test task. The test task has a priority of <code class="docutils literal notranslate"><span class="pre">OS_MAIN_TASK_PRIO</span> <span class="pre">+</span> <span class="pre">1</span></code>, so it yields to the main task. Thus, tests using this macro typically have the following form: <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>TEST_CASE_TASK(my_test) |
| { |
| enqueue_event_to_main_task(); |
| // Event immediately runs to completion. |
| TEST_ASSERT(expected_event_result); |
| |
| // ... |
| } |
| </pre></div> |
| </div> |
| </p> |
| <p>The <code class="docutils literal notranslate"><a class="reference internal" href="#group___o_s_testutil_1gab061ba870b526bfe91e35f5610ee283b"><span class="std std-ref"><span class="pre">TEST_CASE_TASK()</span></span></a></code> macro is only usable in self-tests (i.e., tests that are run with <code class="docutils literal notranslate"><span class="pre">newt</span> <span class="pre">test</span></code>). </p> |
| </dd></dl> |
| |
| <dl class="c macro"> |
| <dt id="c.FIRST_AUX"> |
| <span class="target" id="group___o_s_testutil_1gacb0296277fd8a4635015eb7fd9148e33"></span><code class="sig-name descname"><span class="pre">FIRST_AUX</span></code><span class="sig-paren">(</span><em><span class="pre">first</span></em>, <span class="pre">...</span><span class="sig-paren">)</span><a class="headerlink" href="#c.FIRST_AUX" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c macro"> |
| <dt id="c.FIRST"> |
| <span class="target" id="group___o_s_testutil_1ga95dfc80599f592f262b6d72516d365a9"></span><code class="sig-name descname"><span class="pre">FIRST</span></code><span class="sig-paren">(</span><span class="pre">...</span><span class="sig-paren">)</span><a class="headerlink" href="#c.FIRST" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c macro"> |
| <dt id="c.NUM"> |
| <span class="target" id="group___o_s_testutil_1ga2aeac663cd6c91c62bf54b9b7d0dcc6b"></span><code class="sig-name descname"><span class="pre">NUM</span></code><span class="sig-paren">(</span><span class="pre">...</span><span class="sig-paren">)</span><a class="headerlink" href="#c.NUM" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c macro"> |
| <dt id="c.ARG10"> |
| <span class="target" id="group___o_s_testutil_1gaf2ec32cd37865a9c3de301f22baa669d"></span><code class="sig-name descname"><span class="pre">ARG10</span></code><span class="sig-paren">(</span><em><span class="pre">a1</span></em>, <em><span class="pre">a2</span></em>, <em><span class="pre">a3</span></em>, <em><span class="pre">a4</span></em>, <em><span class="pre">a5</span></em>, <em><span class="pre">a6</span></em>, <em><span class="pre">a7</span></em>, <em><span class="pre">a8</span></em>, <em><span class="pre">a9</span></em>, <em><span class="pre">a10</span></em>, <span class="pre">...</span><span class="sig-paren">)</span><a class="headerlink" href="#c.ARG10" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c macro"> |
| <dt id="c.REST_OR_0"> |
| <span class="target" id="group___o_s_testutil_1ga4e7581b82a221c3fb3c7d6e373917e8d"></span><code class="sig-name descname"><span class="pre">REST_OR_0</span></code><span class="sig-paren">(</span><span class="pre">...</span><span class="sig-paren">)</span><a class="headerlink" href="#c.REST_OR_0" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c macro"> |
| <dt id="c.REST_OR_0_AUX"> |
| <span class="target" id="group___o_s_testutil_1gaf8f38bbd1fc37a5272d58a83c3752161"></span><code class="sig-name descname"><span class="pre">REST_OR_0_AUX</span></code><span class="sig-paren">(</span><em><span class="pre">qty</span></em>, <span class="pre">...</span><span class="sig-paren">)</span><a class="headerlink" href="#c.REST_OR_0_AUX" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c macro"> |
| <dt id="c.REST_OR_0_AUX_INNER"> |
| <span class="target" id="group___o_s_testutil_1ga115b03973858d46915210f4e75c1fa82"></span><code class="sig-name descname"><span class="pre">REST_OR_0_AUX_INNER</span></code><span class="sig-paren">(</span><em><span class="pre">qty</span></em>, <span class="pre">...</span><span class="sig-paren">)</span><a class="headerlink" href="#c.REST_OR_0_AUX_INNER" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c macro"> |
| <dt id="c.REST_OR_0_AUX_1"> |
| <span class="target" id="group___o_s_testutil_1ga40ef343c58c53c52b46efd526042b804"></span><code class="sig-name descname"><span class="pre">REST_OR_0_AUX_1</span></code><span class="sig-paren">(</span><em><span class="pre">first</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.REST_OR_0_AUX_1" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c macro"> |
| <dt id="c.REST_OR_0_AUX_N"> |
| <span class="target" id="group___o_s_testutil_1gace9f22d67f53f3088cded67db0f5ec98"></span><code class="sig-name descname"><span class="pre">REST_OR_0_AUX_N</span></code><span class="sig-paren">(</span><em><span class="pre">first</span></em>, <span class="pre">...</span><span class="sig-paren">)</span><a class="headerlink" href="#c.REST_OR_0_AUX_N" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c macro"> |
| <dt id="c.XSTR"> |
| <span class="target" id="group___o_s_testutil_1ga03943706e48069237cd57f2d35ca987e"></span><code class="sig-name descname"><span class="pre">XSTR</span></code><span class="sig-paren">(</span><em><span class="pre">s</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.XSTR" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c macro"> |
| <dt id="c.STR"> |
| <span class="target" id="group___o_s_testutil_1ga6388870e639eee9c0a69446876f1f8cc"></span><code class="sig-name descname"><span class="pre">STR</span></code><span class="sig-paren">(</span><em><span class="pre">s</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.STR" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c macro"> |
| <dt id="c.TEST_ASSERT_FULL"> |
| <span class="target" id="group___o_s_testutil_1ga74e0f752e9837072d59fe8c9c62a7f82"></span><code class="sig-name descname"><span class="pre">TEST_ASSERT_FULL</span></code><span class="sig-paren">(</span><em><span class="pre">fatal</span></em>, <em><span class="pre">expr</span></em>, <span class="pre">...</span><span class="sig-paren">)</span><a class="headerlink" href="#c.TEST_ASSERT_FULL" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c macro"> |
| <dt id="c.TEST_ASSERT"> |
| <span class="target" id="group___o_s_testutil_1ga18e67aa9bbe430effc874d3dde1bc7e1"></span><code class="sig-name descname"><span class="pre">TEST_ASSERT</span></code><span class="sig-paren">(</span><span class="pre">...</span><span class="sig-paren">)</span><a class="headerlink" href="#c.TEST_ASSERT" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c macro"> |
| <dt id="c.TEST_ASSERT_FATAL"> |
| <span class="target" id="group___o_s_testutil_1gae5a641616f7a637a098a90960692e83f"></span><code class="sig-name descname"><span class="pre">TEST_ASSERT_FATAL</span></code><span class="sig-paren">(</span><span class="pre">...</span><span class="sig-paren">)</span><a class="headerlink" href="#c.TEST_ASSERT_FATAL" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c macro"> |
| <dt id="c.TEST_PASS"> |
| <span class="target" id="group___o_s_testutil_1gaf33af8cc3413eceed756e5e82f9646bc"></span><code class="sig-name descname"><span class="pre">TEST_PASS</span></code><span class="sig-paren">(</span><span class="pre">...</span><span class="sig-paren">)</span><a class="headerlink" href="#c.TEST_PASS" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c macro"> |
| <dt id="c.ASSERT_IF_TEST"> |
| <span class="target" id="group___o_s_testutil_1ga9c69d9588756bf895c915402a8d886e9"></span><code class="sig-name descname"><span class="pre">ASSERT_IF_TEST</span></code><span class="sig-paren">(</span><em><span class="pre">expr</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.ASSERT_IF_TEST" title="Permalink to this definition">¶</a><br /></dt> |
| <dd></dd></dl> |
| |
| <dl class="c struct"> |
| <dt id="c.ts_suite"> |
| <span class="target" id="structts__suite"></span><em class="property"><span class="pre">struct</span> </em><code class="sig-name descname"><span class="pre">ts_suite</span></code><a class="headerlink" href="#c.ts_suite" title="Permalink to this definition">¶</a><br /></dt> |
| <dd><em>#include <testutil.h></em></dd></dl> |
| |
| <dl class="c struct"> |
| <dt> |
| <span class="target" id="structtu__config"></span><em class="property"><span class="pre">struct</span> </em><code class="sig-name descname"><span class="pre">tu_config</span></code><br /></dt> |
| <dd><em>#include <testutil.h></em></dd></dl> |
| |
| </div> |
| </div> |
| |
| |
| </div> |
| </div> |
| |
| <div class="rst-footer-buttons row" role="navigation" aria-label="footer navigation"> |
| |
| <a href="../json/json.html" class="btn btn-neutral float-right" title="JSON" accesskey="n">Next: JSON <span class="fa fa-arrow-circle-right"></span></a> |
| |
| |
| <a href="../sensor_framework/sensor_create.html" class="btn btn-neutral" title="Creating and Configuring a Sensor Device" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous: Creating and Configuring a Sensor Device</a> |
| |
| </div> |
| |
| </div> |
| </div> |
| </div> |
| <!-- ENDS CONTENT SECTION --> |
| </div> |
| <!-- ENDS .content --> |
| </div> |
| </div> |
| <footer> |
| <div class="container"> |
| <div class="row"> |
| <div class="col-xs-12"> |
| |
| <p class="copyright">Apache Mynewt is available under Apache License, version 2.0.</p> |
| |
| </div> |
| <div class="col-xs-12"> |
| <div class="logos"> |
| <img src="../../../_static/img/asf_logo_wide_small.png" alt="Apache" title="Apache"> |
| <small class="footnote"> |
| Apache Mynewt, Mynewt, Apache, the Apache feather logo, and the Apache Mynewt project logo are either |
| registered trademarks or trademarks of the Apache Software Foundation in the United States and other countries. |
| </small> |
| <a href=""> |
| <img src="../../../_static/img/add_to_slack.png" alt="Slack Icon" title="Join our Slack Community" /> |
| </a> |
| </div> |
| </div> |
| </div> |
| </div> |
| </footer> |
| </div> |
| <!-- ENDS #wrapper --> |
| |
| |
| |
| <script type="text/javascript"> |
| var DOCUMENTATION_OPTIONS = { |
| URL_ROOT:'../../../', |
| VERSION:'latest', |
| COLLAPSE_INDEX:false, |
| FILE_SUFFIX:'.html', |
| HAS_SOURCE: true, |
| SOURCELINK_SUFFIX: '.txt', |
| LINK_SUFFIX: '.html' |
| }; |
| </script> |
| <script type="text/javascript" src="../../../_static/jquery.js"></script> |
| <script type="text/javascript" src="../../../_static/underscore.js"></script> |
| <script type="text/javascript" src="../../../_static/doctools.js"></script> |
| <script type="text/javascript" src="../../../_static/js/bootstrap-3.0.3.min.js"></script> |
| <script type="text/javascript" src="../../../_static/js/affix.js"></script> |
| <script type="text/javascript" src="../../../_static/js/main.js"></script> |
| |
| |
| |
| </body> |
| </html> |