diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-09-10 10:43:19 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-09-10 10:43:19 -0700 |
commit | 44c1aeef226542d692f0002b5cca5a3c30935d18 (patch) | |
tree | 46452902ff779d93e4adcb57cda29d923766a5be /html/002test.cc.html | |
parent | c7db6a160a9a43d0905d5dea44e742b47acfa42f (diff) | |
download | mu-44c1aeef226542d692f0002b5cca5a3c30935d18.tar.gz |
3315
Diffstat (limited to 'html/002test.cc.html')
-rw-r--r-- | html/002test.cc.html | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/html/002test.cc.html b/html/002test.cc.html index 3afbc33d..43b362de 100644 --- a/html/002test.cc.html +++ b/html/002test.cc.html @@ -44,18 +44,20 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Delimiter">:(before "End Types")</span> <span class="Normal">typedef</span> <span class="Normal">void</span> <span class="Delimiter">(</span>*test_fn<span class="Delimiter">)(</span><span class="Normal">void</span><span class="Delimiter">);</span> - -<span class="Delimiter">:(before "End Globals")</span> +<span class="Delimiter">:(before "Globals")</span> +<span class="Comment">// move a global ahead into types that we can't generate an extern declaration for</span> <span class="Normal">const</span> test_fn Tests[] = <span class="Delimiter">{</span> <span class="PreProc"> #include </span><span class="Constant">"test_list"</span> <span class="Comment">// auto-generated; see makefile</span> <span class="Delimiter">};</span> +<span class="Delimiter">:(before "End Globals")</span> <span class="Normal">bool</span> Run_tests = <span class="Constant">false</span><span class="Delimiter">;</span> <span class="Normal">bool</span> Passed = <span class="Constant">true</span><span class="Delimiter">;</span> <span class="Comment">// set this to false inside any test to indicate failure</span> <span class="Normal">long</span> Num_failures = <span class="Constant">0</span><span class="Delimiter">;</span> +<span class="Delimiter">:(before "End Includes")</span> <span class="PreProc">#define CHECK(X) \</span> -<span class="PreProc"> </span><span class="Normal">if</span><span class="PreProc"> (!(X)) </span><span class="Delimiter">{</span><span class="PreProc"> \</span> +<span class="PreProc"> </span><span class="Normal">if</span><span class="PreProc"> (Passed && !(X)) </span><span class="Delimiter">{</span><span class="PreProc"> \</span> <span class="PreProc"> ++Num_failures</span><span class="Delimiter">;</span><span class="PreProc"> \</span> <span class="PreProc"> cerr << </span><span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">F - "</span><span class="PreProc"> << __FUNCTION__ << </span><span class="Constant">"("</span><span class="PreProc"> << </span><span class="Constant">__FILE__</span><span class="PreProc"> << </span><span class="Constant">":"</span><span class="PreProc"> << </span><span class="Constant">__LINE__</span><span class="PreProc"> << </span><span class="Constant">"): "</span><span class="PreProc"> << #X << </span><span class="cSpecial">'\n'</span><span class="Delimiter">;</span><span class="PreProc"> \</span> <span class="PreProc"> Passed = </span><span class="Constant">false</span><span class="Delimiter">;</span><span class="PreProc"> \</span> @@ -63,7 +65,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="PreProc"> </span><span class="Delimiter">}</span> <span class="PreProc">#define CHECK_EQ(X</span><span class="Delimiter">,</span><span class="PreProc"> Y) \</span> -<span class="PreProc"> </span><span class="Normal">if</span><span class="PreProc"> ((X) != (Y)) </span><span class="Delimiter">{</span><span class="PreProc"> \</span> +<span class="PreProc"> </span><span class="Normal">if</span><span class="PreProc"> (Passed && (X) != (Y)) </span><span class="Delimiter">{</span><span class="PreProc"> \</span> <span class="PreProc"> ++Num_failures</span><span class="Delimiter">;</span><span class="PreProc"> \</span> <span class="PreProc"> cerr << </span><span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">F - "</span><span class="PreProc"> << __FUNCTION__ << </span><span class="Constant">"("</span><span class="PreProc"> << </span><span class="Constant">__FILE__</span><span class="PreProc"> << </span><span class="Constant">":"</span><span class="PreProc"> << </span><span class="Constant">__LINE__</span><span class="PreProc"> << </span><span class="Constant">"): "</span><span class="PreProc"> << #X << </span><span class="Constant">" == "</span><span class="PreProc"> << #Y << </span><span class="cSpecial">'\n'</span><span class="Delimiter">;</span><span class="PreProc"> \</span> <span class="PreProc"> cerr << </span><span class="Constant">" got "</span><span class="PreProc"> << (X) << </span><span class="cSpecial">'\n'</span><span class="Delimiter">;</span><span class="PreProc"> </span><span class="Comment">/*</span><span class="Comment"> BEWARE: multiple eval </span><span class="Comment">*/</span><span class="PreProc"> \</span> |