binaryparse 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. data/binaryparse.gemspec +17 -17
  2. data/examples/pms_input_2_test.rb +70 -0
  3. data/lib/blocker.rb +1 -1
  4. metadata +3 -66
  5. data/doc/binaryparse.chm +0 -0
  6. data/doc/bphelp.zip +0 -0
  7. data/doc/classes/BinaryBlocker/BitFieldEncoder.html +0 -328
  8. data/doc/classes/BinaryBlocker/Blocker.html +0 -168
  9. data/doc/classes/BinaryBlocker/CountedArrayEncoder.html +0 -347
  10. data/doc/classes/BinaryBlocker/Encoder.html +0 -526
  11. data/doc/classes/BinaryBlocker/FixedArrayEncoder.html +0 -278
  12. data/doc/classes/BinaryBlocker/FixedStringEncoder.html +0 -177
  13. data/doc/classes/BinaryBlocker/FixedUTF16StringEncoder.html +0 -229
  14. data/doc/classes/BinaryBlocker/GroupEncoder.html +0 -650
  15. data/doc/classes/BinaryBlocker/ListOfEncoder.html +0 -343
  16. data/doc/classes/BinaryBlocker/OneOfEncoder.html +0 -306
  17. data/doc/classes/BinaryBlocker/PackedDateEncoder.html +0 -220
  18. data/doc/classes/BinaryBlocker/PackedDateTimeEncoder.html +0 -220
  19. data/doc/classes/BinaryBlocker/PackedNumberEncoder.html +0 -231
  20. data/doc/classes/BinaryBlocker/SimpleEncoder.html +0 -284
  21. data/doc/classes/BinaryBlocker.html +0 -329
  22. data/doc/classes/BufferedIO.html +0 -324
  23. data/doc/classes/TestBlocker/BBDate.html +0 -120
  24. data/doc/classes/TestBlocker/BBList.html +0 -120
  25. data/doc/classes/TestBlocker/BBPacked.html +0 -120
  26. data/doc/classes/TestBlocker/BBString.html +0 -120
  27. data/doc/classes/TestBlocker/BBSub1.html +0 -120
  28. data/doc/classes/TestBlocker/BBSub2.html +0 -120
  29. data/doc/classes/TestBlocker/BBTest1.html +0 -120
  30. data/doc/classes/TestBlocker/BBTest2.html +0 -120
  31. data/doc/classes/TestBlocker/BBTest3.html +0 -120
  32. data/doc/classes/TestBlocker/BBTest4.html +0 -120
  33. data/doc/classes/TestBlocker/BBTest5.html +0 -120
  34. data/doc/classes/TestBlocker/BBTest6.html +0 -120
  35. data/doc/classes/TestBlocker/BBTest7.html +0 -120
  36. data/doc/classes/TestBlocker/BBTime.html +0 -120
  37. data/doc/classes/TestBlocker/BBUTF16.html +0 -120
  38. data/doc/classes/TestBlocker/ItemA.html +0 -120
  39. data/doc/classes/TestBlocker/ItemB.html +0 -120
  40. data/doc/classes/TestBlocker.html +0 -802
  41. data/doc/contents.hhc +0 -670
  42. data/doc/created.rid +0 -1
  43. data/doc/dot/f_0.dot +0 -208
  44. data/doc/dot/f_0.png +0 -0
  45. data/doc/dot/f_1.dot +0 -23
  46. data/doc/dot/f_1.png +0 -0
  47. data/doc/dot/f_2.dot +0 -32
  48. data/doc/dot/f_2.png +0 -0
  49. data/doc/dot/m_0_0.dot +0 -208
  50. data/doc/dot/m_0_0.png +0 -0
  51. data/doc/files/lib/blocker_rb.html +0 -144
  52. data/doc/files/lib/buffered_io_rb.html +0 -115
  53. data/doc/files/test/test_blocker_rb.html +0 -116
  54. data/doc/fr_class_index.html +0 -60
  55. data/doc/fr_file_index.html +0 -29
  56. data/doc/fr_method_index.html +0 -135
  57. data/doc/index.hhk +0 -599
  58. data/doc/index.html +0 -24
  59. data/doc/rdoc-style.css +0 -208
  60. data/doc/rdoc.hhp +0 -15
