This commit is contained in:
bthomee
2025-11-04 00:36:48 -08:00
parent 691c2d46b0
commit 33451fdc96
3033 changed files with 499624 additions and 524738 deletions

View File

@@ -81,107 +81,88 @@ $(document).ready(function() { init_codefold(0); });
<div class="headertitle"><div class="title">FileUtilities_test.cpp</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">//------------------------------------------------------------------------------</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">/*</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment"> This file is part of rippled: https://github.com/ripple/rippled</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment"> Copyright (c) 2018 Ripple Labs Inc.</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment"></span> </div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment"> Permission to use, copy, modify, and/or distribute this software for any</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment"> purpose with or without fee is hereby granted, provided that the above</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment"> copyright notice and this permission notice appear in all copies.</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment"></span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment"> THE SOFTWARE IS PROVIDED &quot;AS IS&quot; AND THE AUTHOR DISCLAIMS ALL WARRANTIES</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment"> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment"> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment"> ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment"> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment"> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment"> OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">*/</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">//==============================================================================</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#include &lt;test/unit_test/FileDirGuard.h&gt;</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#include &lt;xrpl/basics/ByteUtilities.h&gt;</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="preprocessor">#include &lt;xrpl/basics/FileUtilities.h&gt;</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="preprocessor">#include &lt;xrpl/beast/unit_test.h&gt;</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceripple.html">ripple</a> {</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
<div class="foldopen" id="foldopen00028" data-start="{" data-end="};">
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="classripple_1_1FileUtilities__test.html"> 28</a></span><span class="keyword">class </span><a class="code hl_class" href="classripple_1_1FileUtilities__test.html">FileUtilities_test</a> : <span class="keyword">public</span> <a class="code hl_class" href="classbeast_1_1unit__test_1_1suite.html">beast::unit_test::suite</a></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span>{</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keywordtype">void</span></div>
<div class="foldopen" id="foldopen00032" data-start="{" data-end="}">
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="classripple_1_1FileUtilities__test.html#a0e6c0183f7372518229a8904ccf05c7b"> 32</a></span> <a class="code hl_function" href="classripple_1_1FileUtilities__test.html#a0e6c0183f7372518229a8904ccf05c7b">testGetFileContents</a>()</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> {</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="keyword">using namespace </span><a class="code hl_namespace" href="namespaceripple_1_1detail.html">ripple::detail</a>;</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">using namespace </span>boost::system;</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="keyword">constexpr</span> <span class="keywordtype">char</span> <span class="keyword">const</span>* expectedContents =</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="stringliteral">&quot;This file is very short. That&#39;s all we need.&quot;</span>;</div>
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#include &lt;test/unit_test/FileDirGuard.h&gt;</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span> </div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#include &lt;xrpl/basics/ByteUtilities.h&gt;</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#include &lt;xrpl/basics/FileUtilities.h&gt;</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include &lt;xrpl/beast/unit_test.h&gt;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceripple.html">ripple</a> {</div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> </div>
<div class="foldopen" id="foldopen00009" data-start="{" data-end="};">
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"><a class="line" href="classripple_1_1FileUtilities__test.html"> 9</a></span><span class="keyword">class </span><a class="code hl_class" href="classripple_1_1FileUtilities__test.html">FileUtilities_test</a> : <span class="keyword">public</span> <a class="code hl_class" href="classbeast_1_1unit__test_1_1suite.html">beast::unit_test::suite</a></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span>{</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> <span class="keywordtype">void</span></div>
<div class="foldopen" id="foldopen00013" data-start="{" data-end="}">
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"><a class="line" href="classripple_1_1FileUtilities__test.html#a0e6c0183f7372518229a8904ccf05c7b"> 13</a></span> <a class="code hl_function" href="classripple_1_1FileUtilities__test.html#a0e6c0183f7372518229a8904ccf05c7b">testGetFileContents</a>()</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> {</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <span class="keyword">using namespace </span><a class="code hl_namespace" href="namespaceripple_1_1detail.html">ripple::detail</a>;</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <span class="keyword">using namespace </span>boost::system;</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="keyword">constexpr</span> <span class="keywordtype">char</span> <span class="keyword">const</span>* expectedContents =</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="stringliteral">&quot;This file is very short. That&#39;s all we need.&quot;</span>;</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> </div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <a class="code hl_class" href="classripple_1_1detail_1_1FileDirGuard.html">FileDirGuard</a> file(</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> *<span class="keyword">this</span>,</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="stringliteral">&quot;test_file&quot;</span>,</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="stringliteral">&quot;test.txt&quot;</span>,</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="stringliteral">&quot;This is temporary text that should get overwritten&quot;</span>);</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> </div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> error_code ec;</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="keyword">auto</span> <span class="keyword">const</span> path = file.<a class="code hl_function" href="classripple_1_1detail_1_1FileDirGuard.html#a6322a69df2d60cafa72257d3f4d225b2">file</a>();</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <a class="code hl_function" href="namespaceripple.html#ae18870f8d8eaa17b582f609cc486aa04">writeFileContents</a>(ec, path, expectedContents);</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> BEAST_EXPECT(!ec);</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> </div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> {</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="comment">// Test with no max</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">auto</span> <span class="keyword">const</span> good = <a class="code hl_function" href="namespaceripple.html#abee5b68c53e8284c704e2ea8986cc922">getFileContents</a>(ec, path);</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> BEAST_EXPECT(!ec);</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> BEAST_EXPECT(good == expectedContents);</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> }</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <a class="code hl_class" href="classripple_1_1detail_1_1FileDirGuard.html">FileDirGuard</a> file(</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> *<span class="keyword">this</span>,</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="stringliteral">&quot;test_file&quot;</span>,</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="stringliteral">&quot;test.txt&quot;</span>,</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="stringliteral">&quot;This is temporary text that should get overwritten&quot;</span>);</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> error_code ec;</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keyword">auto</span> <span class="keyword">const</span> path = file.<a class="code hl_function" href="classripple_1_1detail_1_1FileDirGuard.html#a6322a69df2d60cafa72257d3f4d225b2">file</a>();</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> </div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <a class="code hl_function" href="namespaceripple.html#ae18870f8d8eaa17b582f609cc486aa04">writeFileContents</a>(ec, path, expectedContents);</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> BEAST_EXPECT(!ec);</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> </div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> {</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="comment">// Test with no max</span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keyword">auto</span> <span class="keyword">const</span> good = <a class="code hl_function" href="namespaceripple.html#abee5b68c53e8284c704e2ea8986cc922">getFileContents</a>(ec, path);</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> BEAST_EXPECT(!ec);</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> BEAST_EXPECT(good == expectedContents);</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> }</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> </div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> {</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="comment">// Test with large max</span></div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keyword">auto</span> <span class="keyword">const</span> good = <a class="code hl_function" href="namespaceripple.html#abee5b68c53e8284c704e2ea8986cc922">getFileContents</a>(ec, path, <a class="code hl_function" href="namespaceripple.html#a8f7c1dac6a768426c7fc2bf4b544254a">kilobytes</a>(1));</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> BEAST_EXPECT(!ec);</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> BEAST_EXPECT(good == expectedContents);</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> }</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> </div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> {</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="comment">// Test with small max</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keyword">auto</span> <span class="keyword">const</span> bad = <a class="code hl_function" href="namespaceripple.html#abee5b68c53e8284c704e2ea8986cc922">getFileContents</a>(ec, path, 16);</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> BEAST_EXPECT(</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> ec &amp;&amp; ec.value() == boost::system::errc::file_too_large);</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> BEAST_EXPECT(bad.empty());</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> }</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> }</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> {</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="comment">// Test with large max</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keyword">auto</span> <span class="keyword">const</span> good = <a class="code hl_function" href="namespaceripple.html#abee5b68c53e8284c704e2ea8986cc922">getFileContents</a>(ec, path, <a class="code hl_function" href="namespaceripple.html#a8f7c1dac6a768426c7fc2bf4b544254a">kilobytes</a>(1));</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> BEAST_EXPECT(!ec);</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> BEAST_EXPECT(good == expectedContents);</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> }</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> </div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> {</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="comment">// Test with small max</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keyword">auto</span> <span class="keyword">const</span> bad = <a class="code hl_function" href="namespaceripple.html#abee5b68c53e8284c704e2ea8986cc922">getFileContents</a>(ec, path, 16);</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> BEAST_EXPECT(</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> ec &amp;&amp; ec.value() == boost::system::errc::file_too_large);</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> BEAST_EXPECT(bad.empty());</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> }</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> }</div>
</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> </div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="keywordtype">void</span></div>
<div class="foldopen" id="foldopen00076" data-start="{" data-end="}">
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"><a class="line" href="classripple_1_1FileUtilities__test.html#aa1b2698cec02912b9a7286f12a758bcf"> 76</a></span> <a class="code hl_function" href="classripple_1_1FileUtilities__test.html#aa1b2698cec02912b9a7286f12a758bcf">run</a>()<span class="keyword"> override</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span><span class="keyword"> </span>{</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <a class="code hl_function" href="classripple_1_1FileUtilities__test.html#a0e6c0183f7372518229a8904ccf05c7b">testGetFileContents</a>();</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> }</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> </div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keywordtype">void</span></div>
<div class="foldopen" id="foldopen00057" data-start="{" data-end="}">
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"><a class="line" href="classripple_1_1FileUtilities__test.html#aa1b2698cec02912b9a7286f12a758bcf"> 57</a></span> <a class="code hl_function" href="classripple_1_1FileUtilities__test.html#aa1b2698cec02912b9a7286f12a758bcf">run</a>()<span class="keyword"> override</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span><span class="keyword"> </span>{</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <a class="code hl_function" href="classripple_1_1FileUtilities__test.html#a0e6c0183f7372518229a8904ccf05c7b">testGetFileContents</a>();</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> }</div>
</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span>};</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span>};</div>
</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> </div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"><a class="line" href="namespaceripple.html#ae76bd9240892b070dd200e47766b5762"> 82</a></span>BEAST_DEFINE_TESTSUITE(FileUtilities, basics, <a class="code hl_namespace" href="namespaceripple.html">ripple</a>);</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span>} <span class="comment">// namespace ripple</span></div>
<div class="ttc" id="aclassbeast_1_1unit__test_1_1suite_html"><div class="ttname"><a href="classbeast_1_1unit__test_1_1suite.html">beast::unit_test::suite</a></div><div class="ttdoc">A testsuite class.</div><div class="ttdef"><b>Definition</b> <a href="suite_8h_source.html#l00054">suite.h:55</a></div></div>
<div class="ttc" id="aclassripple_1_1FileUtilities__test_html"><div class="ttname"><a href="classripple_1_1FileUtilities__test.html">ripple::FileUtilities_test</a></div><div class="ttdef"><b>Definition</b> <a href="FileUtilities__test_8cpp_source.html#l00028">FileUtilities_test.cpp:29</a></div></div>
<div class="ttc" id="aclassripple_1_1FileUtilities__test_html_a0e6c0183f7372518229a8904ccf05c7b"><div class="ttname"><a href="classripple_1_1FileUtilities__test.html#a0e6c0183f7372518229a8904ccf05c7b">ripple::FileUtilities_test::testGetFileContents</a></div><div class="ttdeci">void testGetFileContents()</div><div class="ttdef"><b>Definition</b> <a href="FileUtilities__test_8cpp_source.html#l00032">FileUtilities_test.cpp:32</a></div></div>
<div class="ttc" id="aclassripple_1_1FileUtilities__test_html_aa1b2698cec02912b9a7286f12a758bcf"><div class="ttname"><a href="classripple_1_1FileUtilities__test.html#aa1b2698cec02912b9a7286f12a758bcf">ripple::FileUtilities_test::run</a></div><div class="ttdeci">void run() override</div><div class="ttdoc">Runs the suite.</div><div class="ttdef"><b>Definition</b> <a href="FileUtilities__test_8cpp_source.html#l00076">FileUtilities_test.cpp:76</a></div></div>
<div class="ttc" id="aclassripple_1_1detail_1_1FileDirGuard_html"><div class="ttname"><a href="classripple_1_1detail_1_1FileDirGuard.html">ripple::detail::FileDirGuard</a></div><div class="ttdoc">Write a file in a directory and remove when done.</div><div class="ttdef"><b>Definition</b> <a href="FileDirGuard_8h_source.html#l00110">FileDirGuard.h:111</a></div></div>
<div class="ttc" id="aclassripple_1_1detail_1_1FileDirGuard_html_a6322a69df2d60cafa72257d3f4d225b2"><div class="ttname"><a href="classripple_1_1detail_1_1FileDirGuard.html#a6322a69df2d60cafa72257d3f4d225b2">ripple::detail::FileDirGuard::file</a></div><div class="ttdeci">path const &amp; file() const</div><div class="ttdef"><b>Definition</b> <a href="FileDirGuard_8h_source.html#l00167">FileDirGuard.h:167</a></div></div>
<div class="ttc" id="anamespaceripple_1_1detail_html"><div class="ttname"><a href="namespaceripple_1_1detail.html">ripple::detail</a></div><div class="ttdef"><b>Definition</b> <a href="base__uint_8h_source.html#l00047">base_uint.h:47</a></div></div>
<div class="ttc" id="anamespaceripple_html"><div class="ttname"><a href="namespaceripple.html">ripple</a></div><div class="ttdoc">Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.</div><div class="ttdef"><b>Definition</b> <a href="algorithm_8h_source.html#l00025">algorithm.h:25</a></div></div>
<div class="ttc" id="anamespaceripple_html_a8f7c1dac6a768426c7fc2bf4b544254a"><div class="ttname"><a href="namespaceripple.html#a8f7c1dac6a768426c7fc2bf4b544254a">ripple::kilobytes</a></div><div class="ttdeci">constexpr auto kilobytes(T value) noexcept</div><div class="ttdef"><b>Definition</b> <a href="ByteUtilities_8h_source.html#l00027">ByteUtilities.h:27</a></div></div>
<div class="ttc" id="anamespaceripple_html_abee5b68c53e8284c704e2ea8986cc922"><div class="ttname"><a href="namespaceripple.html#abee5b68c53e8284c704e2ea8986cc922">ripple::getFileContents</a></div><div class="ttdeci">std::string getFileContents(boost::system::error_code &amp;ec, boost::filesystem::path const &amp;sourcePath, std::optional&lt; std::size_t &gt; maxSize=std::nullopt)</div><div class="ttdef"><b>Definition</b> <a href="FileUtilities_8cpp_source.html#l00040">FileUtilities.cpp:40</a></div></div>
<div class="ttc" id="anamespaceripple_html_ae18870f8d8eaa17b582f609cc486aa04"><div class="ttname"><a href="namespaceripple.html#ae18870f8d8eaa17b582f609cc486aa04">ripple::writeFileContents</a></div><div class="ttdeci">void writeFileContents(boost::system::error_code &amp;ec, boost::filesystem::path const &amp;destPath, std::string const &amp;contents)</div><div class="ttdef"><b>Definition</b> <a href="FileUtilities_8cpp_source.html#l00081">FileUtilities.cpp:81</a></div></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> </div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"><a class="line" href="namespaceripple.html#ae76bd9240892b070dd200e47766b5762"> 63</a></span>BEAST_DEFINE_TESTSUITE(FileUtilities, basics, <a class="code hl_namespace" href="namespaceripple.html">ripple</a>);</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> </div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span>} <span class="comment">// namespace ripple</span></div>
<div class="ttc" id="aclassbeast_1_1unit__test_1_1suite_html"><div class="ttname"><a href="classbeast_1_1unit__test_1_1suite.html">beast::unit_test::suite</a></div><div class="ttdoc">A testsuite class.</div><div class="ttdef"><b>Definition</b> <a href="suite_8h_source.html#l00051">suite.h:52</a></div></div>
<div class="ttc" id="aclassripple_1_1FileUtilities__test_html"><div class="ttname"><a href="classripple_1_1FileUtilities__test.html">ripple::FileUtilities_test</a></div><div class="ttdef"><b>Definition</b> <a href="FileUtilities__test_8cpp_source.html#l00009">FileUtilities_test.cpp:10</a></div></div>
<div class="ttc" id="aclassripple_1_1FileUtilities__test_html_a0e6c0183f7372518229a8904ccf05c7b"><div class="ttname"><a href="classripple_1_1FileUtilities__test.html#a0e6c0183f7372518229a8904ccf05c7b">ripple::FileUtilities_test::testGetFileContents</a></div><div class="ttdeci">void testGetFileContents()</div><div class="ttdef"><b>Definition</b> <a href="FileUtilities__test_8cpp_source.html#l00013">FileUtilities_test.cpp:13</a></div></div>
<div class="ttc" id="aclassripple_1_1FileUtilities__test_html_aa1b2698cec02912b9a7286f12a758bcf"><div class="ttname"><a href="classripple_1_1FileUtilities__test.html#aa1b2698cec02912b9a7286f12a758bcf">ripple::FileUtilities_test::run</a></div><div class="ttdeci">void run() override</div><div class="ttdoc">Runs the suite.</div><div class="ttdef"><b>Definition</b> <a href="FileUtilities__test_8cpp_source.html#l00057">FileUtilities_test.cpp:57</a></div></div>
<div class="ttc" id="aclassripple_1_1detail_1_1FileDirGuard_html"><div class="ttname"><a href="classripple_1_1detail_1_1FileDirGuard.html">ripple::detail::FileDirGuard</a></div><div class="ttdoc">Write a file in a directory and remove when done.</div><div class="ttdef"><b>Definition</b> <a href="FileDirGuard_8h_source.html#l00091">FileDirGuard.h:92</a></div></div>
<div class="ttc" id="aclassripple_1_1detail_1_1FileDirGuard_html_a6322a69df2d60cafa72257d3f4d225b2"><div class="ttname"><a href="classripple_1_1detail_1_1FileDirGuard.html#a6322a69df2d60cafa72257d3f4d225b2">ripple::detail::FileDirGuard::file</a></div><div class="ttdeci">path const &amp; file() const</div><div class="ttdef"><b>Definition</b> <a href="FileDirGuard_8h_source.html#l00148">FileDirGuard.h:148</a></div></div>
<div class="ttc" id="anamespaceripple_1_1detail_html"><div class="ttname"><a href="namespaceripple_1_1detail.html">ripple::detail</a></div><div class="ttdef"><b>Definition</b> <a href="base__uint_8h_source.html#l00028">base_uint.h:28</a></div></div>
<div class="ttc" id="anamespaceripple_html"><div class="ttname"><a href="namespaceripple.html">ripple</a></div><div class="ttdoc">Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.</div><div class="ttdef"><b>Definition</b> <a href="algorithm_8h_source.html#l00006">algorithm.h:6</a></div></div>
<div class="ttc" id="anamespaceripple_html_a8f7c1dac6a768426c7fc2bf4b544254a"><div class="ttname"><a href="namespaceripple.html#a8f7c1dac6a768426c7fc2bf4b544254a">ripple::kilobytes</a></div><div class="ttdeci">constexpr auto kilobytes(T value) noexcept</div><div class="ttdef"><b>Definition</b> <a href="ByteUtilities_8h_source.html#l00008">ByteUtilities.h:8</a></div></div>
<div class="ttc" id="anamespaceripple_html_abee5b68c53e8284c704e2ea8986cc922"><div class="ttname"><a href="namespaceripple.html#abee5b68c53e8284c704e2ea8986cc922">ripple::getFileContents</a></div><div class="ttdeci">std::string getFileContents(boost::system::error_code &amp;ec, boost::filesystem::path const &amp;sourcePath, std::optional&lt; std::size_t &gt; maxSize=std::nullopt)</div><div class="ttdef"><b>Definition</b> <a href="FileUtilities_8cpp_source.html#l00021">FileUtilities.cpp:21</a></div></div>
<div class="ttc" id="anamespaceripple_html_ae18870f8d8eaa17b582f609cc486aa04"><div class="ttname"><a href="namespaceripple.html#ae18870f8d8eaa17b582f609cc486aa04">ripple::writeFileContents</a></div><div class="ttdeci">void writeFileContents(boost::system::error_code &amp;ec, boost::filesystem::path const &amp;destPath, std::string const &amp;contents)</div><div class="ttdef"><b>Definition</b> <a href="FileUtilities_8cpp_source.html#l00062">FileUtilities.cpp:62</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>