rroonga 0.9.5-x86-mingw32 → 1.0.1-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (421) hide show
  1. data/NEWS.ja.rdoc +24 -0
  2. data/NEWS.rdoc +24 -0
  3. data/README.ja.rdoc +3 -2
  4. data/README.rdoc +3 -2
  5. data/Rakefile +15 -6
  6. data/ext/groonga/extconf.rb +25 -25
  7. data/ext/groonga/groonga.def +2 -0
  8. data/ext/groonga/rb-grn-array.c +1 -1
  9. data/ext/groonga/rb-grn-exception.c +14 -0
  10. data/ext/groonga/rb-grn-hash.c +1 -1
  11. data/ext/groonga/rb-grn-index-column.c +13 -1
  12. data/ext/groonga/rb-grn-object.c +2 -2
  13. data/ext/groonga/rb-grn-patricia-trie.c +394 -1
  14. data/ext/groonga/rb-grn-table.c +33 -2
  15. data/ext/groonga/rb-grn.h +3 -3
  16. data/html/index.html +1 -1
  17. data/lib/1.8/groonga.so +0 -0
  18. data/lib/1.9/groonga.so +0 -0
  19. data/lib/groonga/record.rb +32 -2
  20. data/lib/groonga/schema.rb +1 -1
  21. data/rroonga-build.rb +3 -3
  22. data/test/test-patricia-trie.rb +172 -1
  23. data/test/test-record.rb +7 -0
  24. data/test/test-remote.rb +2 -1
  25. data/test/test-table-cursor.rb +35 -1
  26. data/test/test-table-select-normalize.rb +7 -3
  27. data/vendor/local/bin/grntest.exe +0 -0
  28. data/vendor/local/bin/groonga.exe +0 -0
  29. data/vendor/local/bin/libgroonga-0.dll +0 -0
  30. data/vendor/local/etc/groonga/groonga.conf +11 -0
  31. data/vendor/local/etc/groonga/init.d/redhat/groonga +168 -0
  32. data/vendor/local/etc/groonga/init.d/redhat/sysconfig/groonga +8 -0
  33. data/vendor/local/include/groonga/groonga.h +38 -12
  34. data/vendor/local/lib/groonga/modules/suggest/suggest.a +0 -0
  35. data/vendor/local/lib/groonga/modules/suggest/suggest.dll +0 -0
  36. data/vendor/local/lib/groonga/modules/suggest/suggest.dll.a +0 -0
  37. data/vendor/local/lib/groonga/modules/{functions/cast.la → suggest/suggest.la} +6 -6
  38. data/vendor/local/lib/libgroonga.a +0 -0
  39. data/vendor/local/lib/libgroonga.dll.a +0 -0
  40. data/vendor/local/lib/pkgconfig/groonga.pc +1 -1
  41. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  42. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  43. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
  44. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  45. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  46. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  47. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  48. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  49. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  50. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
  51. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
  52. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
  53. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
  54. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
  55. data/vendor/local/share/groonga/admin_html/images/groonga.png +0 -0
  56. data/vendor/local/share/groonga/admin_html/images/loading.gif +0 -0
  57. data/vendor/local/share/groonga/admin_html/js/jquery.json-2.2.min.js +31 -0
  58. data/vendor/local/share/groonga/doc/ja/html/.buildinfo +4 -0
  59. data/vendor/local/share/groonga/doc/ja/html/_sources/characteristic.txt +56 -0
  60. data/vendor/local/share/groonga/doc/ja/html/_sources/commands.txt +10 -0
  61. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/cache_limit.txt +52 -0
  62. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/check.txt +164 -0
  63. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/clearlock.txt +61 -0
  64. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/column_create.txt +93 -0
  65. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/column_list.txt +97 -0
  66. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/column_remove.txt +58 -0
  67. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/define_selector.txt +114 -0
  68. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/defrag.txt +57 -0
  69. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/delete.txt +68 -0
  70. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/dump.txt +62 -0
  71. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/load.txt +98 -0
  72. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/log_level.txt +65 -0
  73. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/log_put.txt +69 -0
  74. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/log_reopen.txt +66 -0
  75. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/quit.txt +38 -0
  76. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/select.txt +247 -0
  77. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/shutdown.txt +38 -0
  78. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/status.txt +59 -0
  79. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/suggest.txt +79 -0
  80. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/table_create.txt +111 -0
  81. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/table_list.txt +87 -0
  82. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/table_remove.txt +50 -0
  83. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/view_add.txt +53 -0
  84. data/vendor/local/share/groonga/doc/ja/html/_sources/commands_not_implemented/add.txt +102 -0
  85. data/vendor/local/share/groonga/doc/ja/html/_sources/commands_not_implemented/get.txt +78 -0
  86. data/vendor/local/share/groonga/doc/ja/html/_sources/commands_not_implemented/set.txt +103 -0
  87. data/vendor/local/share/groonga/doc/ja/html/_sources/developer.txt +10 -0
  88. data/vendor/local/share/groonga/doc/ja/html/_sources/developer/com.txt +18 -0
  89. data/vendor/local/share/groonga/doc/ja/html/_sources/developer/document.txt +38 -0
  90. data/vendor/local/share/groonga/doc/ja/html/_sources/developer/query.txt +212 -0
  91. data/vendor/local/share/groonga/doc/ja/html/_sources/developer/test.txt +114 -0
  92. data/vendor/local/share/groonga/doc/ja/html/_sources/execfile.txt +226 -0
  93. data/vendor/local/share/groonga/doc/ja/html/_sources/expr.txt +43 -0
  94. data/vendor/local/share/groonga/doc/ja/html/_sources/functions.txt +10 -0
  95. data/vendor/local/share/groonga/doc/ja/html/_sources/functions/edit_distance.txt +48 -0
  96. data/vendor/local/share/groonga/doc/ja/html/_sources/functions/geo_distance.txt +51 -0
  97. data/vendor/local/share/groonga/doc/ja/html/_sources/functions/geo_in_circle.txt +54 -0
  98. data/vendor/local/share/groonga/doc/ja/html/_sources/functions/geo_in_rectangle.txt +55 -0
  99. data/vendor/local/share/groonga/doc/ja/html/_sources/functions/now.txt +34 -0
  100. data/vendor/local/share/groonga/doc/ja/html/_sources/functions/rand.txt +41 -0
  101. data/vendor/local/share/groonga/doc/ja/html/_sources/grnslap.txt +64 -0
  102. data/vendor/local/share/groonga/doc/ja/html/_sources/grntest.txt +259 -0
  103. data/vendor/local/share/groonga/doc/ja/html/_sources/http.txt +52 -0
  104. data/vendor/local/share/groonga/doc/ja/html/_sources/index.txt +21 -0
  105. data/vendor/local/share/groonga/doc/ja/html/_sources/install.txt +114 -0
  106. data/vendor/local/share/groonga/doc/ja/html/_sources/news.txt +199 -0
  107. data/vendor/local/share/groonga/doc/ja/html/_sources/process.txt +12 -0
  108. data/vendor/local/share/groonga/doc/ja/html/_sources/pseudo_column.txt +38 -0
  109. data/vendor/local/share/groonga/doc/ja/html/_sources/reference.txt +14 -0
  110. data/vendor/local/share/groonga/doc/ja/html/_sources/tutorial.txt +10 -0
  111. data/vendor/local/share/groonga/doc/ja/html/_sources/tutorial/tutorial01.txt +293 -0
  112. data/vendor/local/share/groonga/doc/ja/html/_sources/tutorial/tutorial02.txt +100 -0
  113. data/vendor/local/share/groonga/doc/ja/html/_sources/tutorial/tutorial03.txt +72 -0
  114. data/vendor/local/share/groonga/doc/ja/html/_sources/tutorial/tutorial04.txt +111 -0
  115. data/vendor/local/share/groonga/doc/ja/html/_sources/tutorial/tutorial05.txt +65 -0
  116. data/vendor/local/share/groonga/doc/ja/html/_sources/tutorial/tutorial06.txt +91 -0
  117. data/vendor/local/share/groonga/doc/ja/html/_sources/tutorial/tutorial07.txt +92 -0
  118. data/vendor/local/share/groonga/doc/ja/html/_sources/tutorial/tutorial08.txt +53 -0
  119. data/vendor/local/share/groonga/doc/ja/html/_sources/tutorial/tutorial09.txt +9 -0
  120. data/vendor/local/share/groonga/doc/ja/html/_sources/tutorial/tutorial10.txt +486 -0
  121. data/vendor/local/share/groonga/doc/ja/html/_sources/type.txt +118 -0
  122. data/vendor/local/share/groonga/doc/ja/html/_static/basic.css +509 -0
  123. data/vendor/local/share/groonga/doc/ja/html/_static/default.css +277 -0
  124. data/vendor/local/share/groonga/doc/ja/html/_static/doctools.js +247 -0
  125. data/vendor/local/share/groonga/doc/ja/html/_static/file.png +0 -0
  126. data/vendor/local/share/groonga/doc/ja/html/_static/jquery.js +6240 -0
  127. data/vendor/local/share/groonga/doc/ja/html/_static/minus.png +0 -0
  128. data/vendor/local/share/groonga/doc/ja/html/_static/plus.png +0 -0
  129. data/vendor/local/share/groonga/doc/ja/html/_static/pygments.css +61 -0
  130. data/vendor/local/share/groonga/doc/ja/html/_static/searchtools.js +518 -0
  131. data/vendor/local/share/groonga/doc/ja/html/_static/sidebar.js +147 -0
  132. data/vendor/local/share/groonga/doc/ja/html/_static/underscore.js +16 -0
  133. data/vendor/local/share/groonga/doc/ja/html/characteristic.html +162 -0
  134. data/vendor/local/share/groonga/doc/ja/html/commands.html +139 -0
  135. data/vendor/local/share/groonga/doc/ja/html/commands/cache_limit.html +173 -0
  136. data/vendor/local/share/groonga/doc/ja/html/commands/check.html +285 -0
  137. data/vendor/local/share/groonga/doc/ja/html/commands/clearlock.html +180 -0
  138. data/vendor/local/share/groonga/doc/ja/html/commands/column_create.html +210 -0
  139. data/vendor/local/share/groonga/doc/ja/html/commands/column_list.html +220 -0
  140. data/vendor/local/share/groonga/doc/ja/html/commands/column_remove.html +183 -0
  141. data/vendor/local/share/groonga/doc/ja/html/commands/define_selector.html +221 -0
  142. data/vendor/local/share/groonga/doc/ja/html/commands/defrag.html +177 -0
  143. data/vendor/local/share/groonga/doc/ja/html/commands/delete.html +182 -0
  144. data/vendor/local/share/groonga/doc/ja/html/commands/dump.html +177 -0
  145. data/vendor/local/share/groonga/doc/ja/html/commands/load.html +208 -0
  146. data/vendor/local/share/groonga/doc/ja/html/commands/log_level.html +187 -0
  147. data/vendor/local/share/groonga/doc/ja/html/commands/log_put.html +190 -0
  148. data/vendor/local/share/groonga/doc/ja/html/commands/log_reopen.html +188 -0
  149. data/vendor/local/share/groonga/doc/ja/html/commands/quit.html +156 -0
  150. data/vendor/local/share/groonga/doc/ja/html/commands/select.html +331 -0
  151. data/vendor/local/share/groonga/doc/ja/html/commands/shutdown.html +156 -0
  152. data/vendor/local/share/groonga/doc/ja/html/commands/status.html +179 -0
  153. data/vendor/local/share/groonga/doc/ja/html/commands/suggest.html +191 -0
  154. data/vendor/local/share/groonga/doc/ja/html/commands/table_create.html +222 -0
  155. data/vendor/local/share/groonga/doc/ja/html/commands/table_list.html +202 -0
  156. data/vendor/local/share/groonga/doc/ja/html/commands/table_remove.html +173 -0
  157. data/vendor/local/share/groonga/doc/ja/html/commands/view_add.html +175 -0
  158. data/vendor/local/share/groonga/doc/ja/html/commands_not_implemented/add.html +180 -0
  159. data/vendor/local/share/groonga/doc/ja/html/commands_not_implemented/get.html +161 -0
  160. data/vendor/local/share/groonga/doc/ja/html/commands_not_implemented/set.html +182 -0
  161. data/vendor/local/share/groonga/doc/ja/html/developer.html +118 -0
  162. data/vendor/local/share/groonga/doc/ja/html/developer/com.html +136 -0
  163. data/vendor/local/share/groonga/doc/ja/html/developer/document.html +159 -0
  164. data/vendor/local/share/groonga/doc/ja/html/developer/query.html +336 -0
  165. data/vendor/local/share/groonga/doc/ja/html/developer/test.html +220 -0
  166. data/vendor/local/share/groonga/doc/ja/html/execfile.html +370 -0
  167. data/vendor/local/share/groonga/doc/ja/html/expr.html +157 -0
  168. data/vendor/local/share/groonga/doc/ja/html/functions.html +122 -0
  169. data/vendor/local/share/groonga/doc/ja/html/functions/edit_distance.html +162 -0
  170. data/vendor/local/share/groonga/doc/ja/html/functions/geo_distance.html +170 -0
  171. data/vendor/local/share/groonga/doc/ja/html/functions/geo_in_circle.html +173 -0
  172. data/vendor/local/share/groonga/doc/ja/html/functions/geo_in_rectangle.html +172 -0
  173. data/vendor/local/share/groonga/doc/ja/html/functions/now.html +152 -0
  174. data/vendor/local/share/groonga/doc/ja/html/functions/rand.html +159 -0
  175. data/vendor/local/share/groonga/doc/ja/html/genindex.html +227 -0
  176. data/vendor/local/share/groonga/doc/ja/html/grnslap.html +183 -0
  177. data/vendor/local/share/groonga/doc/ja/html/grntest.html +368 -0
  178. data/vendor/local/share/groonga/doc/ja/html/http.html +163 -0
  179. data/vendor/local/share/groonga/doc/ja/html/index.html +291 -0
  180. data/vendor/local/share/groonga/doc/ja/html/install.html +228 -0
  181. data/vendor/local/share/groonga/doc/ja/html/news.html +310 -0
  182. data/vendor/local/share/groonga/doc/ja/html/objects.inv +0 -0
  183. data/vendor/local/share/groonga/doc/ja/html/process.html +120 -0
  184. data/vendor/local/share/groonga/doc/ja/html/pseudo_column.html +147 -0
  185. data/vendor/local/share/groonga/doc/ja/html/reference.html +174 -0
  186. data/vendor/local/share/groonga/doc/ja/html/search.html +96 -0
  187. data/vendor/local/share/groonga/doc/ja/html/searchindex.js +1 -0
  188. data/vendor/local/share/groonga/doc/ja/html/tutorial.html +172 -0
  189. data/vendor/local/share/groonga/doc/ja/html/tutorial/tutorial01.html +388 -0
  190. data/vendor/local/share/groonga/doc/ja/html/tutorial/tutorial02.html +214 -0
  191. data/vendor/local/share/groonga/doc/ja/html/tutorial/tutorial03.html +183 -0
  192. data/vendor/local/share/groonga/doc/ja/html/tutorial/tutorial04.html +212 -0
  193. data/vendor/local/share/groonga/doc/ja/html/tutorial/tutorial05.html +169 -0
  194. data/vendor/local/share/groonga/doc/ja/html/tutorial/tutorial06.html +209 -0
  195. data/vendor/local/share/groonga/doc/ja/html/tutorial/tutorial07.html +212 -0
  196. data/vendor/local/share/groonga/doc/ja/html/tutorial/tutorial08.html +139 -0
  197. data/vendor/local/share/groonga/doc/ja/html/tutorial/tutorial09.html +114 -0
  198. data/vendor/local/share/groonga/doc/ja/html/tutorial/tutorial10.html +458 -0
  199. data/vendor/local/share/groonga/doc/ja/html/type.html +217 -0
  200. data/vendor/local/share/groonga/doc/ja/source/__init__.py +0 -0
  201. data/vendor/local/share/groonga/doc/ja/source/characteristic.txt +56 -0
  202. data/vendor/local/share/groonga/doc/ja/source/commands.txt +10 -0
  203. data/vendor/local/share/groonga/doc/ja/source/commands/cache_limit.txt +52 -0
  204. data/vendor/local/share/groonga/doc/ja/source/commands/check.txt +164 -0
  205. data/vendor/local/share/groonga/doc/ja/source/commands/clearlock.txt +61 -0
  206. data/vendor/local/share/groonga/doc/ja/source/commands/column_create.txt +93 -0
  207. data/vendor/local/share/groonga/doc/ja/source/commands/column_list.txt +97 -0
  208. data/vendor/local/share/groonga/doc/ja/source/commands/column_remove.txt +58 -0
  209. data/vendor/local/share/groonga/doc/ja/source/commands/define_selector.txt +114 -0
  210. data/vendor/local/share/groonga/doc/ja/source/commands/defrag.txt +57 -0
  211. data/vendor/local/share/groonga/doc/ja/source/commands/delete.txt +68 -0
  212. data/vendor/local/share/groonga/doc/ja/source/commands/dump.txt +62 -0
  213. data/vendor/local/share/groonga/doc/ja/source/commands/load.txt +98 -0
  214. data/vendor/local/share/groonga/doc/ja/source/commands/log_level.txt +65 -0
  215. data/vendor/local/share/groonga/doc/ja/source/commands/log_put.txt +69 -0
  216. data/vendor/local/share/groonga/doc/ja/source/commands/log_reopen.txt +66 -0
  217. data/vendor/local/share/groonga/doc/ja/source/commands/quit.txt +38 -0
  218. data/vendor/local/share/groonga/doc/ja/source/commands/select.txt +247 -0
  219. data/vendor/local/share/groonga/doc/ja/source/commands/shutdown.txt +38 -0
  220. data/vendor/local/share/groonga/doc/ja/source/commands/status.txt +59 -0
  221. data/vendor/local/share/groonga/doc/ja/source/commands/table_create.txt +111 -0
  222. data/vendor/local/share/groonga/doc/ja/source/commands/table_list.txt +87 -0
  223. data/vendor/local/share/groonga/doc/ja/source/commands/table_remove.txt +50 -0
  224. data/vendor/local/share/groonga/doc/ja/source/commands/view_add.txt +53 -0
  225. data/vendor/local/share/groonga/doc/ja/source/commands_not_implemented/add.txt +102 -0
  226. data/vendor/local/share/groonga/doc/ja/source/commands_not_implemented/get.txt +78 -0
  227. data/vendor/local/share/groonga/doc/ja/source/commands_not_implemented/set.txt +103 -0
  228. data/vendor/local/share/groonga/doc/ja/source/conf.py +265 -0
  229. data/vendor/local/share/groonga/doc/ja/source/developer.txt +10 -0
  230. data/vendor/local/share/groonga/doc/ja/source/developer/com.txt +18 -0
  231. data/vendor/local/share/groonga/doc/ja/source/developer/document.txt +38 -0
  232. data/vendor/local/share/groonga/doc/ja/source/developer/query.txt +212 -0
  233. data/vendor/local/share/groonga/doc/ja/source/developer/test.txt +114 -0
  234. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-1.log +6 -0
  235. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-10.log +5 -0
  236. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-11.log +5 -0
  237. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-12.log +5 -0
  238. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-13.log +5 -0
  239. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-14.log +9 -0
  240. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-15.log +5 -0
  241. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-16.log +5 -0
  242. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-17.log +5 -0
  243. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-2.log +5 -0
  244. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-3.log +5 -0
  245. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-4.log +7 -0
  246. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-5.log +5 -0
  247. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-6.log +5 -0
  248. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-7.log +16 -0
  249. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-8.log +5 -0
  250. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-9.log +5 -0
  251. data/vendor/local/share/groonga/doc/ja/source/example/tutorial02-1.log +8 -0
  252. data/vendor/local/share/groonga/doc/ja/source/example/tutorial02-2.log +6 -0
  253. data/vendor/local/share/groonga/doc/ja/source/example/tutorial02-3.log +12 -0
  254. data/vendor/local/share/groonga/doc/ja/source/example/tutorial03-1.log +18 -0
  255. data/vendor/local/share/groonga/doc/ja/source/example/tutorial03-2.log +10 -0
  256. data/vendor/local/share/groonga/doc/ja/source/example/tutorial03-3.log +10 -0
  257. data/vendor/local/share/groonga/doc/ja/source/example/tutorial04-1.log +5 -0
  258. data/vendor/local/share/groonga/doc/ja/source/example/tutorial04-2.log +7 -0
  259. data/vendor/local/share/groonga/doc/ja/source/example/tutorial04-3.log +7 -0
  260. data/vendor/local/share/groonga/doc/ja/source/example/tutorial04-4.log +13 -0
  261. data/vendor/local/share/groonga/doc/ja/source/example/tutorial04-5.log +5 -0
  262. data/vendor/local/share/groonga/doc/ja/source/example/tutorial04-6.log +5 -0
  263. data/vendor/local/share/groonga/doc/ja/source/example/tutorial04-7.log +5 -0
  264. data/vendor/local/share/groonga/doc/ja/source/example/tutorial05-1.log +24 -0
  265. data/vendor/local/share/groonga/doc/ja/source/example/tutorial05-2.log +5 -0
  266. data/vendor/local/share/groonga/doc/ja/source/example/tutorial05-3.log +5 -0
  267. data/vendor/local/share/groonga/doc/ja/source/example/tutorial05-4.log +5 -0
  268. data/vendor/local/share/groonga/doc/ja/source/example/tutorial05-5.log +5 -0
  269. data/vendor/local/share/groonga/doc/ja/source/example/tutorial05-6.log +5 -0
  270. data/vendor/local/share/groonga/doc/ja/source/example/tutorial06-1.log +25 -0
  271. data/vendor/local/share/groonga/doc/ja/source/example/tutorial06-2.log +9 -0
  272. data/vendor/local/share/groonga/doc/ja/source/example/tutorial06-3.log +21 -0
  273. data/vendor/local/share/groonga/doc/ja/source/example/tutorial06-4.log +7 -0
  274. data/vendor/local/share/groonga/doc/ja/source/example/tutorial06-5.log +5 -0
  275. data/vendor/local/share/groonga/doc/ja/source/example/tutorial07-1.log +22 -0
  276. data/vendor/local/share/groonga/doc/ja/source/example/tutorial07-2.log +9 -0
  277. data/vendor/local/share/groonga/doc/ja/source/example/tutorial07-3.log +20 -0
  278. data/vendor/local/share/groonga/doc/ja/source/example/tutorial07-4.log +9 -0
  279. data/vendor/local/share/groonga/doc/ja/source/example/tutorial08-1.log +14 -0
  280. data/vendor/local/share/groonga/doc/ja/source/example/tutorial10-1.log +5 -0
  281. data/vendor/local/share/groonga/doc/ja/source/example/tutorial10-10.log +5 -0
  282. data/vendor/local/share/groonga/doc/ja/source/example/tutorial10-2.log +5 -0
  283. data/vendor/local/share/groonga/doc/ja/source/example/tutorial10-3.log +5 -0
  284. data/vendor/local/share/groonga/doc/ja/source/example/tutorial10-4.log +5 -0
  285. data/vendor/local/share/groonga/doc/ja/source/example/tutorial10-5.log +5 -0
  286. data/vendor/local/share/groonga/doc/ja/source/example/tutorial10-6.log +5 -0
  287. data/vendor/local/share/groonga/doc/ja/source/example/tutorial10-7.log +5 -0
  288. data/vendor/local/share/groonga/doc/ja/source/example/tutorial10-8.log +5 -0
  289. data/vendor/local/share/groonga/doc/ja/source/example/tutorial10-9.log +5 -0
  290. data/vendor/local/share/groonga/doc/ja/source/execfile.txt +226 -0
  291. data/vendor/local/share/groonga/doc/ja/source/expr.txt +43 -0
  292. data/vendor/local/share/groonga/doc/ja/source/functions.txt +10 -0
  293. data/vendor/local/share/groonga/doc/ja/source/functions/edit_distance.txt +48 -0
  294. data/vendor/local/share/groonga/doc/ja/source/functions/geo_distance.txt +51 -0
  295. data/vendor/local/share/groonga/doc/ja/source/functions/geo_in_circle.txt +54 -0
  296. data/vendor/local/share/groonga/doc/ja/source/functions/geo_in_rectangle.txt +55 -0
  297. data/vendor/local/share/groonga/doc/ja/source/functions/now.txt +34 -0
  298. data/vendor/local/share/groonga/doc/ja/source/functions/rand.txt +41 -0
  299. data/vendor/local/share/groonga/doc/ja/source/grnslap.txt +64 -0
  300. data/vendor/local/share/groonga/doc/ja/source/grntest.txt +259 -0
  301. data/vendor/local/share/groonga/doc/ja/source/http.txt +52 -0
  302. data/vendor/local/share/groonga/doc/ja/source/index.txt +21 -0
  303. data/vendor/local/share/groonga/doc/ja/source/install.txt +114 -0
  304. data/vendor/local/share/groonga/doc/ja/source/news.txt +199 -0
  305. data/vendor/local/share/groonga/doc/ja/source/process.txt +12 -0
  306. data/vendor/local/share/groonga/doc/ja/source/pseudo_column.txt +38 -0
  307. data/vendor/local/share/groonga/doc/ja/source/rdoc.py +762 -0
  308. data/vendor/local/share/groonga/doc/ja/source/reference.txt +14 -0
  309. data/vendor/local/share/groonga/doc/ja/source/tutorial.txt +10 -0
  310. data/vendor/local/share/groonga/doc/ja/source/tutorial/tutorial01.txt +293 -0
  311. data/vendor/local/share/groonga/doc/ja/source/tutorial/tutorial02.txt +100 -0
  312. data/vendor/local/share/groonga/doc/ja/source/tutorial/tutorial03.txt +72 -0
  313. data/vendor/local/share/groonga/doc/ja/source/tutorial/tutorial04.txt +111 -0
  314. data/vendor/local/share/groonga/doc/ja/source/tutorial/tutorial05.txt +65 -0
  315. data/vendor/local/share/groonga/doc/ja/source/tutorial/tutorial06.txt +91 -0
  316. data/vendor/local/share/groonga/doc/ja/source/tutorial/tutorial07.txt +92 -0
  317. data/vendor/local/share/groonga/doc/ja/source/tutorial/tutorial08.txt +53 -0
  318. data/vendor/local/share/groonga/doc/ja/source/tutorial/tutorial09.txt +9 -0
  319. data/vendor/local/share/groonga/doc/ja/source/tutorial/tutorial10.txt +486 -0
  320. data/vendor/local/share/groonga/doc/ja/source/type.txt +118 -0
  321. data/vendor/local/share/groonga/doc/ja/source/update_execution_example.py +113 -0
  322. data/vendor/local/share/groonga/examples/dictionary/edict/edict2grn.rb +46 -0
  323. data/vendor/local/share/groonga/examples/dictionary/edict/edict_import.sh +10 -0
  324. data/vendor/local/share/groonga/examples/dictionary/eijiro/eijiro2grn.rb +61 -0
  325. data/vendor/local/share/groonga/examples/dictionary/eijiro/eijiro_import.sh +10 -0
  326. data/vendor/local/share/groonga/examples/dictionary/gene95/gene2grn.rb +46 -0
  327. data/vendor/local/share/groonga/examples/dictionary/gene95/gene_import.sh +10 -0
  328. data/vendor/local/share/groonga/examples/dictionary/html/css/dictionary.css +3 -0
  329. data/vendor/local/share/groonga/examples/dictionary/html/index.html +26 -0
  330. data/vendor/local/share/groonga/examples/dictionary/html/js/dictionary.js +51 -0
  331. data/vendor/local/share/groonga/examples/dictionary/html/js/jquery-1.4.2.min.js +154 -0
  332. data/vendor/local/share/groonga/examples/dictionary/init_db.sh +10 -0
  333. data/vendor/local/share/groonga/examples/dictionary/jmdict/jmdict.rb +42 -0
  334. data/vendor/local/share/groonga/examples/dictionary/readme.txt +71 -0
  335. data/vendor/local/share/man/man1/groonga.1 +5498 -0
  336. metadata +360 -118
  337. data/pkg-config.rb +0 -333
  338. data/pkg/rroonga-0.9.5/NEWS.ja.rdoc +0 -156
  339. data/pkg/rroonga-0.9.5/NEWS.rdoc +0 -158
  340. data/pkg/rroonga-0.9.5/README.ja.rdoc +0 -65
  341. data/pkg/rroonga-0.9.5/README.rdoc +0 -66
  342. data/pkg/rroonga-0.9.5/text/TUTORIAL.ja.rdoc +0 -394
  343. data/pkg/rroonga-0.9.5/text/expression.rdoc +0 -285
  344. data/test-unit/Rakefile +0 -40
  345. data/test-unit/TODO +0 -5
  346. data/test-unit/bin/testrb +0 -5
  347. data/test-unit/html/classic.html +0 -15
  348. data/test-unit/html/index.html +0 -25
  349. data/test-unit/html/index.html.ja +0 -27
  350. data/test-unit/lib/test/unit.rb +0 -323
  351. data/test-unit/lib/test/unit/assertionfailederror.rb +0 -25
  352. data/test-unit/lib/test/unit/assertions.rb +0 -1230
  353. data/test-unit/lib/test/unit/attribute.rb +0 -125
  354. data/test-unit/lib/test/unit/autorunner.rb +0 -360
  355. data/test-unit/lib/test/unit/collector.rb +0 -36
  356. data/test-unit/lib/test/unit/collector/descendant.rb +0 -23
  357. data/test-unit/lib/test/unit/collector/dir.rb +0 -108
  358. data/test-unit/lib/test/unit/collector/load.rb +0 -144
  359. data/test-unit/lib/test/unit/collector/objectspace.rb +0 -34
  360. data/test-unit/lib/test/unit/color-scheme.rb +0 -102
  361. data/test-unit/lib/test/unit/color.rb +0 -96
  362. data/test-unit/lib/test/unit/diff.rb +0 -724
  363. data/test-unit/lib/test/unit/error.rb +0 -130
  364. data/test-unit/lib/test/unit/exceptionhandler.rb +0 -39
  365. data/test-unit/lib/test/unit/failure.rb +0 -136
  366. data/test-unit/lib/test/unit/fixture.rb +0 -176
  367. data/test-unit/lib/test/unit/notification.rb +0 -129
  368. data/test-unit/lib/test/unit/omission.rb +0 -191
  369. data/test-unit/lib/test/unit/pending.rb +0 -150
  370. data/test-unit/lib/test/unit/priority.rb +0 -180
  371. data/test-unit/lib/test/unit/runner/console.rb +0 -52
  372. data/test-unit/lib/test/unit/runner/emacs.rb +0 -8
  373. data/test-unit/lib/test/unit/runner/tap.rb +0 -8
  374. data/test-unit/lib/test/unit/testcase.rb +0 -476
  375. data/test-unit/lib/test/unit/testresult.rb +0 -89
  376. data/test-unit/lib/test/unit/testsuite.rb +0 -110
  377. data/test-unit/lib/test/unit/ui/console/outputlevel.rb +0 -14
  378. data/test-unit/lib/test/unit/ui/console/testrunner.rb +0 -466
  379. data/test-unit/lib/test/unit/ui/emacs/testrunner.rb +0 -63
  380. data/test-unit/lib/test/unit/ui/tap/testrunner.rb +0 -92
  381. data/test-unit/lib/test/unit/ui/testrunner.rb +0 -28
  382. data/test-unit/lib/test/unit/ui/testrunnermediator.rb +0 -77
  383. data/test-unit/lib/test/unit/ui/testrunnerutilities.rb +0 -41
  384. data/test-unit/lib/test/unit/util/backtracefilter.rb +0 -41
  385. data/test-unit/lib/test/unit/util/method-owner-finder.rb +0 -28
  386. data/test-unit/lib/test/unit/util/observable.rb +0 -90
  387. data/test-unit/lib/test/unit/util/procwrapper.rb +0 -48
  388. data/test-unit/lib/test/unit/version.rb +0 -7
  389. data/test-unit/sample/adder.rb +0 -13
  390. data/test-unit/sample/subtracter.rb +0 -12
  391. data/test-unit/sample/test_adder.rb +0 -20
  392. data/test-unit/sample/test_subtracter.rb +0 -20
  393. data/test-unit/sample/test_user.rb +0 -23
  394. data/test-unit/test/collector/test-descendant.rb +0 -133
  395. data/test-unit/test/collector/test-load.rb +0 -442
  396. data/test-unit/test/collector/test_dir.rb +0 -406
  397. data/test-unit/test/collector/test_objectspace.rb +0 -100
  398. data/test-unit/test/run-test.rb +0 -15
  399. data/test-unit/test/test-attribute.rb +0 -86
  400. data/test-unit/test/test-color-scheme.rb +0 -67
  401. data/test-unit/test/test-color.rb +0 -47
  402. data/test-unit/test/test-diff.rb +0 -518
  403. data/test-unit/test/test-emacs-runner.rb +0 -60
  404. data/test-unit/test/test-fixture.rb +0 -287
  405. data/test-unit/test/test-notification.rb +0 -33
  406. data/test-unit/test/test-omission.rb +0 -81
  407. data/test-unit/test/test-pending.rb +0 -70
  408. data/test-unit/test/test-priority.rb +0 -119
  409. data/test-unit/test/test-testcase.rb +0 -544
  410. data/test-unit/test/test_assertions.rb +0 -1151
  411. data/test-unit/test/test_error.rb +0 -26
  412. data/test-unit/test/test_failure.rb +0 -33
  413. data/test-unit/test/test_testresult.rb +0 -113
  414. data/test-unit/test/test_testsuite.rb +0 -129
  415. data/test-unit/test/testunit-test-util.rb +0 -14
  416. data/test-unit/test/ui/test_testrunmediator.rb +0 -20
  417. data/test-unit/test/util/test-method-owner-finder.rb +0 -38
  418. data/test-unit/test/util/test_backtracefilter.rb +0 -41
  419. data/test-unit/test/util/test_observable.rb +0 -102
  420. data/test-unit/test/util/test_procwrapper.rb +0 -36
  421. data/vendor/local/lib/groonga/modules/functions/cast.dll +0 -0