@@ -1,802 +0,0 @@
1
-
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: TestBlocker</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">TestBlocker</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../files/test/test_blocker_rb.html">
59
- test/test_blocker.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- Test::Unit::TestCase
69
- </td>
70
- </tr>
71
- </table>
72
- </div>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
-
78
-
79
- <div id="contextContent">
80
- <div id="diagram">
81
- <map id="map" name="map">
82
- <area shape="rect" coords="24,101,109,149" href="TestBlocker.html" alt="TestBlocker" />
83
- <area shape="rect" coords="5,5,128,53" href="Test/Unit/TestCase.html" alt="Test::Unit::TestCase" />
84
- </map>
85
- <img src="../dot/f_2.png" usemap="#map" border="0" alt="TopLevel" />
86
- </div>
87
-
88
- <div id="description">
89
- <p>
90
- require &#8216;test/unit&#8217; unless defined? $ZENTEST and $ZENTEST
91
- </p>
92
-
93
- </div>
94
-
95
-
96
- </div>
97
-
98
- <div id="method-list">
99
- <h3 class="section-bar">Methods</h3>
100
-
101
- <div class="name-list">
102
- <a href="#M000010">test_bitfield</a>&nbsp;&nbsp;
103
- <a href="#M000007">test_building_fixed_array</a>&nbsp;&nbsp;
104
- <a href="#M000009">test_composing</a>&nbsp;&nbsp;
105
- <a href="#M000008">test_counted_array</a>&nbsp;&nbsp;
106
- <a href="#M000016">test_delimited_array</a>&nbsp;&nbsp;
107
- <a href="#M000004">test_failed_deblock</a>&nbsp;&nbsp;
108
- <a href="#M000006">test_fixed_array</a>&nbsp;&nbsp;
109
- <a href="#M000011">test_fixed_string</a>&nbsp;&nbsp;
110
- <a href="#M000005">test_has_one_of</a>&nbsp;&nbsp;
111
- <a href="#M000014">test_packed_date</a>&nbsp;&nbsp;
112
- <a href="#M000015">test_packed_datetime</a>&nbsp;&nbsp;
113
- <a href="#M000013">test_packed_numbers</a>&nbsp;&nbsp;
114
- <a href="#M000003">test_round_trip</a>&nbsp;&nbsp;
115
- <a href="#M000002">test_simple_valid</a>&nbsp;&nbsp;
116
- <a href="#M000001">test_usage</a>&nbsp;&nbsp;
117
- <a href="#M000012">test_utf16</a>&nbsp;&nbsp;
118
- </div>
119
- </div>
120
-
121
- </div>
122
-
123
-
124
- <!-- if includes -->
125
-
126
- <div id="section">
127
-
128
- <div id="class-list">
129
- <h3 class="section-bar">Classes and Modules</h3>
130
-
131
- Class <a href="TestBlocker/BBDate.html" class="link">TestBlocker::BBDate</a><br />
132
- Class <a href="TestBlocker/BBList.html" class="link">TestBlocker::BBList</a><br />
133
- Class <a href="TestBlocker/BBPacked.html" class="link">TestBlocker::BBPacked</a><br />
134
- Class <a href="TestBlocker/BBString.html" class="link">TestBlocker::BBString</a><br />
135
- Class <a href="TestBlocker/BBSub1.html" class="link">TestBlocker::BBSub1</a><br />
136
- Class <a href="TestBlocker/BBSub2.html" class="link">TestBlocker::BBSub2</a><br />
137
- Class <a href="TestBlocker/BBTest1.html" class="link">TestBlocker::BBTest1</a><br />
138
- Class <a href="TestBlocker/BBTest2.html" class="link">TestBlocker::BBTest2</a><br />
139
- Class <a href="TestBlocker/BBTest3.html" class="link">TestBlocker::BBTest3</a><br />
140
- Class <a href="TestBlocker/BBTest4.html" class="link">TestBlocker::BBTest4</a><br />
141
- Class <a href="TestBlocker/BBTest5.html" class="link">TestBlocker::BBTest5</a><br />
142
- Class <a href="TestBlocker/BBTest6.html" class="link">TestBlocker::BBTest6</a><br />
143
- Class <a href="TestBlocker/BBTest7.html" class="link">TestBlocker::BBTest7</a><br />
144
- Class <a href="TestBlocker/BBTime.html" class="link">TestBlocker::BBTime</a><br />
145
- Class <a href="TestBlocker/BBUTF16.html" class="link">TestBlocker::BBUTF16</a><br />
146
- Class <a href="TestBlocker/ItemA.html" class="link">TestBlocker::ItemA</a><br />
147
- Class <a href="TestBlocker/ItemB.html" class="link">TestBlocker::ItemB</a><br />
148
-
149
- </div>
150
-
151
-
152
-
153
-
154
-
155
-
156
-
157
- <!-- if method_list -->
158
- <div id="methods">
159
- <h3 class="section-bar">Public Instance methods</h3>
160
-
161
- <div id="method-M000010" class="method-detail">
162
- <a name="M000010"></a>
163
-
164
- <div class="method-heading">
165
- <a href="#M000010" class="method-signature">
166
- <span class="method-name">test_bitfield</span><span class="method-args">()</span>
167
- </a>
168
- </div>
169
-
170
- <div class="method-description">
171
- <p><a class="source-toggle" href="#"
172
- onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
173
- <div class="method-source-code" id="M000010-source">
174
- <pre>
175
- <span class="ruby-comment cmt"># File test/test_blocker.rb, line 227</span>
176
- 227: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_bitfield</span>
177
- 228: <span class="ruby-identifier">bb</span> = <span class="ruby-constant">BBTest7</span>.<span class="ruby-identifier">new</span>
178
- 229: <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">bb</span>)
179
- 230:
180
- 231: <span class="ruby-comment cmt">#assert(bb.a.fld1)</span>
181
- 232: <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">a</span>.<span class="ruby-identifier">fld2</span> = <span class="ruby-value">1</span>
182
- 233: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">8</span>, <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">a</span>.<span class="ruby-identifier">raw_value</span>)
183
- 234: <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">a</span>.<span class="ruby-identifier">fld2</span> = <span class="ruby-value">2</span>
184
- 235: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">16</span>, <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">a</span>.<span class="ruby-identifier">raw_value</span>)
185
- 236: <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">a</span>.<span class="ruby-identifier">fld1</span> = <span class="ruby-value">1</span>
186
- 237: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">17</span>, <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">a</span>.<span class="ruby-identifier">raw_value</span>)
187
- 238:
188
- 239: <span class="ruby-identifier">buf</span> = <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">block</span>
189
- 240: <span class="ruby-identifier">bb2</span> = <span class="ruby-constant">BBTest7</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">buf</span>)
190
- 241: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">17</span>, <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">a</span>.<span class="ruby-identifier">raw_value</span>)
191
- 242: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">1</span>, <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">a</span>.<span class="ruby-identifier">fld1</span>)
192
- 243: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">2</span>, <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">a</span>.<span class="ruby-identifier">fld2</span>)
193
- 244:
194
- 245: <span class="ruby-identifier">assert_raises</span>(<span class="ruby-constant">NoMethodError</span>) { <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">a</span>.<span class="ruby-identifier">fld12</span> }
195
- 246: <span class="ruby-keyword kw">end</span>
196
- </pre>
197
- </div>
198
- </div>
199
- </div>
200
-
201
- <div id="method-M000007" class="method-detail">
202
- <a name="M000007"></a>
203
-
204
- <div class="method-heading">
205
- <a href="#M000007" class="method-signature">
206
- <span class="method-name">test_building_fixed_array</span><span class="method-args">()</span>
207
- </a>
208
- </div>
209
-
210
- <div class="method-description">
211
- <p><a class="source-toggle" href="#"
212
- onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
213
- <div class="method-source-code" id="M000007-source">
214
- <pre>
215
- <span class="ruby-comment cmt"># File test/test_blocker.rb, line 138</span>
216
- 138: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_building_fixed_array</span>
217
- 139: <span class="ruby-identifier">fa</span> = <span class="ruby-constant">BBTest4</span>.<span class="ruby-identifier">new</span>
218
- 140: <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">fa</span>)
219
- 141: <span class="ruby-identifier">fa</span>.<span class="ruby-identifier">fooboo</span>[<span class="ruby-value">0</span>] = <span class="ruby-constant">BBSub1</span>.<span class="ruby-identifier">new</span>
220
- 142: <span class="ruby-identifier">fa</span>.<span class="ruby-identifier">fooboo</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">foo</span> = <span class="ruby-value">42</span>
221
- 143: <span class="ruby-identifier">fa</span>.<span class="ruby-identifier">fooboo</span>[<span class="ruby-value">1</span>] = <span class="ruby-constant">BBSub2</span>.<span class="ruby-identifier">new</span>
222
- 144: <span class="ruby-identifier">fa</span>.<span class="ruby-identifier">fooboo</span>[<span class="ruby-value">1</span>].<span class="ruby-identifier">bar</span> = <span class="ruby-value">21</span>
223
- 145: <span class="ruby-identifier">fa</span>.<span class="ruby-identifier">fooboo</span>[<span class="ruby-value">2</span>] = <span class="ruby-constant">BBSub1</span>.<span class="ruby-identifier">new</span>
224
- 146: <span class="ruby-identifier">fa</span>.<span class="ruby-identifier">fooboo</span>[<span class="ruby-value">2</span>].<span class="ruby-identifier">foo</span> = <span class="ruby-value">42</span>
225
- 147: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">42</span>, <span class="ruby-identifier">fa</span>.<span class="ruby-identifier">fooboo</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">foo</span>)
226
- 148: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">21</span>, <span class="ruby-identifier">fa</span>.<span class="ruby-identifier">fooboo</span>[<span class="ruby-value">1</span>].<span class="ruby-identifier">bar</span>)
227
- 149: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">42</span>, <span class="ruby-identifier">fa</span>.<span class="ruby-identifier">fooboo</span>[<span class="ruby-value">2</span>].<span class="ruby-identifier">foo</span>)
228
- 150:
229
- 151: <span class="ruby-identifier">buf</span> = <span class="ruby-identifier">fa</span>.<span class="ruby-identifier">block</span>
230
- 152: <span class="ruby-identifier">bb</span> = <span class="ruby-constant">BBTest4</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">buf</span>)
231
- 153: <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">bb</span>)
232
- 154: <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">bb</span>.<span class="ruby-identifier">fooboo</span>)
233
- 155: <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">bb</span>.<span class="ruby-identifier">fooboo</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">foo</span>)
234
- 156: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">42</span>, <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">fooboo</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">foo</span>)
235
- 157: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">21</span>, <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">fooboo</span>[<span class="ruby-value">1</span>].<span class="ruby-identifier">bar</span>)
236
- 158: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">42</span>, <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">fooboo</span>[<span class="ruby-value">2</span>].<span class="ruby-identifier">foo</span>)
237
- 159:
238
- 160: <span class="ruby-identifier">assert_raises</span>(<span class="ruby-constant">RangeError</span>) { <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">fooboo</span>[<span class="ruby-value">-1</span>] }
239
- 161: <span class="ruby-identifier">assert_raises</span>(<span class="ruby-constant">RangeError</span>) { <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">fooboo</span>[<span class="ruby-value">3</span>] }
240
- 162: <span class="ruby-keyword kw">end</span>
241
- </pre>
242
- </div>
243
- </div>
244
- </div>
245
-
246
- <div id="method-M000009" class="method-detail">
247
- <a name="M000009"></a>
248
-
249
- <div class="method-heading">
250
- <a href="#M000009" class="method-signature">
251
- <span class="method-name">test_composing</span><span class="method-args">()</span>
252
- </a>
253
- </div>
254
-
255
- <div class="method-description">
256
- <p><a class="source-toggle" href="#"
257
- onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
258
- <div class="method-source-code" id="M000009-source">
259
- <pre>
260
- <span class="ruby-comment cmt"># File test/test_blocker.rb, line 203</span>
261
- 203: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_composing</span>
262
- 204: <span class="ruby-identifier">bb</span> = <span class="ruby-constant">BBTest6</span>.<span class="ruby-identifier">new</span>
263
- 205: <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">bb</span>)
264
- 206: <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">a</span>.<span class="ruby-identifier">foo</span> = <span class="ruby-value">1</span>
265
- 207: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">1</span>, <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">a</span>.<span class="ruby-identifier">foo</span>)
266
- 208: <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">a</span>.<span class="ruby-identifier">bar</span> = <span class="ruby-value">2</span>
267
- 209: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">2</span>, <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">a</span>.<span class="ruby-identifier">bar</span>)
268
- 210: <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">bar</span> = <span class="ruby-value">1234</span>
269
- 211: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">1234</span>, <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">bar</span>)
270
- 212:
271
- 213: <span class="ruby-identifier">buf</span> = <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">block</span>
272
- 214: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">10</span>, <span class="ruby-identifier">buf</span>.<span class="ruby-identifier">size</span>)
273
- 215:
274
- 216: <span class="ruby-identifier">bb2</span> = <span class="ruby-constant">BBTest6</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">buf</span>)
275
- 217: <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">bb2</span>)
276
- 218: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">1</span>, <span class="ruby-identifier">bb2</span>.<span class="ruby-identifier">a</span>.<span class="ruby-identifier">foo</span>)
277
- 219: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">2</span>, <span class="ruby-identifier">bb2</span>.<span class="ruby-identifier">a</span>.<span class="ruby-identifier">bar</span>)
278
- 220: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">1234</span>, <span class="ruby-identifier">bb2</span>.<span class="ruby-identifier">bar</span>)
279
- 221: <span class="ruby-keyword kw">end</span>
280
- </pre>
281
- </div>
282
- </div>
283
- </div>
284
-
285
- <div id="method-M000008" class="method-detail">
286
- <a name="M000008"></a>
287
-
288
- <div class="method-heading">
289
- <a href="#M000008" class="method-signature">
290
- <span class="method-name">test_counted_array</span><span class="method-args">()</span>
291
- </a>
292
- </div>
293
-
294
- <div class="method-description">
295
- <p><a class="source-toggle" href="#"
296
- onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
297
- <div class="method-source-code" id="M000008-source">
298
- <pre>
299
- <span class="ruby-comment cmt"># File test/test_blocker.rb, line 168</span>
300
- 168: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_counted_array</span>
301
- 169: <span class="ruby-identifier">bb1</span> = <span class="ruby-constant">BBSub1</span>.<span class="ruby-identifier">new</span>
302
- 170: <span class="ruby-identifier">bb1</span>.<span class="ruby-identifier">foo</span> = <span class="ruby-value">42</span>
303
- 171: <span class="ruby-identifier">bb2</span> = <span class="ruby-constant">BBSub2</span>.<span class="ruby-identifier">new</span>
304
- 172: <span class="ruby-identifier">bb2</span>.<span class="ruby-identifier">bar</span> = <span class="ruby-value">21</span>
305
- 173:
306
- 174: <span class="ruby-identifier">fa</span> = <span class="ruby-constant">BBTest5</span>.<span class="ruby-identifier">new</span>
307
- 175: <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">fa</span>)
308
- 176: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">fa</span>.<span class="ruby-identifier">fooboo</span>.<span class="ruby-identifier">size</span>)
309
- 177:
310
- 178: <span class="ruby-identifier">fa</span>.<span class="ruby-identifier">fooboo</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">bb1</span>
311
- 179: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">1</span>, <span class="ruby-identifier">fa</span>.<span class="ruby-identifier">fooboo</span>.<span class="ruby-identifier">size</span>)
312
- 180:
313
- 181: <span class="ruby-identifier">fa</span>.<span class="ruby-identifier">fooboo</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">bb1</span>
314
- 182: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">2</span>, <span class="ruby-identifier">fa</span>.<span class="ruby-identifier">fooboo</span>.<span class="ruby-identifier">size</span>)
315
- 183:
316
- 184: <span class="ruby-identifier">fa</span>.<span class="ruby-identifier">fooboo</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">bb1</span>
317
- 185: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">3</span>, <span class="ruby-identifier">fa</span>.<span class="ruby-identifier">fooboo</span>.<span class="ruby-identifier">size</span>)
318
- 186:
319
- 187: <span class="ruby-identifier">fa</span>.<span class="ruby-identifier">fooboo</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">bb2</span>
320
- 188: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">4</span>, <span class="ruby-identifier">fa</span>.<span class="ruby-identifier">fooboo</span>.<span class="ruby-identifier">size</span>)
321
- 189:
322
- 190: <span class="ruby-identifier">fa</span>.<span class="ruby-identifier">fooboo</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">bb1</span>
323
- 191: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">5</span>, <span class="ruby-identifier">fa</span>.<span class="ruby-identifier">fooboo</span>.<span class="ruby-identifier">size</span>)
324
- 192:
325
- 193: <span class="ruby-identifier">assert_raises</span>(<span class="ruby-constant">RangeError</span>) { <span class="ruby-identifier">fa</span>.<span class="ruby-identifier">fooboo</span>[<span class="ruby-value">-1</span>] }
326
- 194: <span class="ruby-identifier">assert_raises</span>(<span class="ruby-constant">RangeError</span>) { <span class="ruby-identifier">fa</span>.<span class="ruby-identifier">fooboo</span>[<span class="ruby-value">5</span>] }
327
- 195: <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">fa</span>.<span class="ruby-identifier">fooboo</span>[<span class="ruby-value">4</span>])
328
- 196: <span class="ruby-keyword kw">end</span>
329
- </pre>
330
- </div>
331
- </div>
332
- </div>
333
-
334
- <div id="method-M000016" class="method-detail">
335
- <a name="M000016"></a>
336
-
337
- <div class="method-heading">
338
- <a href="#M000016" class="method-signature">
339
- <span class="method-name">test_delimited_array</span><span class="method-args">()</span>
340
- </a>
341
- </div>
342
-
343
- <div class="method-description">
344
- <p><a class="source-toggle" href="#"
345
- onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
346
- <div class="method-source-code" id="M000016-source">
347
- <pre>
348
- <span class="ruby-comment cmt"># File test/test_blocker.rb, line 371</span>
349
- 371: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_delimited_array</span>
350
- 372: <span class="ruby-identifier">b</span> = <span class="ruby-constant">BBList</span>.<span class="ruby-identifier">new</span>
351
- 373: <span class="ruby-identifier">b</span>.<span class="ruby-identifier">header</span> = <span class="ruby-value">19</span>
352
- 374: <span class="ruby-identifier">b</span>.<span class="ruby-identifier">footer</span> = <span class="ruby-value">67</span>
353
- 375:
354
- 376: <span class="ruby-identifier">ia</span> = <span class="ruby-constant">ItemA</span>.<span class="ruby-identifier">new</span>
355
- 377: <span class="ruby-identifier">ia</span>.<span class="ruby-identifier">iid</span> = <span class="ruby-value">1</span>
356
- 378: <span class="ruby-identifier">ia</span>.<span class="ruby-identifier">name</span> = <span class="ruby-value str">'widget A'</span>
357
- 379: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">1</span>, <span class="ruby-identifier">ia</span>.<span class="ruby-identifier">iid</span>)
358
- 380:
359
- 381: <span class="ruby-identifier">ib</span> = <span class="ruby-constant">ItemB</span>.<span class="ruby-identifier">new</span>
360
- 382: <span class="ruby-identifier">ib</span>.<span class="ruby-identifier">iid</span> = <span class="ruby-value">2</span>
361
- 383: <span class="ruby-identifier">ib</span>.<span class="ruby-identifier">name</span> = <span class="ruby-value str">'widget B'</span>
362
- 384:
363
- 385: <span class="ruby-identifier">b</span>.<span class="ruby-identifier">items</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">ia</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">ib</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">ia</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">ib</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">ib</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">ib</span>
364
- 386: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">6</span>, <span class="ruby-identifier">b</span>.<span class="ruby-identifier">items</span>.<span class="ruby-identifier">size</span>)
365
- 387:
366
- 388: <span class="ruby-identifier">buf</span> = <span class="ruby-identifier">b</span>.<span class="ruby-identifier">block</span>
367
- 389: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">2</span> <span class="ruby-operator">+</span> (<span class="ruby-value">2</span> <span class="ruby-operator">+</span> <span class="ruby-value">32</span>) <span class="ruby-operator">*</span> <span class="ruby-value">6</span> <span class="ruby-operator">+</span> <span class="ruby-value">2</span>, <span class="ruby-identifier">buf</span>.<span class="ruby-identifier">size</span>)
368
- 390:
369
- 391: <span class="ruby-identifier">b2</span> = <span class="ruby-constant">BBList</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">buf</span>)
370
- 392: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">19</span>, <span class="ruby-identifier">b2</span>.<span class="ruby-identifier">header</span>)
371
- 393: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">67</span>, <span class="ruby-identifier">b2</span>.<span class="ruby-identifier">footer</span>)
372
- 394:
373
- 395: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">6</span>, <span class="ruby-identifier">b2</span>.<span class="ruby-identifier">items</span>.<span class="ruby-identifier">size</span>)
374
- 396:
375
- 397: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">b2</span>.<span class="ruby-identifier">items</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">iid</span>, <span class="ruby-identifier">ia</span>.<span class="ruby-identifier">iid</span>)
376
- 398: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">b2</span>.<span class="ruby-identifier">items</span>[<span class="ruby-value">1</span>].<span class="ruby-identifier">iid</span>, <span class="ruby-identifier">ib</span>.<span class="ruby-identifier">iid</span>)
377
- 399: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">b2</span>.<span class="ruby-identifier">items</span>[<span class="ruby-value">2</span>].<span class="ruby-identifier">iid</span>, <span class="ruby-identifier">ia</span>.<span class="ruby-identifier">iid</span>)
378
- 400: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">b2</span>.<span class="ruby-identifier">items</span>[<span class="ruby-value">3</span>].<span class="ruby-identifier">iid</span>, <span class="ruby-identifier">ib</span>.<span class="ruby-identifier">iid</span>)
379
- 401: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">b2</span>.<span class="ruby-identifier">items</span>[<span class="ruby-value">4</span>].<span class="ruby-identifier">iid</span>, <span class="ruby-identifier">ib</span>.<span class="ruby-identifier">iid</span>)
380
- 402: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">b2</span>.<span class="ruby-identifier">items</span>[<span class="ruby-value">5</span>].<span class="ruby-identifier">iid</span>, <span class="ruby-identifier">ib</span>.<span class="ruby-identifier">iid</span>)
381
- 403:
382
- 404: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">b2</span>.<span class="ruby-identifier">items</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">name</span>, <span class="ruby-identifier">ia</span>.<span class="ruby-identifier">name</span>)
383
- 405: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">b2</span>.<span class="ruby-identifier">items</span>[<span class="ruby-value">1</span>].<span class="ruby-identifier">name</span>, <span class="ruby-identifier">ib</span>.<span class="ruby-identifier">name</span>)
384
- 406: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">b2</span>.<span class="ruby-identifier">items</span>[<span class="ruby-value">2</span>].<span class="ruby-identifier">name</span>, <span class="ruby-identifier">ia</span>.<span class="ruby-identifier">name</span>)
385
- 407: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">b2</span>.<span class="ruby-identifier">items</span>[<span class="ruby-value">3</span>].<span class="ruby-identifier">name</span>, <span class="ruby-identifier">ib</span>.<span class="ruby-identifier">name</span>)
386
- 408: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">b2</span>.<span class="ruby-identifier">items</span>[<span class="ruby-value">4</span>].<span class="ruby-identifier">name</span>, <span class="ruby-identifier">ib</span>.<span class="ruby-identifier">name</span>)
387
- 409: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">b2</span>.<span class="ruby-identifier">items</span>[<span class="ruby-value">5</span>].<span class="ruby-identifier">name</span>, <span class="ruby-identifier">ib</span>.<span class="ruby-identifier">name</span>)
388
- 410: <span class="ruby-keyword kw">end</span>
389
- </pre>
390
- </div>
391
- </div>
392
- </div>
393
-
394
- <div id="method-M000004" class="method-detail">
395
- <a name="M000004"></a>
396
-
397
- <div class="method-heading">
398
- <a href="#M000004" class="method-signature">
399
- <span class="method-name">test_failed_deblock</span><span class="method-args">()</span>
400
- </a>
401
- </div>
402
-
403
- <div class="method-description">
404
- <p><a class="source-toggle" href="#"
405
- onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
406
- <div class="method-source-code" id="M000004-source">
407
- <pre>
408
- <span class="ruby-comment cmt"># File test/test_blocker.rb, line 54</span>
409
- 54: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_failed_deblock</span>
410
- 55: <span class="ruby-identifier">bb</span> = <span class="ruby-constant">BBTest2</span>.<span class="ruby-identifier">new</span>
411
- 56: <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">foo</span> = <span class="ruby-value">43</span>
412
- 57: <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">bar</span> = <span class="ruby-value">21</span>
413
- 58: <span class="ruby-identifier">buf</span> = <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">block</span>
414
- 59:
415
- 60: <span class="ruby-identifier">bb2</span> = <span class="ruby-constant">BBTest2</span>.<span class="ruby-identifier">new</span>
416
- 61: <span class="ruby-identifier">status</span> = <span class="ruby-identifier">bb2</span>.<span class="ruby-identifier">deblock</span>(<span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">buf</span>))
417
- 62: <span class="ruby-identifier">assert</span>(<span class="ruby-operator">!</span><span class="ruby-identifier">status</span>)
418
- 63:
419
- 64: <span class="ruby-identifier">assert_raises</span>(<span class="ruby-constant">RuntimeError</span>) <span class="ruby-keyword kw">do</span>
420
- 65: <span class="ruby-constant">BBTest2</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">buf</span>))
421
- 66: <span class="ruby-keyword kw">end</span>
422
- 67:
423
- 68: <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">foo</span> = <span class="ruby-value">42</span>
424
- 69: <span class="ruby-identifier">io</span> = <span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">bb</span>.<span class="ruby-identifier">block</span>)
425
- 70: <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">bb2</span>.<span class="ruby-identifier">deblock</span>(<span class="ruby-identifier">io</span>))
426
- 71:
427
- 72: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">bb2</span>.<span class="ruby-identifier">foo</span>, <span class="ruby-value">42</span>)
428
- 73: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">bb2</span>.<span class="ruby-identifier">bar</span>, <span class="ruby-value">21</span>)
429
- 74: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">6</span>, <span class="ruby-identifier">io</span>.<span class="ruby-identifier">pos</span>)
430
- 75: <span class="ruby-keyword kw">end</span>
431
- </pre>
432
- </div>
433
- </div>
434
- </div>
435
-
436
- <div id="method-M000006" class="method-detail">
437
- <a name="M000006"></a>
438
-
439
- <div class="method-heading">
440
- <a href="#M000006" class="method-signature">
441
- <span class="method-name">test_fixed_array</span><span class="method-args">()</span>
442
- </a>
443
- </div>
444
-
445
- <div class="method-description">
446
- <p><a class="source-toggle" href="#"
447
- onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
448
- <div class="method-source-code" id="M000006-source">
449
- <pre>
450
- <span class="ruby-comment cmt"># File test/test_blocker.rb, line 121</span>
451
- 121: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_fixed_array</span>
452
- 122: <span class="ruby-identifier">bs1</span> = <span class="ruby-constant">BBSub1</span>.<span class="ruby-identifier">new</span>
453
- 123: <span class="ruby-identifier">bs1</span>.<span class="ruby-identifier">foo</span> = <span class="ruby-value">42</span>
454
- 124: <span class="ruby-identifier">bs2</span> = <span class="ruby-constant">BBSub2</span>.<span class="ruby-identifier">new</span>
455
- 125: <span class="ruby-identifier">bs2</span>.<span class="ruby-identifier">bar</span> = <span class="ruby-value">21</span>
456
- 126:
457
- 127: <span class="ruby-identifier">buf</span> = <span class="ruby-identifier">bs1</span>.<span class="ruby-identifier">block</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">bs2</span>.<span class="ruby-identifier">block</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">bs1</span>.<span class="ruby-identifier">block</span>
458
- 128: <span class="ruby-identifier">bb</span> = <span class="ruby-constant">BBTest4</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">buf</span>)
459
- 129:
460
- 130: <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">bb</span>)
461
- 131: <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">bb</span>.<span class="ruby-identifier">fooboo</span>)
462
- 132: <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">bb</span>.<span class="ruby-identifier">fooboo</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">foo</span>)
463
- 133: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">42</span>, <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">fooboo</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">foo</span>)
464
- 134: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">21</span>, <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">fooboo</span>[<span class="ruby-value">1</span>].<span class="ruby-identifier">bar</span>)
465
- 135: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">42</span>, <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">fooboo</span>[<span class="ruby-value">2</span>].<span class="ruby-identifier">foo</span>)
466
- 136: <span class="ruby-keyword kw">end</span>
467
- </pre>
468
- </div>
469
- </div>
470
- </div>
471
-
472
- <div id="method-M000011" class="method-detail">
473
- <a name="M000011"></a>
474
-
475
- <div class="method-heading">
476
- <a href="#M000011" class="method-signature">
477
- <span class="method-name">test_fixed_string</span><span class="method-args">()</span>
478
- </a>
479
- </div>
480
-
481
- <div class="method-description">
482
- <p><a class="source-toggle" href="#"
483
- onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
484
- <div class="method-source-code" id="M000011-source">
485
- <pre>
486
- <span class="ruby-comment cmt"># File test/test_blocker.rb, line 254</span>
487
- 254: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_fixed_string</span>
488
- 255: <span class="ruby-identifier">b</span> = <span class="ruby-constant">BBString</span>.<span class="ruby-identifier">new</span>
489
- 256: <span class="ruby-identifier">b</span>.<span class="ruby-identifier">foo</span> = <span class="ruby-value">1</span>
490
- 257: <span class="ruby-identifier">b</span>.<span class="ruby-identifier">name</span> = <span class="ruby-value str">&quot;Patrick &quot;</span>
491
- 258: <span class="ruby-identifier">b</span>.<span class="ruby-identifier">bar</span> = <span class="ruby-value">42</span>
492
- 259:
493
- 260: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">1</span>, <span class="ruby-identifier">b</span>.<span class="ruby-identifier">foo</span>)
494
- 261: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value str">&quot;Patrick &quot;</span>, <span class="ruby-identifier">b</span>.<span class="ruby-identifier">name</span>)
495
- 262: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">42</span>, <span class="ruby-identifier">b</span>.<span class="ruby-identifier">bar</span>)
496
- 263:
497
- 264: <span class="ruby-identifier">buf</span> = <span class="ruby-identifier">b</span>.<span class="ruby-identifier">block</span>
498
- 265: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">2</span> <span class="ruby-operator">+</span> <span class="ruby-value">20</span> <span class="ruby-operator">+</span> <span class="ruby-value">4</span>, <span class="ruby-identifier">buf</span>.<span class="ruby-identifier">size</span>)
499
- 266:
500
- 267: <span class="ruby-identifier">b2</span> = <span class="ruby-constant">BBString</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">buf</span>)
501
- 268: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">1</span>, <span class="ruby-identifier">b2</span>.<span class="ruby-identifier">foo</span>)
502
- 269: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value str">&quot;Patrick &quot;</span>, <span class="ruby-identifier">b2</span>.<span class="ruby-identifier">name</span>)
503
- 270: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">42</span>, <span class="ruby-identifier">b2</span>.<span class="ruby-identifier">bar</span>)
504
- 271: <span class="ruby-keyword kw">end</span>
505
- </pre>
506
- </div>
507
- </div>
508
- </div>
509
-
510
- <div id="method-M000005" class="method-detail">
511
- <a name="M000005"></a>
512
-
513
- <div class="method-heading">
514
- <a href="#M000005" class="method-signature">
515
- <span class="method-name">test_has_one_of</span><span class="method-args">()</span>
516
- </a>
517
- </div>
518
-
519
- <div class="method-description">
520
- <p><a class="source-toggle" href="#"
521
- onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
522
- <div class="method-source-code" id="M000005-source">
523
- <pre>
524
- <span class="ruby-comment cmt"># File test/test_blocker.rb, line 89</span>
525
- 89: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_has_one_of</span>
526
- 90: <span class="ruby-identifier">bs1</span> = <span class="ruby-constant">BBSub1</span>.<span class="ruby-identifier">new</span>
527
- 91: <span class="ruby-identifier">bs1</span>.<span class="ruby-identifier">foo</span> = <span class="ruby-value">42</span>
528
- 92: <span class="ruby-identifier">buf</span> = <span class="ruby-identifier">bs1</span>.<span class="ruby-identifier">block</span>
529
- 93: <span class="ruby-identifier">bb</span> = <span class="ruby-constant">BBTest3</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">buf</span>))
530
- 94: <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">bb</span>)
531
- 95: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-constant">BBSub1</span>, <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">foo</span>.<span class="ruby-identifier">class</span>)
532
- 96: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">42</span>, <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">foo</span>.<span class="ruby-identifier">foo</span>)
533
- 97:
534
- 98: <span class="ruby-identifier">bs2</span> = <span class="ruby-constant">BBSub2</span>.<span class="ruby-identifier">new</span>
535
- 99: <span class="ruby-identifier">bs2</span>.<span class="ruby-identifier">bar</span> = <span class="ruby-value">21</span>
536
- 100: <span class="ruby-identifier">io</span> = <span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">bs2</span>.<span class="ruby-identifier">block</span>)
537
- 101: <span class="ruby-identifier">bb</span> = <span class="ruby-constant">BBTest3</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">io</span>)
538
- 102: <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">bb</span>)
539
- 103: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-constant">BBSub2</span>, <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">foo</span>.<span class="ruby-identifier">class</span>)
540
- 104: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">21</span>, <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">foo</span>.<span class="ruby-identifier">bar</span>)
541
- 105: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">2</span>, <span class="ruby-identifier">io</span>.<span class="ruby-identifier">pos</span>)
542
- 106:
543
- 107: <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">foo</span> = <span class="ruby-identifier">bs1</span>
544
- 108: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-constant">BBSub1</span>, <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">foo</span>.<span class="ruby-identifier">class</span>)
545
- 109: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">42</span>, <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">foo</span>.<span class="ruby-identifier">foo</span>)
546
- 110:
547
- 111: <span class="ruby-identifier">buf</span> = <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">block</span>
548
- 112: <span class="ruby-identifier">bb</span> = <span class="ruby-constant">BBTest3</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">buf</span>)
549
- 113: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-constant">BBSub1</span>, <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">foo</span>.<span class="ruby-identifier">class</span>)
550
- 114: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">42</span>, <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">foo</span>.<span class="ruby-identifier">foo</span>)
551
- 115: <span class="ruby-keyword kw">end</span>
552
- </pre>
553
- </div>
554
- </div>
555
- </div>
556
-
557
- <div id="method-M000014" class="method-detail">
558
- <a name="M000014"></a>
559
-
560
- <div class="method-heading">
561
- <a href="#M000014" class="method-signature">
562
- <span class="method-name">test_packed_date</span><span class="method-args">()</span>
563
- </a>
564
- </div>
565
-
566
- <div class="method-description">
567
- <p><a class="source-toggle" href="#"
568
- onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
569
- <div class="method-source-code" id="M000014-source">
570
- <pre>
571
- <span class="ruby-comment cmt"># File test/test_blocker.rb, line 327</span>
572
- 327: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_packed_date</span>
573
- 328: <span class="ruby-identifier">bdate</span> = <span class="ruby-constant">Date</span>.<span class="ruby-identifier">civil</span>(<span class="ruby-value">1967</span>, <span class="ruby-value">9</span>, <span class="ruby-value">30</span>)
574
- 329: <span class="ruby-identifier">b</span> = <span class="ruby-constant">BBDate</span>.<span class="ruby-identifier">new</span>
575
- 330: <span class="ruby-identifier">b</span>.<span class="ruby-identifier">today</span> = <span class="ruby-identifier">bdate</span>
576
- 331:
577
- 332: <span class="ruby-identifier">buf</span> = <span class="ruby-identifier">b</span>.<span class="ruby-identifier">block</span>
578
- 333: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">4</span>, <span class="ruby-identifier">buf</span>.<span class="ruby-identifier">size</span>)
579
- 334:
580
- 335: <span class="ruby-identifier">b2</span> = <span class="ruby-constant">BBDate</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">buf</span>)
581
- 336: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">bdate</span>, <span class="ruby-identifier">b2</span>.<span class="ruby-identifier">today</span>)
582
- 337: <span class="ruby-keyword kw">end</span>
583
- </pre>
584
- </div>
585
- </div>
586
- </div>
587
-
588
- <div id="method-M000015" class="method-detail">
589
- <a name="M000015"></a>
590
-
591
- <div class="method-heading">
592
- <a href="#M000015" class="method-signature">
593
- <span class="method-name">test_packed_datetime</span><span class="method-args">()</span>
594
- </a>
595
- </div>
596
-
597
- <div class="method-description">
598
- <p><a class="source-toggle" href="#"
599
- onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
600
- <div class="method-source-code" id="M000015-source">
601
- <pre>
602
- <span class="ruby-comment cmt"># File test/test_blocker.rb, line 343</span>
603
- 343: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_packed_datetime</span>
604
- 344: <span class="ruby-identifier">now</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">local</span>(<span class="ruby-value">1985</span>, <span class="ruby-value">5</span>, <span class="ruby-value">30</span>, <span class="ruby-value">7</span>, <span class="ruby-value">6</span>, <span class="ruby-value">5</span>)
605
- 345: <span class="ruby-identifier">b</span> = <span class="ruby-constant">BBTime</span>.<span class="ruby-identifier">new</span>
606
- 346: <span class="ruby-identifier">b</span>.<span class="ruby-identifier">now</span> = <span class="ruby-identifier">now</span>
607
- 347:
608
- 348: <span class="ruby-identifier">buf</span> = <span class="ruby-identifier">b</span>.<span class="ruby-identifier">block</span>
609
- 349: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">14</span> <span class="ruby-operator">/</span> <span class="ruby-value">2</span>, <span class="ruby-identifier">buf</span>.<span class="ruby-identifier">size</span>)
610
- 350:
611
- 351: <span class="ruby-identifier">b2</span> = <span class="ruby-constant">BBTime</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">buf</span>)
612
- 352: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">now</span>, <span class="ruby-identifier">b2</span>.<span class="ruby-identifier">now</span>)
613
- 353: <span class="ruby-keyword kw">end</span>
614
- </pre>
615
- </div>
616
- </div>
617
- </div>
618
-
619
- <div id="method-M000013" class="method-detail">
620
- <a name="M000013"></a>
621
-
622
- <div class="method-heading">
623
- <a href="#M000013" class="method-signature">
624
- <span class="method-name">test_packed_numbers</span><span class="method-args">()</span>
625
- </a>
626
- </div>
627
-
628
- <div class="method-description">
629
- <p><a class="source-toggle" href="#"
630
- onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
631
- <div class="method-source-code" id="M000013-source">
632
- <pre>
633
- <span class="ruby-comment cmt"># File test/test_blocker.rb, line 304</span>
634
- 304: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_packed_numbers</span>
635
- 305: <span class="ruby-identifier">b</span> = <span class="ruby-constant">BBPacked</span>.<span class="ruby-identifier">new</span>
636
- 306: <span class="ruby-identifier">b</span>.<span class="ruby-identifier">foo</span> = <span class="ruby-value">7</span>
637
- 307: <span class="ruby-identifier">b</span>.<span class="ruby-identifier">age</span> = <span class="ruby-value">32</span>
638
- 308: <span class="ruby-identifier">b</span>.<span class="ruby-identifier">bar</span> = <span class="ruby-value">3</span>
639
- 309:
640
- 310: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">7</span>, <span class="ruby-identifier">b</span>.<span class="ruby-identifier">foo</span>)
641
- 311: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">32</span>, <span class="ruby-identifier">b</span>.<span class="ruby-identifier">age</span>)
642
- 312: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">3</span>, <span class="ruby-identifier">b</span>.<span class="ruby-identifier">bar</span>)
643
- 313:
644
- 314: <span class="ruby-identifier">buf</span> = <span class="ruby-identifier">b</span>.<span class="ruby-identifier">block</span>
645
- 315: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">2</span> <span class="ruby-operator">+</span> <span class="ruby-value">2</span> <span class="ruby-operator">+</span> <span class="ruby-value">4</span>, <span class="ruby-identifier">buf</span>.<span class="ruby-identifier">size</span>)
646
- 316:
647
- 317: <span class="ruby-identifier">b2</span> = <span class="ruby-constant">BBPacked</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">buf</span>)
648
- 318: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">7</span>, <span class="ruby-identifier">b2</span>.<span class="ruby-identifier">foo</span>)
649
- 319: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">32</span>, <span class="ruby-identifier">b2</span>.<span class="ruby-identifier">age</span>)
650
- 320: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">3</span>, <span class="ruby-identifier">b2</span>.<span class="ruby-identifier">bar</span>)
651
- 321: <span class="ruby-keyword kw">end</span>
652
- </pre>
653
- </div>
654
- </div>
655
- </div>
656
-
657
- <div id="method-M000003" class="method-detail">
658
- <a name="M000003"></a>
659
-
660
- <div class="method-heading">
661
- <a href="#M000003" class="method-signature">
662
- <span class="method-name">test_round_trip</span><span class="method-args">()</span>
663
- </a>
664
- </div>
665
-
666
- <div class="method-description">
667
- <p><a class="source-toggle" href="#"
668
- onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
669
- <div class="method-source-code" id="M000003-source">
670
- <pre>
671
- <span class="ruby-comment cmt"># File test/test_blocker.rb, line 38</span>
672
- 38: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_round_trip</span>
673
- 39: <span class="ruby-identifier">bb</span> = <span class="ruby-constant">BBTest2</span>.<span class="ruby-identifier">new</span>
674
- 40: <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">foo</span> = <span class="ruby-value">42</span>
675
- 41: <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">bar</span> = <span class="ruby-value">21</span>
676
- 42: <span class="ruby-identifier">buf</span> = <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">block</span>
677
- 43:
678
- 44: <span class="ruby-identifier">bb2</span> = <span class="ruby-constant">BBTest2</span>.<span class="ruby-identifier">new</span>
679
- 45: <span class="ruby-identifier">bb2</span>.<span class="ruby-identifier">deblock</span>(<span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">buf</span>))
680
- 46: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">bb2</span>.<span class="ruby-identifier">foo</span>, <span class="ruby-value">42</span>)
681
- 47: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">bb2</span>.<span class="ruby-identifier">bar</span>, <span class="ruby-value">21</span>)
682
- 48:
683
- 49: <span class="ruby-identifier">bb3</span> = <span class="ruby-constant">BBTest2</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">buf</span>))
684
- 50: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">bb3</span>.<span class="ruby-identifier">foo</span>, <span class="ruby-value">42</span>)
685
- 51: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">bb3</span>.<span class="ruby-identifier">bar</span>, <span class="ruby-value">21</span>)
686
- 52: <span class="ruby-keyword kw">end</span>
687
- </pre>
688
- </div>
689
- </div>
690
- </div>
691
-
692
- <div id="method-M000002" class="method-detail">
693
- <a name="M000002"></a>
694
-
695
- <div class="method-heading">
696
- <a href="#M000002" class="method-signature">
697
- <span class="method-name">test_simple_valid</span><span class="method-args">()</span>
698
- </a>
699
- </div>
700
-
701
- <div class="method-description">
702
- <p><a class="source-toggle" href="#"
703
- onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
704
- <div class="method-source-code" id="M000002-source">
705
- <pre>
706
- <span class="ruby-comment cmt"># File test/test_blocker.rb, line 25</span>
707
- 25: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_simple_valid</span>
708
- 26: <span class="ruby-identifier">bb</span> = <span class="ruby-constant">BBTest2</span>.<span class="ruby-identifier">new</span>
709
- 27: <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">foo</span> = <span class="ruby-value">32</span>
710
- 28: <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">bar</span> = <span class="ruby-value">24</span>
711
- 29:
712
- 30: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">32</span>, <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">foo</span>)
713
- 31: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">24</span>, <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">bar</span>)
714
- 32: <span class="ruby-identifier">assert</span>(<span class="ruby-operator">!</span><span class="ruby-identifier">bb</span>.<span class="ruby-identifier">valid?</span>)
715
- 33:
716
- 34: <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">foo</span> = <span class="ruby-value">42</span>
717
- 35: <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">bb</span>.<span class="ruby-identifier">valid?</span>)
718
- 36: <span class="ruby-keyword kw">end</span>
719
- </pre>
720
- </div>
721
- </div>
722
- </div>
723
-
724
- <div id="method-M000001" class="method-detail">
725
- <a name="M000001"></a>
726
-
727
- <div class="method-heading">
728
- <a href="#M000001" class="method-signature">
729
- <span class="method-name">test_usage</span><span class="method-args">()</span>
730
- </a>
731
- </div>
732
-
733
- <div class="method-description">
734
- <p><a class="source-toggle" href="#"
735
- onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
736
- <div class="method-source-code" id="M000001-source">
737
- <pre>
738
- <span class="ruby-comment cmt"># File test/test_blocker.rb, line 11</span>
739
- 11: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_usage</span>
740
- 12: <span class="ruby-identifier">bb</span> = <span class="ruby-constant">BBTest1</span>.<span class="ruby-identifier">new</span>
741
- 13: <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">foo</span> = <span class="ruby-value">32</span>
742
- 14: <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">bar</span> = <span class="ruby-value">24</span>
743
- 15:
744
- 16: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">32</span>, <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">foo</span>)
745
- 17: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">24</span>, <span class="ruby-identifier">bb</span>.<span class="ruby-identifier">bar</span>)
746
- 18: <span class="ruby-keyword kw">end</span>
747
- </pre>
748
- </div>
749
- </div>
750
- </div>
751
-
752
- <div id="method-M000012" class="method-detail">
753
- <a name="M000012"></a>
754
-
755
- <div class="method-heading">
756
- <a href="#M000012" class="method-signature">
757
- <span class="method-name">test_utf16</span><span class="method-args">()</span>
758
- </a>
759
- </div>
760
-
761
- <div class="method-description">
762
- <p><a class="source-toggle" href="#"
763
- onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
764
- <div class="method-source-code" id="M000012-source">
765
- <pre>
766
- <span class="ruby-comment cmt"># File test/test_blocker.rb, line 279</span>
767
- 279: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_utf16</span>
768
- 280: <span class="ruby-identifier">b</span> = <span class="ruby-constant">BBUTF16</span>.<span class="ruby-identifier">new</span>
769
- 281: <span class="ruby-identifier">b</span>.<span class="ruby-identifier">foo</span> = <span class="ruby-value">1</span>
770
- 282: <span class="ruby-identifier">b</span>.<span class="ruby-identifier">name</span> = <span class="ruby-value str">&quot;Patrick &quot;</span>
771
- 283: <span class="ruby-identifier">b</span>.<span class="ruby-identifier">bar</span> = <span class="ruby-value">42</span>
772
- 284:
773
- 285: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">1</span>, <span class="ruby-identifier">b</span>.<span class="ruby-identifier">foo</span>)
774
- 286: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value str">&quot;Patrick &quot;</span>, <span class="ruby-identifier">b</span>.<span class="ruby-identifier">name</span>)
775
- 287: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">42</span>, <span class="ruby-identifier">b</span>.<span class="ruby-identifier">bar</span>)
776
- 288:
777
- 289: <span class="ruby-identifier">buf</span> = <span class="ruby-identifier">b</span>.<span class="ruby-identifier">block</span>
778
- 290: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">2</span> <span class="ruby-operator">+</span> <span class="ruby-value">20</span> <span class="ruby-operator">*</span> <span class="ruby-value">2</span> <span class="ruby-operator">+</span> <span class="ruby-value">4</span>, <span class="ruby-identifier">buf</span>.<span class="ruby-identifier">size</span>)
779
- 291:
780
- 292: <span class="ruby-identifier">b2</span> = <span class="ruby-constant">BBUTF16</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">buf</span>)
781
- 293: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">1</span>, <span class="ruby-identifier">b2</span>.<span class="ruby-identifier">foo</span>)
782
- 294: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value str">&quot;Patrick &quot;</span>, <span class="ruby-identifier">b2</span>.<span class="ruby-identifier">name</span>)
783
- 295: <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">42</span>, <span class="ruby-identifier">b2</span>.<span class="ruby-identifier">bar</span>)
784
- 296: <span class="ruby-keyword kw">end</span>
785
- </pre>
786
- </div>
787
- </div>
788
- </div>
789
-
790
-
791
- </div>
792
-
793
-
794
- </div>
795
-
796
-
797
- <div id="validator-badges">
798
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
799
- </div>
800
-
801
- </body>
802
- </html>