diff options
Diffstat (limited to 'html/003trace.test.cc.html')
-rw-r--r-- | html/003trace.test.cc.html | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/html/003trace.test.cc.html b/html/003trace.test.cc.html index 11f5060e..9c0a7982 100644 --- a/html/003trace.test.cc.html +++ b/html/003trace.test.cc.html @@ -13,9 +13,8 @@ pre { white-space: pre-wrap; font-family: monospace; color: #eeeeee; background-color: #080808; } body { font-family: monospace; color: #eeeeee; background-color: #080808; } * { font-size: 1.05em; } -.Constant { color: #00a0a0; } .cSpecial { color: #008000; } -.Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } +.Constant { color: #00a0a0; } .Comment { color: #9090ff; } .Delimiter { color: #a04060; } --> @@ -29,60 +28,60 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } </head> <body> <pre id='vimCodeElement'> -<span class="Normal">void</span> test_trace_check_compares<span class="Delimiter">()</span> <span class="Delimiter">{</span> +void test_trace_check_compares<span class="Delimiter">()</span> <span class="Delimiter">{</span> trace<span class="Delimiter">(</span><span class="Constant">"test layer"</span><span class="Delimiter">)</span> << <span class="Constant">"foo"</span> << end<span class="Delimiter">();</span> CHECK_TRACE_CONTENTS<span class="Delimiter">(</span><span class="Constant">"test layer: foo"</span><span class="Delimiter">);</span> <span class="Delimiter">}</span> -<span class="Normal">void</span> test_trace_check_ignores_other_layers<span class="Delimiter">()</span> <span class="Delimiter">{</span> +void test_trace_check_ignores_other_layers<span class="Delimiter">()</span> <span class="Delimiter">{</span> trace<span class="Delimiter">(</span><span class="Constant">"test layer 1"</span><span class="Delimiter">)</span> << <span class="Constant">"foo"</span> << end<span class="Delimiter">();</span> trace<span class="Delimiter">(</span><span class="Constant">"test layer 2"</span><span class="Delimiter">)</span> << <span class="Constant">"bar"</span> << end<span class="Delimiter">();</span> CHECK_TRACE_CONTENTS<span class="Delimiter">(</span><span class="Constant">"test layer 1: foo"</span><span class="Delimiter">);</span> CHECK_TRACE_DOESNT_CONTAIN<span class="Delimiter">(</span><span class="Constant">"test layer 2: foo"</span><span class="Delimiter">);</span> <span class="Delimiter">}</span> -<span class="Normal">void</span> test_trace_check_ignores_other_lines<span class="Delimiter">()</span> <span class="Delimiter">{</span> +void test_trace_check_ignores_other_lines<span class="Delimiter">()</span> <span class="Delimiter">{</span> trace<span class="Delimiter">(</span><span class="Constant">"test layer 1"</span><span class="Delimiter">)</span> << <span class="Constant">"foo"</span> << end<span class="Delimiter">();</span> trace<span class="Delimiter">(</span><span class="Constant">"test layer 1"</span><span class="Delimiter">)</span> << <span class="Constant">"bar"</span> << end<span class="Delimiter">();</span> CHECK_TRACE_CONTENTS<span class="Delimiter">(</span><span class="Constant">"test layer 1: foo"</span><span class="Delimiter">);</span> <span class="Delimiter">}</span> -<span class="Normal">void</span> test_trace_check_ignores_other_lines2<span class="Delimiter">()</span> <span class="Delimiter">{</span> +void test_trace_check_ignores_other_lines2<span class="Delimiter">()</span> <span class="Delimiter">{</span> trace<span class="Delimiter">(</span><span class="Constant">"test layer 1"</span><span class="Delimiter">)</span> << <span class="Constant">"foo"</span> << end<span class="Delimiter">();</span> trace<span class="Delimiter">(</span><span class="Constant">"test layer 1"</span><span class="Delimiter">)</span> << <span class="Constant">"bar"</span> << end<span class="Delimiter">();</span> CHECK_TRACE_CONTENTS<span class="Delimiter">(</span><span class="Constant">"test layer 1: bar"</span><span class="Delimiter">);</span> <span class="Delimiter">}</span> -<span class="Normal">void</span> test_trace_ignores_trailing_whitespace<span class="Delimiter">()</span> <span class="Delimiter">{</span> +void test_trace_ignores_trailing_whitespace<span class="Delimiter">()</span> <span class="Delimiter">{</span> trace<span class="Delimiter">(</span><span class="Constant">"test layer 1"</span><span class="Delimiter">)</span> << <span class="Constant">"foo</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> CHECK_TRACE_CONTENTS<span class="Delimiter">(</span><span class="Constant">"test layer 1: foo"</span><span class="Delimiter">);</span> <span class="Delimiter">}</span> -<span class="Normal">void</span> test_trace_ignores_trailing_whitespace2<span class="Delimiter">()</span> <span class="Delimiter">{</span> +void test_trace_ignores_trailing_whitespace2<span class="Delimiter">()</span> <span class="Delimiter">{</span> trace<span class="Delimiter">(</span><span class="Constant">"test layer 1"</span><span class="Delimiter">)</span> << <span class="Constant">"foo "</span> << end<span class="Delimiter">();</span> CHECK_TRACE_CONTENTS<span class="Delimiter">(</span><span class="Constant">"test layer 1: foo"</span><span class="Delimiter">);</span> <span class="Delimiter">}</span> -<span class="Normal">void</span> test_trace_orders_across_layers<span class="Delimiter">()</span> <span class="Delimiter">{</span> +void test_trace_orders_across_layers<span class="Delimiter">()</span> <span class="Delimiter">{</span> trace<span class="Delimiter">(</span><span class="Constant">"test layer 1"</span><span class="Delimiter">)</span> << <span class="Constant">"foo"</span> << end<span class="Delimiter">();</span> trace<span class="Delimiter">(</span><span class="Constant">"test layer 2"</span><span class="Delimiter">)</span> << <span class="Constant">"bar"</span> << end<span class="Delimiter">();</span> trace<span class="Delimiter">(</span><span class="Constant">"test layer 1"</span><span class="Delimiter">)</span> << <span class="Constant">"qux"</span> << end<span class="Delimiter">();</span> CHECK_TRACE_CONTENTS<span class="Delimiter">(</span><span class="Constant">"test layer 1: foo^Dtest layer 2: bar^Dtest layer 1: qux^D"</span><span class="Delimiter">);</span> <span class="Delimiter">}</span> -<span class="Normal">void</span> test_trace_supports_count<span class="Delimiter">()</span> <span class="Delimiter">{</span> +void test_trace_supports_count<span class="Delimiter">()</span> <span class="Delimiter">{</span> trace<span class="Delimiter">(</span><span class="Constant">"test layer 1"</span><span class="Delimiter">)</span> << <span class="Constant">"foo"</span> << end<span class="Delimiter">();</span> trace<span class="Delimiter">(</span><span class="Constant">"test layer 1"</span><span class="Delimiter">)</span> << <span class="Constant">"foo"</span> << end<span class="Delimiter">();</span> CHECK_EQ<span class="Delimiter">(</span>trace_count<span class="Delimiter">(</span><span class="Constant">"test layer 1"</span><span class="Delimiter">,</span> <span class="Constant">"foo"</span><span class="Delimiter">),</span> <span class="Constant">2</span><span class="Delimiter">);</span> <span class="Delimiter">}</span> -<span class="Normal">void</span> test_trace_supports_count2<span class="Delimiter">()</span> <span class="Delimiter">{</span> +void test_trace_supports_count2<span class="Delimiter">()</span> <span class="Delimiter">{</span> trace<span class="Delimiter">(</span><span class="Constant">"test layer 1"</span><span class="Delimiter">)</span> << <span class="Constant">"foo"</span> << end<span class="Delimiter">();</span> trace<span class="Delimiter">(</span><span class="Constant">"test layer 1"</span><span class="Delimiter">)</span> << <span class="Constant">"bar"</span> << end<span class="Delimiter">();</span> CHECK_EQ<span class="Delimiter">(</span>trace_count<span class="Delimiter">(</span><span class="Constant">"test layer 1"</span><span class="Delimiter">),</span> <span class="Constant">2</span><span class="Delimiter">);</span> <span class="Delimiter">}</span> -<span class="Normal">void</span> test_trace_count_ignores_trailing_whitespace<span class="Delimiter">()</span> <span class="Delimiter">{</span> +void test_trace_count_ignores_trailing_whitespace<span class="Delimiter">()</span> <span class="Delimiter">{</span> trace<span class="Delimiter">(</span><span class="Constant">"test layer 1"</span><span class="Delimiter">)</span> << <span class="Constant">"foo</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> CHECK<span class="Delimiter">(</span>trace_count<span class="Delimiter">(</span><span class="Constant">"test layer 1"</span><span class="Delimiter">,</span> <span class="Constant">"foo"</span><span class="Delimiter">)</span> == <span class="Constant">1</span><span class="Delimiter">);</span> <span class="Delimiter">}</span> @@ -100,26 +99,26 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } <span class="Comment">// can't check trace because trace methods call 'split'</span> -<span class="Normal">void</span> test_split_returns_at_least_one_elem<span class="Delimiter">()</span> <span class="Delimiter">{</span> +void test_split_returns_at_least_one_elem<span class="Delimiter">()</span> <span class="Delimiter">{</span> vector<string> result = split<span class="Delimiter">(</span><span class="Constant">""</span><span class="Delimiter">,</span> <span class="Constant">","</span><span class="Delimiter">);</span> CHECK_EQ<span class="Delimiter">(</span>result<span class="Delimiter">.</span>size<span class="Delimiter">(),</span> <span class="Constant">1</span><span class="Delimiter">);</span> CHECK_EQ<span class="Delimiter">(</span>result<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">),</span> <span class="Constant">""</span><span class="Delimiter">);</span> <span class="Delimiter">}</span> -<span class="Normal">void</span> test_split_returns_entire_input_when_no_delim<span class="Delimiter">()</span> <span class="Delimiter">{</span> +void test_split_returns_entire_input_when_no_delim<span class="Delimiter">()</span> <span class="Delimiter">{</span> vector<string> result = split<span class="Delimiter">(</span><span class="Constant">"abc"</span><span class="Delimiter">,</span> <span class="Constant">","</span><span class="Delimiter">);</span> CHECK_EQ<span class="Delimiter">(</span>result<span class="Delimiter">.</span>size<span class="Delimiter">(),</span> <span class="Constant">1</span><span class="Delimiter">);</span> CHECK_EQ<span class="Delimiter">(</span>result<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">),</span> <span class="Constant">"abc"</span><span class="Delimiter">);</span> <span class="Delimiter">}</span> -<span class="Normal">void</span> test_split_works<span class="Delimiter">()</span> <span class="Delimiter">{</span> +void test_split_works<span class="Delimiter">()</span> <span class="Delimiter">{</span> vector<string> result = split<span class="Delimiter">(</span><span class="Constant">"abc,def"</span><span class="Delimiter">,</span> <span class="Constant">","</span><span class="Delimiter">);</span> CHECK_EQ<span class="Delimiter">(</span>result<span class="Delimiter">.</span>size<span class="Delimiter">(),</span> <span class="Constant">2</span><span class="Delimiter">);</span> CHECK_EQ<span class="Delimiter">(</span>result<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">),</span> <span class="Constant">"abc"</span><span class="Delimiter">);</span> CHECK_EQ<span class="Delimiter">(</span>result<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">),</span> <span class="Constant">"def"</span><span class="Delimiter">);</span> <span class="Delimiter">}</span> -<span class="Normal">void</span> test_split_works2<span class="Delimiter">()</span> <span class="Delimiter">{</span> +void test_split_works2<span class="Delimiter">()</span> <span class="Delimiter">{</span> vector<string> result = split<span class="Delimiter">(</span><span class="Constant">"abc,def,ghi"</span><span class="Delimiter">,</span> <span class="Constant">","</span><span class="Delimiter">);</span> CHECK_EQ<span class="Delimiter">(</span>result<span class="Delimiter">.</span>size<span class="Delimiter">(),</span> <span class="Constant">3</span><span class="Delimiter">);</span> CHECK_EQ<span class="Delimiter">(</span>result<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">),</span> <span class="Constant">"abc"</span><span class="Delimiter">);</span> @@ -127,7 +126,7 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } CHECK_EQ<span class="Delimiter">(</span>result<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">2</span><span class="Delimiter">),</span> <span class="Constant">"ghi"</span><span class="Delimiter">);</span> <span class="Delimiter">}</span> -<span class="Normal">void</span> test_split_handles_multichar_delim<span class="Delimiter">()</span> <span class="Delimiter">{</span> +void test_split_handles_multichar_delim<span class="Delimiter">()</span> <span class="Delimiter">{</span> vector<string> result = split<span class="Delimiter">(</span><span class="Constant">"abc,,def,,ghi"</span><span class="Delimiter">,</span> <span class="Constant">",,"</span><span class="Delimiter">);</span> CHECK_EQ<span class="Delimiter">(</span>result<span class="Delimiter">.</span>size<span class="Delimiter">(),</span> <span class="Constant">3</span><span class="Delimiter">);</span> CHECK_EQ<span class="Delimiter">(</span>result<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">),</span> <span class="Constant">"abc"</span><span class="Delimiter">);</span> @@ -135,7 +134,7 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } CHECK_EQ<span class="Delimiter">(</span>result<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">2</span><span class="Delimiter">),</span> <span class="Constant">"ghi"</span><span class="Delimiter">);</span> <span class="Delimiter">}</span> -<span class="Normal">void</span> test_trim<span class="Delimiter">()</span> <span class="Delimiter">{</span> +void test_trim<span class="Delimiter">()</span> <span class="Delimiter">{</span> CHECK_EQ<span class="Delimiter">(</span>trim<span class="Delimiter">(</span><span class="Constant">""</span><span class="Delimiter">),</span> <span class="Constant">""</span><span class="Delimiter">);</span> CHECK_EQ<span class="Delimiter">(</span>trim<span class="Delimiter">(</span><span class="Constant">" "</span><span class="Delimiter">),</span> <span class="Constant">""</span><span class="Delimiter">);</span> CHECK_EQ<span class="Delimiter">(</span>trim<span class="Delimiter">(</span><span class="Constant">" "</span><span class="Delimiter">),</span> <span class="Constant">""</span><span class="Delimiter">);</span> |