@@ -1,1151 +0,0 @@
1
- # Author:: Nathaniel Talbott.
2
- # Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved.
3
- # Copyright (c) 2009 Kouhei Sutou.
4
- # License:: Ruby license.
5
-
6
- require 'test/unit'
7
-
8
- module Test
9
- module Unit
10
- class TC_Assertions < TestCase
11
- backtrace_pre = "---Backtrace---"
12
- backtrace_post = "---------------"
13
- BACKTRACE_RE = /#{backtrace_pre}\n.+\n#{backtrace_post}/m
14
-
15
- def check(value, message="")
16
- add_assertion
17
- raise AssertionFailedError.new(message) unless value
18
- end
19
-
20
- def check_assertions(expect_fail, expected_message="",
21
- return_value_expected=false)
22
- @actual_assertion_count = 0
23
- failed = true
24
- actual_message = nil
25
- @catch_assertions = true
26
- return_value = nil
27
- begin
28
- return_value = yield
29
- failed = false
30
- rescue AssertionFailedError => error
31
- actual_message = error.message
32
- end
33
- @catch_assertions = false
34
-
35
- if expect_fail
36
- message = "Should have failed, but didn't"
37
- else
38
- message = "Should not have failed, but did with message\n" +
39
- "<#{actual_message}>"
40
- end
41
- check(expect_fail == failed, message)
42
-
43
- message = "Should have made one assertion but made\n" +
44
- "<#{@actual_assertion_count}>"
45
- check(1 == @actual_assertion_count, message)
46
-
47
- if expect_fail
48
- case expected_message
49
- when String
50
- check(actual_message == expected_message,
51
- "Should have the correct message.\n" +
52
- "<#{expected_message.inspect}> expected but was\n" +
53
- "<#{actual_message.inspect}>")
54
- when Regexp
55
- check(actual_message =~ expected_message,
56
- "The message should match correctly.\n" +
57
- "</#{expected_message.source}/> expected to match\n" +
58
- "<#{actual_message.inspect}>")
59
- else
60
- check(false,
61
- "Incorrect expected message type in assert_nothing_failed")
62
- end
63
- else
64
- if return_value_expected
65
- check(!return_value.nil?, "Should return a value")
66
- else
67
- check(return_value.nil?,
68
- "Should not return a value but returned <#{return_value}>")
69
- end
70
- end
71
-
72
- return_value
73
- end
74
-
75
- def check_nothing_fails(return_value_expected=false, &proc)
76
- check_assertions(false, "", return_value_expected, &proc)
77
- end
78
-
79
- def check_fails(expected_message="", &proc)
80
- check_assertions(true, expected_message, &proc)
81
- end
82
-
83
- def inspect_tag(tag)
84
- begin
85
- throw tag
86
- rescue NameError
87
- tag.to_s.inspect
88
- rescue ArgumentError
89
- tag.inspect
90
- end
91
- end
92
-
93
- def test_assert_block
94
- check_nothing_fails {
95
- assert_block {true}
96
- }
97
- check_nothing_fails {
98
- assert_block("successful assert_block") {true}
99
- }
100
- check_nothing_fails {
101
- assert_block("successful assert_block") {true}
102
- }
103
- check_fails("assert_block failed.") {
104
- assert_block {false}
105
- }
106
- check_fails("failed assert_block") {
107
- assert_block("failed assert_block") {false}
108
- }
109
- end
110
-
111
- def test_assert
112
- check_nothing_fails{assert("a")}
113
- check_nothing_fails{assert(true)}
114
- check_nothing_fails{assert(true, "successful assert")}
115
- check_fails("<nil> is not true."){assert(nil)}
116
- check_fails("<false> is not true."){assert(false)}
117
- check_fails("failed assert.\n<false> is not true."){assert(false, "failed assert")}
118
- end
119
-
120
- def test_assert_equal
121
- check_nothing_fails {
122
- assert_equal("string1", "string1")
123
- }
124
- check_nothing_fails {
125
- assert_equal("string1", "string1", "successful assert_equal")
126
- }
127
-
128
- message = <<-EOM.chomp
129
- <"string1"> expected but was
130
- <"string2">.
131
-
132
- diff:
133
- - string1
134
- ? ^
135
- + string2
136
- ? ^
137
- EOM
138
- check_fails(message) {
139
- assert_equal("string1", "string2")
140
- }
141
-
142
- message = <<-EOM.chomp
143
- failed assert_equal.
144
- <"string1"> expected but was
145
- <"string2">.
146
-
147
- diff:
148
- - string1
149
- ? ^
150
- + string2
151
- ? ^
152
- EOM
153
- check_fails(message) {
154
- assert_equal("string1", "string2", "failed assert_equal")
155
- }
156
-
157
- message = <<-EOM.chomp
158
- <"111111"> expected but was
159
- <111111>.
160
-
161
- diff:
162
- - "111111"
163
- ? - -
164
- + 111111
165
- EOM
166
- check_fails(message) do
167
- assert_equal("111111", 111111)
168
- end
169
- end
170
-
171
- def test_assert_equal_with_long_line
172
- expected = ["0123456789",
173
- "1123456789",
174
- "2123456789",
175
- "3123456789",
176
- "4123456789",
177
- "5123456789",
178
- "6123456789",
179
- "7123456789",
180
- "8123456789"].join
181
- actual = ["0000000000",
182
- "1123456789",
183
- "2123456789",
184
- "3123456789",
185
- "4123456789",
186
- "5123456789",
187
- "6123456789",
188
- "7123456789",
189
- "8123456789"].join
190
- message = <<-EOM.chomp
191
- <"#{expected}"> expected but was
192
- <"#{actual}">.
193
-
194
- diff:
195
- - #{expected}
196
- ? ^^^^^^^^^
197
- + #{actual}
198
- ? ^^^^^^^^^
199
-
200
- folded diff:
201
- - 012345678911234567892123456789312345678941234567895123456789612345678971234567
202
- ? ^^^^^^^^^
203
- + 000000000011234567892123456789312345678941234567895123456789612345678971234567
204
- ? ^^^^^^^^^
205
- 898123456789
206
- EOM
207
- check_fails(message) do
208
- assert_equal(expected, actual)
209
- end
210
- end
211
-
212
- def test_assert_equal_for_too_small_difference
213
- message = <<-EOM.chomp
214
- <1> expected but was
215
- <2>.
216
- EOM
217
- check_fails(message) do
218
- assert_equal(1, 2)
219
- end
220
- end
221
-
222
- def test_assert_equal_for_same_inspected_objects
223
- now = Time.now
224
- now_without_usec = Time.at(now.to_i)
225
- message = <<-EOM.chomp
226
- <#{now.inspect}> expected but was
227
- <#{now.inspect}>.
228
- EOM
229
- check_fails(message) do
230
- assert_equal(now, now_without_usec)
231
- end
232
- end
233
-
234
- def test_assert_equal_with_multi_lines_result
235
- message = <<-EOM.chomp
236
- <#{"a\nb".inspect}> expected but was
237
- <#{"x".inspect}>.
238
-
239
- diff:
240
- + x
241
- - a
242
- - b
243
- EOM
244
- check_fails(message) do
245
- assert_equal("a\nb", "x")
246
- end
247
- end
248
-
249
- def test_assert_equal_with_large_string
250
- message = <<-EOM.chomp
251
- <#{("a\n" + "x" * 997).inspect}> expected but was
252
- <#{"x".inspect}>.
253
-
254
- diff:
255
- + x
256
- - a
257
- - #{"x" * 997}
258
-
259
- folded diff:
260
- + x
261
- - a
262
- #{(["- " + ("x" * 78)] * 12).join("\n")}
263
- - #{"x" * 61}
264
- EOM
265
- check_fails(message) do
266
- assert_equal("a\n" + "x" * 997, "x")
267
- end
268
-
269
- message = <<-EOM.chomp
270
- <#{("a\n" + "x" * 998).inspect}> expected but was
271
- <#{"x".inspect}>.
272
- EOM
273
- check_fails(message) do
274
- assert_equal("a\n" + "x" * 998, "x")
275
- end
276
- end
277
-
278
- def test_assert_equal_with_max_diff_target_string_size
279
- key = "TEST_UNIT_MAX_DIFF_TARGET_STRING_SIZE"
280
- before_value = ENV[key]
281
- ENV[key] = "100"
282
- begin
283
- message = <<-EOM.chomp
284
- <#{("a\n" + "x" * 97).inspect}> expected but was
285
- <#{"x".inspect}>.
286
-
287
- diff:
288
- + x
289
- - a
290
- - #{"x" * 97}
291
-
292
- folded diff:
293
- + x
294
- - a
295
- #{(["- " + ("x" * 78)]).join("\n")}
296
- - #{"x" * 19}
297
- EOM
298
- check_fails(message) do
299
- assert_equal("a\n" + "x" * 97, "x")
300
- end
301
-
302
- message = <<-EOM.chomp
303
- <#{("a\n" + "x" * 98).inspect}> expected but was
304
- <#{"x".inspect}>.
305
- EOM
306
- check_fails(message) do
307
- assert_equal("a\n" + "x" * 98, "x")
308
- end
309
- ensure
310
- ENV[key] = before_value
311
- end
312
- end
313
-
314
- def test_assert_raise_success
315
- return_value = nil
316
- check_nothing_fails(true) do
317
- return_value = assert_raise(RuntimeError) do
318
- raise "Error"
319
- end
320
- end
321
- check(return_value.kind_of?(Exception),
322
- "Should have returned the exception " +
323
- "from a successful assert_raise")
324
- check(return_value.message == "Error",
325
- "Should have returned the correct exception " +
326
- "from a successful assert_raise")
327
-
328
- check_nothing_fails(true) do
329
- assert_raise(ArgumentError, "successful assert_raise") do
330
- raise ArgumentError.new("Error")
331
- end
332
- end
333
-
334
- check_nothing_fails(true) do
335
- assert_raise(RuntimeError) do
336
- raise "Error"
337
- end
338
- end
339
-
340
- check_nothing_fails(true) do
341
- assert_raise(RuntimeError, "successful assert_raise") do
342
- raise "Error"
343
- end
344
- end
345
-
346
- check_nothing_fails(true) do
347
- assert_raise do
348
- raise Exception, "Any exception"
349
- end
350
- end
351
- end
352
-
353
- def test_assert_raise_fail
354
- check_fails("<RuntimeError> exception expected but none was thrown.") do
355
- assert_raise(RuntimeError) do
356
- 1 + 1
357
- end
358
- end
359
-
360
- message = <<-EOM
361
- failed assert_raise.
362
- <ArgumentError> exception expected but was
363
- Class: <RuntimeError>
364
- Message: <"Error">
365
- EOM
366
- check_fails(/\A#{message}#{BACKTRACE_RE}\Z/m) do
367
- assert_raise(ArgumentError, "failed assert_raise") do
368
- raise "Error"
369
- end
370
- end
371
-
372
- message = <<-EOM
373
- Should expect a class of exception, Object.
374
- <false> is not true.
375
- EOM
376
- check_fails(message.chomp) do
377
- assert_nothing_raised(Object) do
378
- 1 + 1
379
- end
380
- end
381
- end
382
-
383
- def test_assert_raise_module
384
- exceptions = [ArgumentError, TypeError]
385
- modules = [Math, Comparable]
386
- rescues = exceptions + modules
387
-
388
- exceptions.each do |exc|
389
- return_value = nil
390
- check_nothing_fails(true) do
391
- return_value = assert_raise(*rescues) do
392
- raise exc, "Error"
393
- end
394
- end
395
- check(return_value.instance_of?(exc),
396
- "Should have returned #{exc} but was #{return_value.class}")
397
- check(return_value.message == "Error",
398
- "Should have returned the correct exception " +
399
- "from a successful assert_raise")
400
- end
401
-
402
- modules.each do |mod|
403
- return_value = nil
404
- check_nothing_fails(true) do
405
- return_value = assert_raise(*rescues) do
406
- raise Exception.new("Error").extend(mod)
407
- end
408
- end
409
- check(mod === return_value,
410
- "Should have returned #{mod}")
411
- check(return_value.message == "Error",
412
- "Should have returned the correct exception " +
413
- "from a successful assert_raise")
414
- end
415
-
416
- check_fails("<[ArgumentError, TypeError, Math, Comparable]> exception " +
417
- "expected but none was thrown.") do
418
- assert_raise(*rescues) do
419
- 1 + 1
420
- end
421
- end
422
-
423
- message = <<-EOM
424
- failed assert_raise.
425
- <[ArgumentError, TypeError]> exception expected but was
426
- Class: <RuntimeError>
427
- Message: <"Error">
428
- EOM
429
- message = Regexp.escape(message)
430
- check_fails(/\A#{message}#{BACKTRACE_RE}\z/m) do
431
- assert_raise(ArgumentError, TypeError, "failed assert_raise") do
432
- raise "Error"
433
- end
434
- end
435
- end
436
-
437
- def test_assert_raise_instance
438
- return_value = nil
439
- check_nothing_fails(true) do
440
- return_value = assert_raise(RuntimeError.new("Error")) do
441
- raise "Error"
442
- end
443
- end
444
- check(return_value.kind_of?(Exception),
445
- "Should have returned the exception " +
446
- "from a successful assert_raise")
447
- check(return_value.message == "Error",
448
- "Should have returned the correct exception " +
449
- "from a successful assert_raise")
450
-
451
- message = <<-EOM
452
- <RuntimeError("XXX")> exception expected but was
453
- Class: <RuntimeError>
454
- Message: <"Error">
455
- EOM
456
- message = Regexp.escape(message)
457
- check_fails(/\A#{message}#{BACKTRACE_RE}\z/) do
458
- return_value = assert_raise(RuntimeError.new("XXX")) do
459
- raise "Error"
460
- end
461
- end
462
-
463
- different_error_class = Class.new(StandardError)
464
- message = <<-EOM
465
- <\#<Class:[xa-f\\d]+>\\("Error"\\)> exception expected but was
466
- Class: <RuntimeError>
467
- Message: <"Error">
468
- EOM
469
- check_fails(/\A#{message}#{BACKTRACE_RE}\z/) do
470
- assert_raise(different_error_class.new("Error")) do
471
- raise "Error"
472
- end
473
- end
474
-
475
- different_error = different_error_class.new("Error")
476
- def different_error.inspect
477
- "DifferentError: \"Error\""
478
- end
479
- message = <<-EOM
480
- <\DifferentError: \\"Error\\"> exception expected but was
481
- Class: <RuntimeError>
482
- Message: <"Error">
483
- EOM
484
- check_fails(/\A#{message}#{BACKTRACE_RE}\z/) do
485
- assert_raise(different_error) do
486
- raise "Error"
487
- end
488
- end
489
-
490
- check_nothing_fails(true) do
491
- assert_raise(different_error_class.new("Error"),
492
- RuntimeError.new("Error"),
493
- RuntimeError.new("XXX")) do
494
- raise "Error"
495
- end
496
- end
497
- end
498
-
499
- def test_assert_instance_of
500
- check_nothing_fails {
501
- assert_instance_of(String, "string")
502
- }
503
- check_nothing_fails {
504
- assert_instance_of(String, "string", "successful assert_instance_of")
505
- }
506
- check_nothing_fails {
507
- assert_instance_of(String, "string", "successful assert_instance_of")
508
- }
509
- check_fails(%Q{<"string"> expected to be an instance of\n<Hash> but was\n<String>.}) {
510
- assert_instance_of(Hash, "string")
511
- }
512
- check_fails(%Q{failed assert_instance_of.\n<"string"> expected to be an instance of\n<Hash> but was\n<String>.}) {
513
- assert_instance_of(Hash, "string", "failed assert_instance_of")
514
- }
515
-
516
- check_nothing_fails do
517
- assert_instance_of([Fixnum, NilClass], 100)
518
- end
519
- check_fails(%Q{<"string"> expected to be an instance of\n[<Fixnum>, <NilClass>] but was\n<String>.}) do
520
- assert_instance_of([Fixnum, NilClass], "string")
521
- end
522
- check_fails(%Q{<100> expected to be an instance of\n[<Numeric>, <NilClass>] but was\n<Fixnum>.}) do
523
- assert_instance_of([Numeric, NilClass], 100)
524
- end
525
- end
526
-
527
- def test_assert_nil
528
- check_nothing_fails {
529
- assert_nil(nil)
530
- }
531
- check_nothing_fails {
532
- assert_nil(nil, "successful assert_nil")
533
- }
534
- check_nothing_fails {
535
- assert_nil(nil, "successful assert_nil")
536
- }
537
- check_fails(%Q{<"string"> expected to be nil.}) {
538
- assert_nil("string")
539
- }
540
- check_fails(%Q{failed assert_nil.\n<"string"> expected to be nil.}) {
541
- assert_nil("string", "failed assert_nil")
542
- }
543
- end
544
-
545
- def test_assert_not_nil
546
- check_nothing_fails{assert_not_nil(false)}
547
- check_nothing_fails{assert_not_nil(false, "message")}
548
- check_fails("<nil> expected to not be nil."){assert_not_nil(nil)}
549
- check_fails("message.\n<nil> expected to not be nil.") {assert_not_nil(nil, "message")}
550
- end
551
-
552
- def test_assert_kind_of
553
- check_nothing_fails {
554
- assert_kind_of(Module, Array)
555
- }
556
- check_nothing_fails {
557
- assert_kind_of(Object, "string", "successful assert_kind_of")
558
- }
559
- check_nothing_fails {
560
- assert_kind_of(Object, "string", "successful assert_kind_of")
561
- }
562
- check_nothing_fails {
563
- assert_kind_of(Comparable, 1)
564
- }
565
- check_fails(%Q{<"string"> expected to be kind_of?\n<Class> but was\n<String>.}) {
566
- assert_kind_of(Class, "string")
567
- }
568
- check_fails(%Q{failed assert_kind_of.\n<"string"> expected to be kind_of?\n<Class> but was\n<String>.}) {
569
- assert_kind_of(Class, "string", "failed assert_kind_of")
570
- }
571
-
572
- check_nothing_fails do
573
- assert_kind_of([Fixnum, NilClass], 100)
574
- end
575
- check_fails(%Q{<"string"> expected to be kind_of?\n[<Fixnum>, <NilClass>] but was\n<String>.}) do
576
- assert_kind_of([Fixnum, NilClass], "string")
577
- end
578
- end
579
-
580
- def test_assert_match
581
- check_nothing_fails {
582
- assert_match(/strin./, "string")
583
- }
584
- check_nothing_fails {
585
- assert_match("strin", "string")
586
- }
587
- check_nothing_fails {
588
- assert_match(/strin./, "string", "successful assert_match")
589
- }
590
- check_nothing_fails {
591
- assert_match(/strin./, "string", "successful assert_match")
592
- }
593
- check_fails(%Q{<"string"> expected to be =~\n</slin./>.}) {
594
- assert_match(/slin./, "string")
595
- }
596
- check_fails(%Q{<"string"> expected to be =~\n</strin\\./>.}) {
597
- assert_match("strin.", "string")
598
- }
599
- check_fails(%Q{failed assert_match.\n<"string"> expected to be =~\n</slin./>.}) {
600
- assert_match(/slin./, "string", "failed assert_match")
601
- }
602
- end
603
-
604
- def test_assert_same
605
- thing = "thing"
606
- check_nothing_fails {
607
- assert_same(thing, thing)
608
- }
609
- check_nothing_fails {
610
- assert_same(thing, thing, "successful assert_same")
611
- }
612
- check_nothing_fails {
613
- assert_same(thing, thing, "successful assert_same")
614
- }
615
- thing2 = "thing"
616
- check_fails(%Q{<"thing">\nwith id <#{thing.__id__}> expected to be equal? to\n<"thing">\nwith id <#{thing2.__id__}>.}) {
617
- assert_same(thing, thing2)
618
- }
619
- check_fails(%Q{failed assert_same.\n<"thing">\nwith id <#{thing.__id__}> expected to be equal? to\n<"thing">\nwith id <#{thing2.__id__}>.}) {
620
- assert_same(thing, thing2, "failed assert_same")
621
- }
622
- end
623
-
624
- def test_assert_nothing_raised
625
- check_nothing_fails {
626
- assert_nothing_raised {
627
- 1 + 1
628
- }
629
- }
630
- check_nothing_fails {
631
- assert_nothing_raised("successful assert_nothing_raised") {
632
- 1 + 1
633
- }
634
- }
635
- check_nothing_fails {
636
- assert_nothing_raised("successful assert_nothing_raised") {
637
- 1 + 1
638
- }
639
- }
640
- check_nothing_fails {
641
- begin
642
- assert_nothing_raised(RuntimeError, StandardError, Comparable, "successful assert_nothing_raised") {
643
- raise ZeroDivisionError.new("ArgumentError")
644
- }
645
- rescue ZeroDivisionError
646
- end
647
- }
648
- check_fails("Should expect a class of exception, Object.\n<false> is not true.") {
649
- assert_nothing_raised(Object) {
650
- 1 + 1
651
- }
652
- }
653
- check_fails(%r{\AException raised:\nClass: <RuntimeError>\nMessage: <"Error">\n---Backtrace---\n.+\n---------------\Z}m) {
654
- assert_nothing_raised {
655
- raise "Error"
656
- }
657
- }
658
- check_fails(%r{\Afailed assert_nothing_raised\.\nException raised:\nClass: <RuntimeError>\nMessage: <"Error">\n---Backtrace---\n.+\n---------------\Z}m) {
659
- assert_nothing_raised("failed assert_nothing_raised") {
660
- raise "Error"
661
- }
662
- }
663
- check_fails(%r{\AException raised:\nClass: <RuntimeError>\nMessage: <"Error">\n---Backtrace---\n.+\n---------------\Z}m) {
664
- assert_nothing_raised(StandardError, RuntimeError) {
665
- raise "Error"
666
- }
667
- }
668
- check_fails("Failure.") do
669
- assert_nothing_raised do
670
- flunk("Failure")
671
- end
672
- end
673
- end
674
-
675
- def test_flunk
676
- check_fails("Flunked.") {
677
- flunk
678
- }
679
- check_fails("flunk message.") {
680
- flunk("flunk message")
681
- }
682
- end
683
-
684
- def test_assert_not_same
685
- thing = "thing"
686
- thing2 = "thing"
687
- check_nothing_fails {
688
- assert_not_same(thing, thing2)
689
- }
690
- check_nothing_fails {
691
- assert_not_same(thing, thing2, "message")
692
- }
693
- check_fails(%Q{<"thing">\nwith id <#{thing.__id__}> expected to not be equal? to\n<"thing">\nwith id <#{thing.__id__}>.}) {
694
- assert_not_same(thing, thing)
695
- }
696
- check_fails(%Q{message.\n<"thing">\nwith id <#{thing.__id__}> expected to not be equal? to\n<"thing">\nwith id <#{thing.__id__}>.}) {
697
- assert_not_same(thing, thing, "message")
698
- }
699
- end
700
-
701
- def test_assert_not_equal
702
- check_nothing_fails {
703
- assert_not_equal("string1", "string2")
704
- }
705
- check_nothing_fails {
706
- assert_not_equal("string1", "string2", "message")
707
- }
708
- check_fails(%Q{<"string"> expected to be != to\n<"string">.}) {
709
- assert_not_equal("string", "string")
710
- }
711
- check_fails(%Q{message.\n<"string"> expected to be != to\n<"string">.}) {
712
- assert_not_equal("string", "string", "message")
713
- }
714
- end
715
-
716
- def test_assert_no_match
717
- check_nothing_fails{assert_no_match(/sling/, "string")}
718
- check_nothing_fails{assert_no_match(/sling/, "string", "message")}
719
- check_fails(%Q{The first argument to assert_no_match should be a Regexp.\n<"asdf"> expected to be an instance of\n<Regexp> but was\n<String>.}) do
720
- assert_no_match("asdf", "asdf")
721
- end
722
- check_fails(%Q{</string/> expected to not match\n<"string">.}) do
723
- assert_no_match(/string/, "string")
724
- end
725
- check_fails(%Q{message.\n</string/> expected to not match\n<"string">.}) do
726
- assert_no_match(/string/, "string", "message")
727
- end
728
- end
729
-
730
- def test_assert_throw
731
- check_nothing_fails do
732
- assert_throw(:thing, "message") do
733
- throw :thing
734
- end
735
- end
736
-
737
- tag = :thing2
738
- check_fails("message.\n" +
739
- "<:thing> expected to be thrown but\n" +
740
- "<#{inspect_tag(tag)}> was thrown.") do
741
- assert_throw(:thing, "message") do
742
- throw :thing2
743
- end
744
- end
745
- check_fails("message.\n" +
746
- "<:thing> should have been thrown.") do
747
- assert_throw(:thing, "message") do
748
- 1 + 1
749
- end
750
- end
751
- end
752
-
753
- def test_assert_nothing_thrown
754
- check_nothing_fails do
755
- assert_nothing_thrown("message") do
756
- 1 + 1
757
- end
758
- end
759
-
760
- tag = :thing
761
- inspected = inspect_tag(tag)
762
- check_fails("message.\n" +
763
- "<#{inspected}> was thrown when nothing was expected.") do
764
- assert_nothing_thrown("message") do
765
- throw tag
766
- end
767
- end
768
- end
769
-
770
- def test_assert_operator
771
- check_nothing_fails {
772
- assert_operator("thing", :==, "thing", "message")
773
- }
774
- check_fails(%Q{<0.15>\ngiven as the operator for #assert_operator must be a Symbol or #respond_to?(:to_str).}) do
775
- assert_operator("thing", 0.15, "thing")
776
- end
777
- check_fails(%Q{message.\n<"thing1"> expected to be\n==\n<"thing2">.}) {
778
- assert_operator("thing1", :==, "thing2", "message")
779
- }
780
- end
781
-
782
- def test_assert_respond_to
783
- check_nothing_fails {
784
- assert_respond_to("thing", :to_s, "message")
785
- }
786
- check_nothing_fails {
787
- assert_respond_to("thing", "to_s", "message")
788
- }
789
- check_fails("<0.15>.kind_of?(Symbol) or\n" +
790
- "<0.15>.respond_to?(:to_str) expected") {
791
- assert_respond_to("thing", 0.15)
792
- }
793
- check_fails("message.\n" +
794
- "<:symbol>.respond_to?(:non_existent) expected\n" +
795
- "(Class: <Symbol>)") {
796
- assert_respond_to(:symbol, :non_existent, "message")
797
- }
798
- end
799
-
800
- def test_assert_in_delta
801
- check_nothing_fails {
802
- assert_in_delta(1.4, 1.4, 0)
803
- }
804
- check_nothing_fails {
805
- assert_in_delta(0.5, 0.4, 0.1, "message")
806
- }
807
- check_nothing_fails {
808
- float_thing = Object.new
809
- def float_thing.to_f
810
- 0.2
811
- end
812
- assert_in_delta(0.1, float_thing, 0.1)
813
- }
814
- check_fails("message.\n<0.5> and\n<0.4> expected to be within\n<0.05> of each other.") {
815
- assert_in_delta(0.5, 0.4, 0.05, "message")
816
- }
817
- object = Object.new
818
- check_fails("The arguments must respond to to_f; " +
819
- "the first float did not.\n" +
820
- "<#{object.inspect}>.respond_to?(:to_f) expected\n" +
821
- "(Class: <Object>)") {
822
- assert_in_delta(object, 0.4, 0.1)
823
- }
824
- check_fails("The delta should not be negative.\n" +
825
- "<-0.1> expected to be\n>=\n<0.0>.") {
826
- assert_in_delta(0.5, 0.4, -0.1, "message")
827
- }
828
- end
829
-
830
- def test_assert_send
831
- object = Object.new
832
- class << object
833
- private
834
- def return_argument(argument, bogus)
835
- return argument
836
- end
837
- end
838
- check_nothing_fails {
839
- assert_send([object, :return_argument, true, "bogus"], "message")
840
- }
841
- check_fails(%r{\Amessage\.\n<.+> expected to respond to\n<return_argument\(\[false, "bogus"\]\)> with a true value.\Z}) {
842
- assert_send([object, :return_argument, false, "bogus"], "message")
843
- }
844
- end
845
-
846
- def test_condition_invariant
847
- object = Object.new
848
- def object.inspect
849
- @changed = true
850
- end
851
- def object.==(other)
852
- @changed ||= false
853
- return (!@changed)
854
- end
855
- check_nothing_fails do
856
- assert_equal(object, object, "message")
857
- end
858
- end
859
-
860
- def test_assert_boolean
861
- check_nothing_fails do
862
- assert_boolean(true)
863
- end
864
- check_nothing_fails do
865
- assert_boolean(false)
866
- end
867
-
868
- check_fails("<true> or <false> expected but was\n<1>") do
869
- assert_boolean(1)
870
- end
871
-
872
- check_fails("<true> or <false> expected but was\n<nil>") do
873
- assert_boolean(nil)
874
- end
875
-
876
- check_fails("message.\n<true> or <false> expected but was\n<\"XXX\">") do
877
- assert_boolean("XXX", "message")
878
- end
879
- end
880
-
881
- def test_assert_true
882
- check_nothing_fails do
883
- assert_true(true)
884
- end
885
-
886
- check_fails("<true> expected but was\n<false>") do
887
- assert_true(false)
888
- end
889
-
890
- check_fails("<true> expected but was\n<1>") do
891
- assert_true(1)
892
- end
893
-
894
- check_fails("message.\n<true> expected but was\n<nil>") do
895
- assert_true(nil, "message")
896
- end
897
- end
898
-
899
- def test_assert_false
900
- check_nothing_fails do
901
- assert_false(false)
902
- end
903
-
904
- check_fails("<false> expected but was\n<true>") do
905
- assert_false(true)
906
- end
907
-
908
- check_fails("<false> expected but was\n<nil>") do
909
- assert_false(nil)
910
- end
911
-
912
- check_fails("message.\n<false> expected but was\n<:false>") do
913
- assert_false(:false, "message")
914
- end
915
- end
916
-
917
- def test_assert_compare
918
- check_nothing_fails do
919
- assert_compare(1.4, "<", 10.0)
920
- end
921
-
922
- check_nothing_fails do
923
- assert_compare(2, "<=", 2)
924
- end
925
-
926
- check_nothing_fails do
927
- assert_compare(14, ">=", 10.0)
928
- end
929
-
930
- check_nothing_fails do
931
- assert_compare(14, ">", 13.9)
932
- end
933
-
934
- expected_message = <<-EOM
935
- <15> < <10> should be true
936
- <15> expected less than
937
- <10>.
938
- EOM
939
- check_fails(expected_message.chomp) do
940
- assert_compare(15, "<", 10)
941
- end
942
-
943
- expected_message = <<-EOM
944
- <15> <= <10> should be true
945
- <15> expected less than or equal to
946
- <10>.
947
- EOM
948
- check_fails(expected_message.chomp) do
949
- assert_compare(15, "<=", 10)
950
- end
951
-
952
- expected_message = <<-EOM
953
- <10> > <15> should be true
954
- <10> expected greater than
955
- <15>.
956
- EOM
957
- check_fails(expected_message.chomp) do
958
- assert_compare(10, ">", 15)
959
- end
960
-
961
- expected_message = <<-EOM
962
- <10> >= <15> should be true
963
- <10> expected greater than or equal to
964
- <15>.
965
- EOM
966
- check_fails(expected_message.chomp) do
967
- assert_compare(10, ">=", 15)
968
- end
969
- end
970
-
971
- def test_assert_fail_assertion
972
- check_nothing_fails do
973
- assert_fail_assertion do
974
- flunk
975
- end
976
- end
977
-
978
- check_fails("Failed assertion was expected.") do
979
- assert_fail_assertion do
980
- end
981
- end
982
- end
983
-
984
- def test_assert_raise_message
985
- check_nothing_fails do
986
- assert_raise_message("Raise!") do
987
- raise "Raise!"
988
- end
989
- end
990
-
991
- check_nothing_fails do
992
- assert_raise_message("Raise!") do
993
- raise Exception, "Raise!"
994
- end
995
- end
996
-
997
- check_nothing_fails do
998
- assert_raise_message(/raise/i) do
999
- raise "Raise!"
1000
- end
1001
- end
1002
-
1003
- expected_message = <<-EOM
1004
- <"Expected message"> exception message expected but was
1005
- <"Actual message">.
1006
- EOM
1007
- check_fails(expected_message.chomp) do
1008
- assert_raise_message("Expected message") do
1009
- raise "Actual message"
1010
- end
1011
- end
1012
-
1013
- expected_message = <<-EOM
1014
- <"Expected message"> exception message expected but none was thrown.
1015
- EOM
1016
- check_fails(expected_message.chomp) do
1017
- assert_raise_message("Expected message") do
1018
- end
1019
- end
1020
- end
1021
-
1022
- def test_assert_raise_kind_of
1023
- check_nothing_fails(true) do
1024
- assert_raise_kind_of(SystemCallError) do
1025
- raise Errno::EACCES
1026
- end
1027
- end
1028
-
1029
- expected_message = <<-EOM
1030
- <SystemCallError> family exception expected but was
1031
- Class: <RuntimeError>
1032
- Message: <"XXX">
1033
- ---Backtrace---
1034
- EOM
1035
- check_fails(/\A#{Regexp.escape(expected_message)}(?m).+\z/) do
1036
- assert_raise_kind_of(SystemCallError) do
1037
- raise RuntimeError, "XXX"
1038
- end
1039
- end
1040
- end
1041
-
1042
- def test_assert_const_defined
1043
- check_nothing_fails do
1044
- assert_const_defined(Test, :Unit)
1045
- end
1046
-
1047
- check_nothing_fails do
1048
- assert_const_defined(Test, "Unit")
1049
- end
1050
-
1051
- check_fails("<Test>.const_defined?(<:Nonexistence>) expected.") do
1052
- assert_const_defined(Test, :Nonexistence)
1053
- end
1054
- end
1055
-
1056
- def test_assert_not_const_defined
1057
- check_nothing_fails do
1058
- assert_not_const_defined(Test, :Nonexistence)
1059
- end
1060
-
1061
- check_fails("!<Test>.const_defined?(<:Unit>) expected.") do
1062
- assert_not_const_defined(Test, :Unit)
1063
- end
1064
-
1065
- check_fails("!<Test>.const_defined?(<\"Unit\">) expected.") do
1066
- assert_not_const_defined(Test, "Unit")
1067
- end
1068
- end
1069
-
1070
- def test_assert_predicate
1071
- check_nothing_fails do
1072
- assert_predicate([], :empty?)
1073
- end
1074
-
1075
- check_fails("<[1]>.empty? is true value expected but was\n<false>") do
1076
- assert_predicate([1], :empty?)
1077
- end
1078
-
1079
- check_fails("<[1]>.respond_to?(:nonexistent?) expected\n" +
1080
- "(Class: <Array>)") do
1081
- assert_predicate([1], :nonexistent?)
1082
- end
1083
- end
1084
-
1085
- def test_assert_not_predicate
1086
- check_nothing_fails do
1087
- assert_not_predicate([1], :empty?)
1088
- end
1089
-
1090
- check_fails("<[]>.empty? is false value expected but was\n<true>") do
1091
- assert_not_predicate([], :empty?)
1092
- end
1093
-
1094
- check_fails("<[]>.respond_to?(:nonexistent?) expected\n" +
1095
- "(Class: <Array>)") do
1096
- assert_not_predicate([], :nonexistent?)
1097
- end
1098
- end
1099
-
1100
- def test_assert_alias_method
1101
- object = Object.new
1102
- class << object
1103
- def original_method
1104
- end
1105
- alias_method :alias_method, :original_method
1106
-
1107
- def other
1108
- end
1109
- end
1110
-
1111
- check_nothing_fails do
1112
- assert_alias_method(object, :alias_method, :original_method)
1113
- end
1114
-
1115
- check_nothing_fails do
1116
- assert_alias_method(object, :original_method, :alias_method)
1117
- end
1118
-
1119
- check_fails("<#{object.method(:other).inspect}> is alias of\n" +
1120
- "<#{object.method(:original_method).inspect}> expected") do
1121
- assert_alias_method(object, :other, :original_method)
1122
- end
1123
-
1124
- check_fails("<#{object.inspect}>.nonexistent doesn't exist\n" +
1125
- "(Class: <Object>)") do
1126
- assert_alias_method(object, :nonexistent, :original_method)
1127
- end
1128
-
1129
- check_fails("<#{object.inspect}>.nonexistent doesn't exist\n" +
1130
- "(Class: <Object>)") do
1131
- assert_alias_method(object, :alias_method, :nonexistent)
1132
- end
1133
- end
1134
-
1135
- private
1136
- def add_failure(message, location=caller, options=nil)
1137
- unless @catch_assertions
1138
- super
1139
- end
1140
- end
1141
-
1142
- def add_assertion
1143
- if @catch_assertions
1144
- @actual_assertion_count += 1
1145
- else
1146
- super
1147
- end
1148
- end
1149
- end
1150
- end
1151
- end