mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-29 07:25:51 +00:00
deploy: 9d89d4c188
This commit is contained in:
@@ -149,7 +149,7 @@ $(function() {
|
||||
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <a class="code" href="classripple_1_1base__uint.html">test96</a> u{raw};</div>
|
||||
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  uset.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/unordered_set/insert.html">insert</a>(u);</div>
|
||||
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  BEAST_EXPECT(raw.size() == u.size());</div>
|
||||
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  BEAST_EXPECT(<a class="code" href="namespaceripple.html#a96888695e8d79474e080c334f149e30a">to_string</a>(u) == <span class="stringliteral">"0102030405060708090A0B0C"</span>);</div>
|
||||
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  BEAST_EXPECT(<a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(u) == <span class="stringliteral">"0102030405060708090A0B0C"</span>);</div>
|
||||
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  BEAST_EXPECT(*u.data() == 1);</div>
|
||||
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  BEAST_EXPECT(u.signum() == 1);</div>
|
||||
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  BEAST_EXPECT(!!u);</div>
|
||||
@@ -171,7 +171,7 @@ $(function() {
|
||||
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  </div>
|
||||
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <a class="code" href="classripple_1_1base__uint.html">test96</a> v{~u};</div>
|
||||
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  uset.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/unordered_set/insert.html">insert</a>(v);</div>
|
||||
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  BEAST_EXPECT(<a class="code" href="namespaceripple.html#a96888695e8d79474e080c334f149e30a">to_string</a>(v) == <span class="stringliteral">"FEFDFCFBFAF9F8F7F6F5F4F3"</span>);</div>
|
||||
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  BEAST_EXPECT(<a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(v) == <span class="stringliteral">"FEFDFCFBFAF9F8F7F6F5F4F3"</span>);</div>
|
||||
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  BEAST_EXPECT(*v.data() == 0xfe);</div>
|
||||
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  BEAST_EXPECT(v.signum() == 1);</div>
|
||||
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  BEAST_EXPECT(!!v);</div>
|
||||
@@ -191,7 +191,7 @@ $(function() {
|
||||
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  </div>
|
||||
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <a class="code" href="classripple_1_1base__uint.html">test96</a> z{beast::zero};</div>
|
||||
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  uset.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/unordered_set/insert.html">insert</a>(z);</div>
|
||||
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  BEAST_EXPECT(<a class="code" href="namespaceripple.html#a96888695e8d79474e080c334f149e30a">to_string</a>(z) == <span class="stringliteral">"000000000000000000000000"</span>);</div>
|
||||
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  BEAST_EXPECT(<a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(z) == <span class="stringliteral">"000000000000000000000000"</span>);</div>
|
||||
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  BEAST_EXPECT(*z.data() == 0);</div>
|
||||
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  BEAST_EXPECT(*z.begin() == 0);</div>
|
||||
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  BEAST_EXPECT(*<a class="codeRef" href="http://en.cppreference.com/w/cpp/iterator/prev.html">std::prev</a>(z.end(), 1) == 0);</div>
|
||||
@@ -211,7 +211,7 @@ $(function() {
|
||||
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  BEAST_EXPECT(n == beast::zero);</div>
|
||||
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  BEAST_EXPECT(n == z);</div>
|
||||
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  n--;</div>
|
||||
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  BEAST_EXPECT(<a class="code" href="namespaceripple.html#a96888695e8d79474e080c334f149e30a">to_string</a>(n) == <span class="stringliteral">"FFFFFFFFFFFFFFFFFFFFFFFF"</span>);</div>
|
||||
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  BEAST_EXPECT(<a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(n) == <span class="stringliteral">"FFFFFFFFFFFFFFFFFFFFFFFF"</span>);</div>
|
||||
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  n = beast::zero;</div>
|
||||
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  BEAST_EXPECT(n == z);</div>
|
||||
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  </div>
|
||||
@@ -221,30 +221,30 @@ $(function() {
|
||||
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  zm1--;</div>
|
||||
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <a class="code" href="classripple_1_1base__uint.html">test96</a> x{zm1 ^ zp1};</div>
|
||||
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  uset.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/unordered_set/insert.html">insert</a>(x);</div>
|
||||
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  BEAST_EXPECTS(<a class="code" href="namespaceripple.html#a96888695e8d79474e080c334f149e30a">to_string</a>(x) == <span class="stringliteral">"FFFFFFFFFFFFFFFFFFFFFFFE"</span>, <a class="code" href="namespaceripple.html#a96888695e8d79474e080c334f149e30a">to_string</a>(x));</div>
|
||||
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  BEAST_EXPECTS(<a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(x) == <span class="stringliteral">"FFFFFFFFFFFFFFFFFFFFFFFE"</span>, <a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(x));</div>
|
||||
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  </div>
|
||||
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  BEAST_EXPECT(uset.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/unordered_set/size.html">size</a>() == 4);</div>
|
||||
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  </div>
|
||||
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <a class="code" href="classripple_1_1base__uint.html">test96</a> tmp;</div>
|
||||
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  BEAST_EXPECT(tmp.<a class="code" href="classripple_1_1base__uint.html#a88941f6d88609ddcd997293791772aed">parseHex</a>(<a class="code" href="namespaceripple.html#a96888695e8d79474e080c334f149e30a">to_string</a>(u)));</div>
|
||||
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  BEAST_EXPECT(tmp.<a class="code" href="classripple_1_1base__uint.html#a698d3fd0c0f0155995c87d2f48ac90d5">parseHex</a>(<a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(u)));</div>
|
||||
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  BEAST_EXPECT(tmp == u);</div>
|
||||
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  tmp = z;</div>
|
||||
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  </div>
|
||||
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  <span class="comment">// fails with extra char</span></div>
|
||||
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  BEAST_EXPECT(!tmp.<a class="code" href="classripple_1_1base__uint.html#a88941f6d88609ddcd997293791772aed">parseHex</a>(<span class="stringliteral">"A"</span> + <a class="code" href="namespaceripple.html#a96888695e8d79474e080c334f149e30a">to_string</a>(u)));</div>
|
||||
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  BEAST_EXPECT(!tmp.<a class="code" href="classripple_1_1base__uint.html#a698d3fd0c0f0155995c87d2f48ac90d5">parseHex</a>(<span class="stringliteral">"A"</span> + <a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(u)));</div>
|
||||
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  tmp = z;</div>
|
||||
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  </div>
|
||||
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  <span class="comment">// fails with extra char at end</span></div>
|
||||
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  BEAST_EXPECT(!tmp.<a class="code" href="classripple_1_1base__uint.html#a88941f6d88609ddcd997293791772aed">parseHex</a>(<a class="code" href="namespaceripple.html#a96888695e8d79474e080c334f149e30a">to_string</a>(u) + <span class="stringliteral">"A"</span>));</div>
|
||||
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  BEAST_EXPECT(!tmp.<a class="code" href="classripple_1_1base__uint.html#a698d3fd0c0f0155995c87d2f48ac90d5">parseHex</a>(<a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(u) + <span class="stringliteral">"A"</span>));</div>
|
||||
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  </div>
|
||||
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="comment">// fails with a non-hex character at some point in the string:</span></div>
|
||||
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  tmp = z;</div>
|
||||
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  </div>
|
||||
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  <span class="keywordflow">for</span> (<a class="codeRef" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a> i = 0; i != 24; ++i)</div>
|
||||
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  {</div>
|
||||
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> x = <a class="code" href="namespaceripple.html#a96888695e8d79474e080c334f149e30a">to_string</a>(z);</div>
|
||||
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> x = <a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(z);</div>
|
||||
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  x[i] = (<span class="charliteral">'G'</span> + (i % 10));</div>
|
||||
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  BEAST_EXPECT(!tmp.<a class="code" href="classripple_1_1base__uint.html#a88941f6d88609ddcd997293791772aed">parseHex</a>(x));</div>
|
||||
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  BEAST_EXPECT(!tmp.<a class="code" href="classripple_1_1base__uint.html#a698d3fd0c0f0155995c87d2f48ac90d5">parseHex</a>(x));</div>
|
||||
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  }</div>
|
||||
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  </div>
|
||||
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <span class="comment">// Walking 1s:</span></div>
|
||||
@@ -253,8 +253,8 @@ $(function() {
|
||||
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> s1 = <span class="stringliteral">"000000000000000000000000"</span>;</div>
|
||||
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  s1[i] = <span class="charliteral">'1'</span>;</div>
|
||||
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  </div>
|
||||
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  BEAST_EXPECT(tmp.<a class="code" href="classripple_1_1base__uint.html#a88941f6d88609ddcd997293791772aed">parseHex</a>(s1));</div>
|
||||
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  BEAST_EXPECT(<a class="code" href="namespaceripple.html#a96888695e8d79474e080c334f149e30a">to_string</a>(tmp) == s1);</div>
|
||||
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  BEAST_EXPECT(tmp.<a class="code" href="classripple_1_1base__uint.html#a698d3fd0c0f0155995c87d2f48ac90d5">parseHex</a>(s1));</div>
|
||||
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  BEAST_EXPECT(<a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(tmp) == s1);</div>
|
||||
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  }</div>
|
||||
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  </div>
|
||||
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <span class="comment">// Walking 0s:</span></div>
|
||||
@@ -263,16 +263,70 @@ $(function() {
|
||||
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> s1 = <span class="stringliteral">"111111111111111111111111"</span>;</div>
|
||||
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  s1[i] = <span class="charliteral">'0'</span>;</div>
|
||||
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  </div>
|
||||
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  BEAST_EXPECT(tmp.<a class="code" href="classripple_1_1base__uint.html#a88941f6d88609ddcd997293791772aed">parseHex</a>(s1));</div>
|
||||
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  BEAST_EXPECT(<a class="code" href="namespaceripple.html#a96888695e8d79474e080c334f149e30a">to_string</a>(tmp) == s1);</div>
|
||||
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  BEAST_EXPECT(tmp.<a class="code" href="classripple_1_1base__uint.html#a698d3fd0c0f0155995c87d2f48ac90d5">parseHex</a>(s1));</div>
|
||||
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  BEAST_EXPECT(<a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(tmp) == s1);</div>
|
||||
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  }</div>
|
||||
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  }</div>
|
||||
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span> };</div>
|
||||
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  </div>
|
||||
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span> <a class="code" href="namespaceripple_1_1test.html#a52909fdbfa7f29626f24005ed12e6ef4">BEAST_DEFINE_TESTSUITE</a>(<a class="code" href="classripple_1_1base__uint.html">base_uint</a>, ripple_basics, <a class="code" href="namespaceripple.html">ripple</a>);</div>
|
||||
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  </div>
|
||||
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span> } <span class="comment">// namespace test</span></div>
|
||||
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span> } <span class="comment">// namespace ripple</span></div>
|
||||
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  </div>
|
||||
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  <span class="comment">// Constexpr constructors</span></div>
|
||||
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  {</div>
|
||||
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  static_assert(<a class="code" href="classripple_1_1base__uint.html">test96</a>{}.<a class="code" href="classripple_1_1base__uint.html#a846cfc85f78f671c86bba3512a706f0d">signum</a>() == 0);</div>
|
||||
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  static_assert(<a class="code" href="structripple_1_1test_1_1base__uint__test.html#ad0f1429947089bc9aa7b78825561b3d9">test96</a>(<span class="stringliteral">"0"</span>).signum() == 0);</div>
|
||||
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  static_assert(<a class="code" href="structripple_1_1test_1_1base__uint__test.html#ad0f1429947089bc9aa7b78825561b3d9">test96</a>(<span class="stringliteral">"000000000000000000000000"</span>).signum() == 0);</div>
|
||||
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  static_assert(<a class="code" href="structripple_1_1test_1_1base__uint__test.html#ad0f1429947089bc9aa7b78825561b3d9">test96</a>(<span class="stringliteral">"000000000000000000000001"</span>).signum() == 1);</div>
|
||||
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  static_assert(<a class="code" href="structripple_1_1test_1_1base__uint__test.html#ad0f1429947089bc9aa7b78825561b3d9">test96</a>(<span class="stringliteral">"800000000000000000000000"</span>).signum() == 1);</div>
|
||||
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  </div>
|
||||
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span> <span class="comment">// Everything within the #if should fail during compilation.</span></div>
|
||||
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span> <span class="preprocessor">#if 0</span></div>
|
||||
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <span class="comment">// Too few characters</span></div>
|
||||
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  static_assert(<a class="code" href="structripple_1_1test_1_1base__uint__test.html#ad0f1429947089bc9aa7b78825561b3d9">test96</a>(<span class="stringliteral">"00000000000000000000000"</span>).signum() == 0);</div>
|
||||
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  </div>
|
||||
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  <span class="comment">// Too many characters</span></div>
|
||||
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  static_assert(<a class="code" href="structripple_1_1test_1_1base__uint__test.html#ad0f1429947089bc9aa7b78825561b3d9">test96</a>(<span class="stringliteral">"0000000000000000000000000"</span>).signum() == 0);</div>
|
||||
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  </div>
|
||||
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  <span class="comment">// Non-hex characters</span></div>
|
||||
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  static_assert(<a class="code" href="structripple_1_1test_1_1base__uint__test.html#ad0f1429947089bc9aa7b78825561b3d9">test96</a>(<span class="stringliteral">"00000000000000000000000 "</span>).signum() == 1);</div>
|
||||
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  static_assert(<a class="code" href="structripple_1_1test_1_1base__uint__test.html#ad0f1429947089bc9aa7b78825561b3d9">test96</a>(<span class="stringliteral">"00000000000000000000000/"</span>).signum() == 1);</div>
|
||||
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  static_assert(<a class="code" href="structripple_1_1test_1_1base__uint__test.html#ad0f1429947089bc9aa7b78825561b3d9">test96</a>(<span class="stringliteral">"00000000000000000000000:"</span>).signum() == 1);</div>
|
||||
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  static_assert(<a class="code" href="structripple_1_1test_1_1base__uint__test.html#ad0f1429947089bc9aa7b78825561b3d9">test96</a>(<span class="stringliteral">"00000000000000000000000@"</span>).signum() == 1);</div>
|
||||
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  static_assert(<a class="code" href="structripple_1_1test_1_1base__uint__test.html#ad0f1429947089bc9aa7b78825561b3d9">test96</a>(<span class="stringliteral">"00000000000000000000000G"</span>).signum() == 1);</div>
|
||||
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  static_assert(<a class="code" href="structripple_1_1test_1_1base__uint__test.html#ad0f1429947089bc9aa7b78825561b3d9">test96</a>(<span class="stringliteral">"00000000000000000000000`"</span>).signum() == 1);</div>
|
||||
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  static_assert(<a class="code" href="structripple_1_1test_1_1base__uint__test.html#ad0f1429947089bc9aa7b78825561b3d9">test96</a>(<span class="stringliteral">"00000000000000000000000g"</span>).signum() == 1);</div>
|
||||
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  static_assert(<a class="code" href="structripple_1_1test_1_1base__uint__test.html#ad0f1429947089bc9aa7b78825561b3d9">test96</a>(<span class="stringliteral">"00000000000000000000000~"</span>).signum() == 1);</div>
|
||||
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span> <span class="preprocessor">#endif // 0</span></div>
|
||||
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  </div>
|
||||
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  <span class="comment">// Verify that constexpr base_uints interpret a string the same</span></div>
|
||||
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  <span class="comment">// way parseHex() does.</span></div>
|
||||
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  <span class="keyword">struct </span>StrBaseUint</div>
|
||||
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  {</div>
|
||||
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  <span class="keywordtype">char</span> <span class="keyword">const</span>* <span class="keyword">const</span> str;</div>
|
||||
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  <a class="code" href="classripple_1_1base__uint.html">test96</a> tst;</div>
|
||||
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  </div>
|
||||
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  constexpr StrBaseUint(<span class="keywordtype">char</span> <span class="keyword">const</span>* s) : str(s), tst(s)</div>
|
||||
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  {</div>
|
||||
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  }</div>
|
||||
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  };</div>
|
||||
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  constexpr StrBaseUint testCases[] = {</div>
|
||||
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  <span class="stringliteral">"000000000000000000000000"</span>,</div>
|
||||
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  <span class="stringliteral">"000000000000000000000001"</span>,</div>
|
||||
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  <span class="stringliteral">"fedcba9876543210ABCDEF91"</span>,</div>
|
||||
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  <span class="stringliteral">"19FEDCBA0123456789abcdef"</span>,</div>
|
||||
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  <span class="stringliteral">"800000000000000000000000"</span>,</div>
|
||||
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  <span class="stringliteral">"fFfFfFfFfFfFfFfFfFfFfFfF"</span>};</div>
|
||||
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  </div>
|
||||
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  <span class="keywordflow">for</span> (StrBaseUint <span class="keyword">const</span>& t : testCases)</div>
|
||||
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  {</div>
|
||||
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  <a class="code" href="classripple_1_1base__uint.html">test96</a> t96;</div>
|
||||
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  BEAST_EXPECT(t96.<a class="code" href="classripple_1_1base__uint.html#a698d3fd0c0f0155995c87d2f48ac90d5">parseHex</a>(t.str));</div>
|
||||
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  BEAST_EXPECT(t96 == t.tst);</div>
|
||||
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  }</div>
|
||||
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  }</div>
|
||||
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  }</div>
|
||||
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span> };</div>
|
||||
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  </div>
|
||||
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span> <a class="code" href="namespaceripple_1_1test.html#a52909fdbfa7f29626f24005ed12e6ef4">BEAST_DEFINE_TESTSUITE</a>(<a class="code" href="classripple_1_1base__uint.html">base_uint</a>, ripple_basics, <a class="code" href="namespaceripple.html">ripple</a>);</div>
|
||||
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  </div>
|
||||
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span> } <span class="comment">// namespace test</span></div>
|
||||
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span> } <span class="comment">// namespace ripple</span></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
<div class="ttc" id="anamespaceripple_1_1test_html_a52909fdbfa7f29626f24005ed12e6ef4"><div class="ttname"><a href="namespaceripple_1_1test.html#a52909fdbfa7f29626f24005ed12e6ef4">ripple::test::BEAST_DEFINE_TESTSUITE</a></div><div class="ttdeci">BEAST_DEFINE_TESTSUITE(AccountDelete, app, ripple)</div></div>
|
||||
<div class="ttc" id="abasic_string_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div><div class="ttdoc">STL class.</div></div>
|
||||
@@ -282,17 +336,16 @@ $(function() {
|
||||
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector< unsigned char ></a></div></div>
|
||||
<div class="ttc" id="asize_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/unordered_set/size.html">std::unordered_set::size</a></div><div class="ttdeci">T size(T... args)</div></div>
|
||||
<div class="ttc" id="ais_assignable_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/types/is_assignable.html">std::is_assignable</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a96888695e8d79474e080c334f149e30a"><div class="ttname"><a href="namespaceripple.html#a96888695e8d79474e080c334f149e30a">ripple::to_string</a></div><div class="ttdeci">std::string to_string(ListDisposition disposition)</div><div class="ttdef"><b>Definition:</b> <a href="ValidatorList_8cpp_source.html#l00045">ValidatorList.cpp:45</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1base__uint_html"><div class="ttname"><a href="classripple_1_1base__uint.html">ripple::base_uint</a></div><div class="ttdoc">Integers of any length that is a multiple of 32-bits.</div><div class="ttdef"><b>Definition:</b> <a href="base__uint_8h_source.html#l00073">base_uint.h:73</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1base__uint_html_a4b9e8d36a37963d48be8f081d99257bf"><div class="ttname"><a href="classripple_1_1base__uint.html#a4b9e8d36a37963d48be8f081d99257bf">ripple::base_uint::bytes</a></div><div class="ttdeci">static constexpr std::size_t bytes</div><div class="ttdef"><b>Definition:</b> <a href="base__uint_8h_source.html#l00096">base_uint.h:96</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_ad584345ad1d39fa2234a298a991f8e66"><div class="ttname"><a href="namespaceripple.html#ad584345ad1d39fa2234a298a991f8e66">ripple::compare</a></div><div class="ttdeci">int compare(base_uint< Bits, Tag > const &a, base_uint< Bits, Tag > const &b)</div><div class="ttdef"><b>Definition:</b> <a href="base__uint_8h_source.html#l00461">base_uint.h:461</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1base__uint_html"><div class="ttname"><a href="classripple_1_1base__uint.html">ripple::base_uint</a></div><div class="ttdoc">Integers of any length that is a multiple of 32-bits.</div><div class="ttdef"><b>Definition:</b> <a href="base__uint_8h_source.html#l00074">base_uint.h:74</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1base__uint_html_a4b9e8d36a37963d48be8f081d99257bf"><div class="ttname"><a href="classripple_1_1base__uint.html#a4b9e8d36a37963d48be8f081d99257bf">ripple::base_uint::bytes</a></div><div class="ttdeci">static constexpr std::size_t bytes</div><div class="ttdef"><b>Definition:</b> <a href="base__uint_8h_source.html#l00097">base_uint.h:97</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_ad584345ad1d39fa2234a298a991f8e66"><div class="ttname"><a href="namespaceripple.html#ad584345ad1d39fa2234a298a991f8e66">ripple::compare</a></div><div class="ttdeci">int compare(base_uint< Bits, Tag > const &a, base_uint< Bits, Tag > const &b)</div><div class="ttdef"><b>Definition:</b> <a href="base__uint_8h_source.html#l00530">base_uint.h:530</a></div></div>
|
||||
<div class="ttc" id="aarray_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/array.html">std::array< std::uint8_t, WIDTH ></a></div></div>
|
||||
<div class="ttc" id="astructripple_1_1test_1_1nonhash_html_a2e7ebf1142ed70d907ade5d5c53e38ea"><div class="ttname"><a href="structripple_1_1test_1_1nonhash.html#a2e7ebf1142ed70d907ade5d5c53e38ea">ripple::test::nonhash::endian</a></div><div class="ttdeci">static constexpr const auto endian</div><div class="ttdef"><b>Definition:</b> <a href="base__uint__test_8cpp_source.html#l00037">base_uint_test.cpp:37</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1base__uint_html_a846cfc85f78f671c86bba3512a706f0d"><div class="ttname"><a href="classripple_1_1base__uint.html#a846cfc85f78f671c86bba3512a706f0d">ripple::base_uint::signum</a></div><div class="ttdeci">constexpr int signum() const</div><div class="ttdef"><b>Definition:</b> <a href="base__uint_8h_source.html#l00317">base_uint.h:317</a></div></div>
|
||||
<div class="ttc" id="astructripple_1_1test_1_1base__uint__test_html_ad0f1429947089bc9aa7b78825561b3d9"><div class="ttname"><a href="structripple_1_1test_1_1base__uint__test.html#ad0f1429947089bc9aa7b78825561b3d9">ripple::test::base_uint_test::test96</a></div><div class="ttdeci">base_uint< 96 > test96</div><div class="ttdef"><b>Definition:</b> <a href="base__uint__test_8cpp_source.html#l00059">base_uint_test.cpp:59</a></div></div>
|
||||
<div class="ttc" id="astructripple_1_1test_1_1nonhash_html_a3ff4472cb2f7cb7417689a01222809b9"><div class="ttname"><a href="structripple_1_1test_1_1nonhash.html#a3ff4472cb2f7cb7417689a01222809b9">ripple::test::nonhash::nonhash</a></div><div class="ttdeci">nonhash()=default</div></div>
|
||||
<div class="ttc" id="ais_copy_constructible_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/types/is_copy_constructible.html">std::is_copy_constructible</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="RCLCensorshipDetector_8h_source.html#l00029">RCLCensorshipDetector.h:29</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1base__uint_html_a88941f6d88609ddcd997293791772aed"><div class="ttname"><a href="classripple_1_1base__uint.html#a88941f6d88609ddcd997293791772aed">ripple::base_uint::parseHex</a></div><div class="ttdeci">bool parseHex(std::string_view sv)</div><div class="ttdoc">Parse a hex string into a base_uint.</div><div class="ttdef"><b>Definition:</b> <a href="base__uint_8h_source.html#l00384">base_uint.h:384</a></div></div>
|
||||
<div class="ttc" id="astructripple_1_1test_1_1nonhash_html"><div class="ttname"><a href="structripple_1_1test_1_1nonhash.html">ripple::test::nonhash</a></div><div class="ttdef"><b>Definition:</b> <a href="base__uint__test_8cpp_source.html#l00035">base_uint_test.cpp:35</a></div></div>
|
||||
<div class="ttc" id="abegin_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/array/begin.html">std::array::begin</a></div><div class="ttdeci">T begin(T... args)</div></div>
|
||||
<div class="ttc" id="ainsert_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/unordered_set/insert.html">std::unordered_set::insert</a></div><div class="ttdeci">T insert(T... args)</div></div>
|
||||
@@ -300,8 +353,10 @@ $(function() {
|
||||
<div class="ttc" id="ais_constructible_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/types/is_constructible.html">std::is_constructible</a></div></div>
|
||||
<div class="ttc" id="acomplex_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/header/complex.html">complex</a></div></div>
|
||||
<div class="ttc" id="asize_t_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_af9776f187d3686a7fba4c2d2fbeebdf4"><div class="ttname"><a href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">ripple::to_string</a></div><div class="ttdeci">std::string to_string(Manifest const &m)</div><div class="ttdoc">Format the specified manifest to a string for debugging purposes.</div><div class="ttdef"><b>Definition:</b> <a href="app_2misc_2impl_2Manifest_8cpp_source.html#l00038">app/misc/impl/Manifest.cpp:38</a></div></div>
|
||||
<div class="ttc" id="aend_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/array/end.html">std::array::end</a></div><div class="ttdeci">T end(T... args)</div></div>
|
||||
<div class="ttc" id="ais_copy_assignable_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/types/is_copy_assignable.html">std::is_copy_assignable</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1base__uint_html_a698d3fd0c0f0155995c87d2f48ac90d5"><div class="ttname"><a href="classripple_1_1base__uint.html#a698d3fd0c0f0155995c87d2f48ac90d5">ripple::base_uint::parseHex</a></div><div class="ttdeci">constexpr bool parseHex(std::string_view sv)</div><div class="ttdoc">Parse a hex string into a base_uint.</div><div class="ttdef"><b>Definition:</b> <a href="base__uint_8h_source.html#l00472">base_uint.h:472</a></div></div>
|
||||
<div class="ttc" id="aprev_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/iterator/prev.html">std::prev</a></div><div class="ttdeci">T prev(T... args)</div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a9c3a01178261b6e8a98c0ea99f01d154"><div class="ttname"><a href="namespaceripple.html#a9c3a01178261b6e8a98c0ea99f01d154">ripple::hash_append</a></div><div class="ttdeci">void hash_append(Hasher &h, ValidatorBlobInfo const &blobInfo)</div><div class="ttdef"><b>Definition:</b> <a href="ValidatorList_8h_source.html#l00897">ValidatorList.h:897</a></div></div>
|
||||
<div class="ttc" id="astructripple_1_1test_1_1nonhash_html_ad1b551c357d8f9e8e8cde83bfb3c8dba"><div class="ttname"><a href="structripple_1_1test_1_1nonhash.html#ad1b551c357d8f9e8e8cde83bfb3c8dba">ripple::test::nonhash::data_</a></div><div class="ttdeci">std::array< std::uint8_t, WIDTH > data_</div><div class="ttdef"><b>Definition:</b> <a href="base__uint__test_8cpp_source.html#l00040">base_uint_test.cpp:40</a></div></div>
|
||||
|
||||
Reference in New Issue
Block a user