diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-05-14 16:04:45 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-05-14 16:04:45 -0700 |
commit | 65361948ca7975553757a0e0df4ac7352413044c (patch) | |
tree | 22063c089f67cb0d82623f2edc2c16b7e4389d41 /html/002test.cc.html | |
parent | 64586540eccbc0880341782d329b419ab9d002de (diff) | |
download | mu-65361948ca7975553757a0e0df4ac7352413044c.tar.gz |
1376 - update github docs
Diffstat (limited to 'html/002test.cc.html')
-rw-r--r-- | html/002test.cc.html | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/html/002test.cc.html b/html/002test.cc.html index ef38f047..afbe45ca 100644 --- a/html/002test.cc.html +++ b/html/002test.cc.html @@ -2,7 +2,7 @@ <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> -<title>Mu - 002test.cc</title> +<title>~/Desktop/s/mu/002test.cc</title> <meta name="Generator" content="Vim/7.4"> <meta name="plugin-version" content="vim7.4_v1"> <meta name="syntax" content="cpp"> @@ -55,7 +55,7 @@ long Num_failures = <span class="Constant">0</span><span class="Delimiter">;</sp <span class="PreProc">#define CHECK(X) \</span> <span class="PreProc"> </span>if<span class="PreProc"> (!(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"> 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> <span class="PreProc"> </span><span class="Identifier">return</span><span class="Delimiter">;</span><span class="PreProc"> </span><span class="Comment">/*</span><span class="Comment"> Currently we stop at the very first failure. </span><span class="Comment">*/</span><span class="PreProc"> \</span> <span class="PreProc"> </span><span class="Delimiter">}</span> @@ -63,7 +63,7 @@ long Num_failures = <span class="Constant">0</span><span class="Delimiter">;</sp <span class="PreProc">#define CHECK_EQ(X</span><span class="Delimiter">,</span><span class="PreProc"> Y) \</span> <span class="PreProc"> </span>if<span class="PreProc"> ((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">"</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> <span class="PreProc"> Passed = </span><span class="Constant">false</span><span class="Delimiter">;</span><span class="PreProc"> \</span> <span class="PreProc"> </span><span class="Identifier">return</span><span class="Delimiter">;</span><span class="PreProc"> </span><span class="Comment">/*</span><span class="Comment"> Currently we stop at the very first failure. </span><span class="Comment">*/</span><span class="PreProc"> \</span> @@ -90,10 +90,12 @@ if <span class="Delimiter">(</span>Run_tests<span class="Delimiter">)</span> <sp <span class="Delimiter">}</span> <span class="Comment">// End Tests</span> cerr << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> - if <span class="Delimiter">(</span>Num_failures > <span class="Constant">0</span><span class="Delimiter">)</span> + if <span class="Delimiter">(</span>Num_failures > <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> cerr << Num_failures << <span class="Constant">" failure"</span> << <span class="Delimiter">(</span>Num_failures > <span class="Constant">1</span> ? <span class="Constant">"s"</span> : <span class="Constant">""</span><span class="Delimiter">)</span> << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> + <span class="Identifier">return</span> <span class="Constant">1</span><span class="Delimiter">;</span> + <span class="Delimiter">}</span> <span class="Identifier">return</span> <span class="Constant">0</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> @@ -114,7 +116,7 @@ bool is_number<span class="Delimiter">(</span>const string& s<span class="De <span class="Identifier">return</span> s<span class="Delimiter">.</span>find_first_not_of<span class="Delimiter">(</span><span class="Constant">"0123456789-."</span><span class="Delimiter">)</span> == string::npos<span class="Delimiter">;</span> <span class="Delimiter">}</span> -long long int to_int<span class="Delimiter">(</span>string n<span class="Delimiter">)</span> <span class="Delimiter">{</span> +long long int to_number<span class="Delimiter">(</span>string n<span class="Delimiter">)</span> <span class="Delimiter">{</span> char* end = <span class="Constant">NULL</span><span class="Delimiter">;</span> long long int result = strtoll<span class="Delimiter">(</span>n<span class="Delimiter">.</span>c_str<span class="Delimiter">(),</span> &end<span class="Delimiter">,</span> <span class="Comment">/*</span><span class="Comment">any base</span><span class="Comment">*/</span><span class="Constant">0</span><span class="Delimiter">);</span> assert<span class="Delimiter">(</span>*end == <span class="cSpecial">'\0'</span><span class="Delimiter">);</span> |