diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-03-02 04:41:24 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-03-02 04:41:24 -0800 |
commit | a802f0cedc7b5580d746f46ae62fcf8074ae3c49 (patch) | |
tree | ab8f531d51374491f2998f63239dbb767b21e493 /html/001help.cc.html | |
parent | a1e4fa7194da184b74083362de537ece23a2f2f1 (diff) | |
download | mu-a802f0cedc7b5580d746f46ae62fcf8074ae3c49.tar.gz |
3749
Diffstat (limited to 'html/001help.cc.html')
-rw-r--r-- | html/001help.cc.html | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/html/001help.cc.html b/html/001help.cc.html index 7a0d02f3..201d24ea 100644 --- a/html/001help.cc.html +++ b/html/001help.cc.html @@ -79,7 +79,7 @@ if ('onhashchange' in window) { <span id="L18" class="LineNr"> 18 </span> << <span class="Constant">"Examples:</span><span class="cSpecial">\n</span><span class="Constant">"</span> <span id="L19" class="LineNr"> 19 </span> << <span class="Constant">" To load files and run 'main':</span><span class="cSpecial">\n</span><span class="Constant">"</span> <span id="L20" class="LineNr"> 20 </span> << <span class="Constant">" mu file1.mu file2.mu ...</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L21" class="LineNr"> 21 </span> << <span class="Constant">" To run 'main' and dump a <a href='003trace.cc.html#L171'>trace</a> of all operations at the <a href='003trace.cc.html#L195'>end</a>:</span><span class="cSpecial">\n</span><span class="Constant">"</span> +<span id="L21" class="LineNr"> 21 </span> << <span class="Constant">" To run 'main' and dump a <a href='003trace.cc.html#L169'>trace</a> of all operations at the <a href='003trace.cc.html#L193'>end</a>:</span><span class="cSpecial">\n</span><span class="Constant">"</span> <span id="L22" class="LineNr"> 22 </span> << <span class="Constant">" mu --trace file1.mu file2.mu ...</span><span class="cSpecial">\n</span><span class="Constant">"</span> <span id="L23" class="LineNr"> 23 </span> << <span class="Constant">" To run all tests:</span><span class="cSpecial">\n</span><span class="Constant">"</span> <span id="L24" class="LineNr"> 24 </span> << <span class="Constant">" mu test</span><span class="cSpecial">\n</span><span class="Constant">"</span> @@ -87,7 +87,7 @@ if ('onhashchange' in window) { <span id="L26" class="LineNr"> 26 </span> << <span class="Constant">" mu test file1.mu file2.mu ...</span><span class="cSpecial">\n</span><span class="Constant">"</span> <span id="L27" class="LineNr"> 27 </span> << <span class="Constant">" To run a single Mu <a href='050scenario.cc.html#L57'>scenario</a>:</span><span class="cSpecial">\n</span><span class="Constant">"</span> <span id="L28" class="LineNr"> 28 </span> << <span class="Constant">" mu test file1.mu file2.mu ... <a href='050scenario.cc.html#L57'>scenario</a></span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L29" class="LineNr"> 29 </span> << <span class="Constant">" To run a single Mu <a href='050scenario.cc.html#L57'>scenario</a> and dump a <a href='003trace.cc.html#L171'>trace</a> at the <a href='003trace.cc.html#L195'>end</a>:</span><span class="cSpecial">\n</span><span class="Constant">"</span> +<span id="L29" class="LineNr"> 29 </span> << <span class="Constant">" To run a single Mu <a href='050scenario.cc.html#L57'>scenario</a> and dump a <a href='003trace.cc.html#L169'>trace</a> at the <a href='003trace.cc.html#L193'>end</a>:</span><span class="cSpecial">\n</span><span class="Constant">"</span> <span id="L30" class="LineNr"> 30 </span> << <span class="Constant">" mu --trace test file1.mu file2.mu ... <a href='050scenario.cc.html#L57'>scenario</a></span><span class="cSpecial">\n</span><span class="Constant">"</span> <span id="L31" class="LineNr"> 31 </span> << <span class="Constant">" To load files and run only the tests in explicitly loaded files (for apps):</span><span class="cSpecial">\n</span><span class="Constant">"</span> <span id="L32" class="LineNr"> 32 </span> << <span class="Constant">" mu --test-only-app test file1.mu file2.mu ...</span><span class="cSpecial">\n</span><span class="Constant">"</span> @@ -98,7 +98,7 @@ if ('onhashchange' in window) { <span id="L37" class="LineNr"> 37 </span> << <span class="Constant">" To pass ingredients to a mu program, provide them after '--':</span><span class="cSpecial">\n</span><span class="Constant">"</span> <span id="L38" class="LineNr"> 38 </span> << <span class="Constant">" mu file_or_dir1 file_or_dir2 ... -- ingredient1 ingredient2 ...</span><span class="cSpecial">\n</span><span class="Constant">"</span> <span id="L39" class="LineNr"> 39 </span> << <span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L40" class="LineNr"> 40 </span> << <span class="Constant">" To browse a <a href='003trace.cc.html#L171'>trace</a> generated by a previous run:</span><span class="cSpecial">\n</span><span class="Constant">"</span> +<span id="L40" class="LineNr"> 40 </span> << <span class="Constant">" To browse a <a href='003trace.cc.html#L169'>trace</a> generated by a previous run:</span><span class="cSpecial">\n</span><span class="Constant">"</span> <span id="L41" class="LineNr"> 41 </span> << <span class="Constant">" mu browse-trace file</span><span class="cSpecial">\n</span><span class="Constant">"</span> <span id="L42" class="LineNr"> 42 </span> <span class="Delimiter">;</span> <span id="L43" class="LineNr"> 43 </span> <span class="Identifier">return</span> <span class="Constant">0</span><span class="Delimiter">;</span> @@ -134,9 +134,9 @@ if ('onhashchange' in window) { <span id="L73" class="LineNr"> 73 </span> <span id="L74" class="LineNr"> 74 </span><span class="Normal">bool</span> <a href='001help.cc.html#L74'>starts_with</a><span class="Delimiter">(</span><span class="Normal">const</span> string& s<span class="Delimiter">,</span> <span class="Normal">const</span> string& pat<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L75" class="LineNr"> 75 </span> string::const_iterator a=s<span class="Delimiter">.</span>begin<span class="Delimiter">(),</span> b=pat<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> -<span id="L76" class="LineNr"> 76 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Comment">/*</span><span class="Comment">nada</span><span class="Comment">*/</span><span class="Delimiter">;</span> a!=s<span class="Delimiter">.</span><a href='003trace.cc.html#L195'>end</a><span class="Delimiter">()</span> && b!=pat<span class="Delimiter">.</span><a href='003trace.cc.html#L195'>end</a><span class="Delimiter">();</span> ++a<span class="Delimiter">,</span> ++b<span class="Delimiter">)</span> +<span id="L76" class="LineNr"> 76 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Comment">/*</span><span class="Comment">nada</span><span class="Comment">*/</span><span class="Delimiter">;</span> a!=s<span class="Delimiter">.</span><a href='003trace.cc.html#L193'>end</a><span class="Delimiter">()</span> && b!=pat<span class="Delimiter">.</span><a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> ++a<span class="Delimiter">,</span> ++b<span class="Delimiter">)</span> <span id="L77" class="LineNr"> 77 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>*a != *b<span class="Delimiter">)</span> <span class="Identifier">return</span> <span class="Constant">false</span><span class="Delimiter">;</span> -<span id="L78" class="LineNr"> 78 </span> <span class="Identifier">return</span> b == pat<span class="Delimiter">.</span><a href='003trace.cc.html#L195'>end</a><span class="Delimiter">();</span> +<span id="L78" class="LineNr"> 78 </span> <span class="Identifier">return</span> b == pat<span class="Delimiter">.</span><a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> <span id="L79" class="LineNr"> 79 </span><span class="Delimiter">}</span> <span id="L80" class="LineNr"> 80 </span> <span id="L81" class="LineNr"> 81 </span><span class="Comment">//: I'll throw some style conventions here for want of a better place for them.</span> @@ -268,12 +268,12 @@ if ('onhashchange' in window) { <span id="L207" class="LineNr">207 </span><span class="Comment">// from <a href="http://stackoverflow.com/questions/152643/idiomatic-c-for-reading-from-a-const-map">http://stackoverflow.com/questions/152643/idiomatic-c-for-reading-from-a-const-map</a></span> <span id="L208" class="LineNr">208 </span><span class="Normal">template</span><<span class="Normal">typename</span> T> <span class="Normal">typename</span> T::mapped_type& get<span class="Delimiter">(</span>T& map<span class="Delimiter">,</span> <span class="Normal">typename</span> T::key_type <span class="Normal">const</span>& key<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L209" class="LineNr">209 </span> <span class="Normal">typename</span> T::iterator iter<span class="Delimiter">(</span>map<span class="Delimiter">.</span>find<span class="Delimiter">(</span>key<span class="Delimiter">));</span> -<span id="L210" class="LineNr">210 </span> assert<span class="Delimiter">(</span>iter != map<span class="Delimiter">.</span><a href='003trace.cc.html#L195'>end</a><span class="Delimiter">());</span> +<span id="L210" class="LineNr">210 </span> assert<span class="Delimiter">(</span>iter != map<span class="Delimiter">.</span><a href='003trace.cc.html#L193'>end</a><span class="Delimiter">());</span> <span id="L211" class="LineNr">211 </span> <span class="Identifier">return</span> iter<span class="Delimiter">-></span>second<span class="Delimiter">;</span> <span id="L212" class="LineNr">212 </span><span class="Delimiter">}</span> <span id="L213" class="LineNr">213 </span><span class="Normal">template</span><<span class="Normal">typename</span> T> <span class="Normal">typename</span> T::mapped_type <span class="Normal">const</span>& get<span class="Delimiter">(</span><span class="Normal">const</span> T& map<span class="Delimiter">,</span> <span class="Normal">typename</span> T::key_type <span class="Normal">const</span>& key<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L214" class="LineNr">214 </span> <span class="Normal">typename</span> T::const_iterator iter<span class="Delimiter">(</span>map<span class="Delimiter">.</span>find<span class="Delimiter">(</span>key<span class="Delimiter">));</span> -<span id="L215" class="LineNr">215 </span> assert<span class="Delimiter">(</span>iter != map<span class="Delimiter">.</span><a href='003trace.cc.html#L195'>end</a><span class="Delimiter">());</span> +<span id="L215" class="LineNr">215 </span> assert<span class="Delimiter">(</span>iter != map<span class="Delimiter">.</span><a href='003trace.cc.html#L193'>end</a><span class="Delimiter">());</span> <span id="L216" class="LineNr">216 </span> <span class="Identifier">return</span> iter<span class="Delimiter">-></span>second<span class="Delimiter">;</span> <span id="L217" class="LineNr">217 </span><span class="Delimiter">}</span> <span id="L218" class="LineNr">218 </span><span class="Normal">template</span><<span class="Normal">typename</span> T> <span class="Normal">typename</span> T::mapped_type <span class="Normal">const</span>& <a href='001help.cc.html#L218'>put</a><span class="Delimiter">(</span>T& map<span class="Delimiter">,</span> <span class="Normal">typename</span> T::key_type <span class="Normal">const</span>& key<span class="Delimiter">,</span> <span class="Normal">typename</span> T::mapped_type <span class="Normal">const</span>& value<span class="Delimiter">)</span> <span class="Delimiter">{</span> @@ -281,7 +281,7 @@ if ('onhashchange' in window) { <span id="L220" class="LineNr">220 </span> <span class="Identifier">return</span> map[key]<span class="Delimiter">;</span> <span id="L221" class="LineNr">221 </span><span class="Delimiter">}</span> <span id="L222" class="LineNr">222 </span><span class="Normal">template</span><<span class="Normal">typename</span> T> <span class="Normal">bool</span> contains_key<span class="Delimiter">(</span>T& map<span class="Delimiter">,</span> <span class="Normal">typename</span> T::key_type <span class="Normal">const</span>& key<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L223" class="LineNr">223 </span> <span class="Identifier">return</span> map<span class="Delimiter">.</span>find<span class="Delimiter">(</span>key<span class="Delimiter">)</span> != map<span class="Delimiter">.</span><a href='003trace.cc.html#L195'>end</a><span class="Delimiter">();</span> +<span id="L223" class="LineNr">223 </span> <span class="Identifier">return</span> map<span class="Delimiter">.</span>find<span class="Delimiter">(</span>key<span class="Delimiter">)</span> != map<span class="Delimiter">.</span><a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> <span id="L224" class="LineNr">224 </span><span class="Delimiter">}</span> <span id="L225" class="LineNr">225 </span><span class="Normal">template</span><<span class="Normal">typename</span> T> <span class="Normal">typename</span> T::mapped_type& <a href='001help.cc.html#L225'>get_or_insert</a><span class="Delimiter">(</span>T& map<span class="Delimiter">,</span> <span class="Normal">typename</span> T::key_type <span class="Normal">const</span>& key<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L226" class="LineNr">226 </span> <span class="Identifier">return</span> map[key]<span class="Delimiter">;</span> |