glib2 0.90.8-x86-mingw32 → 0.90.9-x86-mingw32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (620) hide show
  1. data/ChangeLog +46 -0
  2. data/Rakefile +1 -0
  3. data/ext/glib2/rbglib.h +1 -1
  4. data/ext/glib2/rbglib_iochannel.c +15 -6
  5. data/ext/glib2/rbgobj_signal.c +1 -1
  6. data/ext/glib2/rbgobject.h +1 -1
  7. data/lib/1.8/glib2.so +0 -0
  8. data/lib/1.9/glib2.so +0 -0
  9. data/lib/gnome2-raketask.rb +3 -2
  10. data/lib/mkmf-gnome2.rb +47 -23
  11. data/test/glib-test-init.rb +1 -3
  12. data/vendor/local/bin/glib-genmarshal.exe +0 -0
  13. data/vendor/local/bin/glib-gettextize +2 -2
  14. data/vendor/local/bin/glib-mkenums +3 -2
  15. data/vendor/local/bin/gobject-query.exe +0 -0
  16. data/vendor/local/bin/gspawn-win32-helper-console.exe +0 -0
  17. data/vendor/local/bin/gspawn-win32-helper.exe +0 -0
  18. data/vendor/local/bin/libgio-2.0-0.dll +0 -0
  19. data/vendor/local/bin/libglib-2.0-0.dll +0 -0
  20. data/vendor/local/bin/libgmodule-2.0-0.dll +0 -0
  21. data/vendor/local/bin/libgobject-2.0-0.dll +0 -0
  22. data/vendor/local/bin/libgthread-2.0-0.dll +0 -0
  23. data/vendor/local/include/glib-2.0/gio/gaction.h +91 -0
  24. data/vendor/local/include/glib-2.0/gio/gactiongroup.h +151 -0
  25. data/vendor/local/include/glib-2.0/gio/gappinfo.h +11 -1
  26. data/vendor/local/include/glib-2.0/gio/gapplication.h +165 -0
  27. data/vendor/local/include/glib-2.0/gio/gapplicationcommandline.h +118 -0
  28. data/vendor/local/include/glib-2.0/gio/gasyncresult.h +2 -2
  29. data/vendor/local/include/glib-2.0/gio/gcancellable.h +2 -0
  30. data/vendor/local/include/glib-2.0/gio/gemblemedicon.h +15 -0
  31. data/vendor/local/include/glib-2.0/gio/gfileenumerator.h +2 -2
  32. data/vendor/local/include/glib-2.0/gio/gfileinputstream.h +1 -1
  33. data/vendor/local/include/glib-2.0/gio/gfileiostream.h +1 -1
  34. data/vendor/local/include/glib-2.0/gio/gfilemonitor.h +1 -1
  35. data/vendor/local/include/glib-2.0/gio/gfileoutputstream.h +1 -1
  36. data/vendor/local/include/glib-2.0/gio/gio.h +14 -0
  37. data/vendor/local/include/glib-2.0/gio/gioenums.h +158 -2
  38. data/vendor/local/include/glib-2.0/gio/gioenumtypes.h +12 -0
  39. data/vendor/local/include/glib-2.0/gio/giomodule.h +1 -1
  40. data/vendor/local/include/glib-2.0/gio/giostream.h +11 -0
  41. data/vendor/local/include/glib-2.0/gio/giotypes.h +48 -0
  42. data/vendor/local/include/glib-2.0/gio/goutputstream.h +1 -1
  43. data/vendor/local/include/glib-2.0/gio/gpollableinputstream.h +101 -0
  44. data/vendor/local/include/glib-2.0/gio/gpollableoutputstream.h +98 -0
  45. data/vendor/local/include/glib-2.0/gio/gsettings.h +9 -2
  46. data/vendor/local/include/glib-2.0/gio/gsettingsbackend.h +6 -0
  47. data/vendor/local/include/glib-2.0/gio/gsimpleaction.h +95 -0
  48. data/vendor/local/include/glib-2.0/gio/gsimpleactiongroup.h +87 -0
  49. data/vendor/local/include/glib-2.0/gio/gsimpleasyncresult.h +11 -1
  50. data/vendor/local/include/glib-2.0/gio/gsocketclient.h +7 -0
  51. data/vendor/local/include/glib-2.0/gio/gtcpwrapperconnection.h +68 -0
  52. data/vendor/local/include/glib-2.0/gio/gtlsbackend.h +92 -0
  53. data/vendor/local/include/glib-2.0/gio/gtlscertificate.h +83 -0
  54. data/vendor/local/include/glib-2.0/gio/gtlsclientconnection.h +72 -0
  55. data/vendor/local/include/glib-2.0/gio/gtlsconnection.h +136 -0
  56. data/vendor/local/include/glib-2.0/gio/gtlsserverconnection.h +61 -0
  57. data/vendor/local/include/glib-2.0/glib/glist.h +2 -0
  58. data/vendor/local/include/glib-2.0/glib/gmain.h +27 -6
  59. data/vendor/local/include/glib-2.0/glib/gmarkup.h +80 -5
  60. data/vendor/local/include/glib-2.0/glib/grand.h +1 -1
  61. data/vendor/local/include/glib-2.0/glib/gsequence.h +8 -0
  62. data/vendor/local/include/glib-2.0/glib/gslist.h +2 -0
  63. data/vendor/local/include/glib-2.0/glib/gtimezone.h +37 -0
  64. data/vendor/local/include/glib-2.0/glib/gtypes.h +1 -0
  65. data/vendor/local/include/glib-2.0/glib/gunicode.h +22 -16
  66. data/vendor/local/include/glib-2.0/glib/gutils.h +5 -0
  67. data/vendor/local/include/glib-2.0/glib/gvariant.h +35 -11
  68. data/vendor/local/include/glib-2.0/gobject/gobject.h +15 -0
  69. data/vendor/local/include/glib-2.0/gobject/gsignal.h +5 -0
  70. data/vendor/local/include/glib-2.0/gobject/gsourceclosure.h +4 -2
  71. data/vendor/local/include/glib-2.0/gobject/gtypemodule.h +1 -1
  72. data/vendor/local/lib/gio-2.0.def +142 -0
  73. data/vendor/local/lib/gio-2.0.lib +0 -0
  74. data/vendor/local/lib/glib-2.0.def +21 -0
  75. data/vendor/local/lib/glib-2.0.lib +0 -0
  76. data/vendor/local/lib/glib-2.0/include/glibconfig.h +1 -1
  77. data/vendor/local/lib/gmodule-2.0.lib +0 -0
  78. data/vendor/local/lib/gobject-2.0.def +3 -0
  79. data/vendor/local/lib/gobject-2.0.lib +0 -0
  80. data/vendor/local/lib/gthread-2.0.lib +0 -0
  81. data/vendor/local/lib/libgio-2.0.dll.a +0 -0
  82. data/vendor/local/lib/libglib-2.0.dll.a +0 -0
  83. data/vendor/local/lib/libgmodule-2.0.dll.a +0 -0
  84. data/vendor/local/lib/libgobject-2.0.dll.a +0 -0
  85. data/vendor/local/lib/libgthread-2.0.dll.a +0 -0
  86. data/vendor/local/lib/pkgconfig/gio-2.0.pc +2 -2
  87. data/vendor/local/lib/pkgconfig/gio-windows-2.0.pc +1 -1
  88. data/vendor/local/lib/pkgconfig/glib-2.0.pc +1 -1
  89. data/vendor/local/lib/pkgconfig/gmodule-2.0.pc +1 -1
  90. data/vendor/local/lib/pkgconfig/gmodule-no-export-2.0.pc +1 -1
  91. data/vendor/local/lib/pkgconfig/gobject-2.0.pc +1 -1
  92. data/vendor/local/lib/pkgconfig/gthread-2.0.pc +1 -1
  93. data/vendor/local/manifest/{glib-dev_2.26.1-1_win32.mft → glib-dev_2.28.1-1_win32.mft} +55 -19
  94. data/vendor/local/manifest/{glib_2.26.1-1_win32.mft → glib_2.28.1-1_win32.mft} +3 -2
  95. data/vendor/local/share/aclocal/glib-2.0.m4 +4 -4
  96. data/vendor/local/share/doc/{glib-2.26.1 → glib-2.28.1}/COPYING +0 -0
  97. data/vendor/local/share/doc/{glib-dev-2.26.1 → glib-dev-2.28.1}/COPYING +0 -0
  98. data/vendor/local/share/glib-2.0/gettext/mkinstalldirs +72 -21
  99. data/vendor/local/share/glib-2.0/schemas/gschema.dtd +21 -8
  100. data/vendor/local/share/gtk-doc/html/gio/GAction.html +469 -0
  101. data/vendor/local/share/gtk-doc/html/gio/GActionGroup.html +754 -0
  102. data/vendor/local/share/gtk-doc/html/gio/GAppInfo.html +296 -249
  103. data/vendor/local/share/gtk-doc/html/gio/GApplication.html +1458 -0
  104. data/vendor/local/share/gtk-doc/html/gio/GApplicationCommandLine.html +815 -0
  105. data/vendor/local/share/gtk-doc/html/gio/GAsyncInitable.html +61 -97
  106. data/vendor/local/share/gtk-doc/html/gio/GAsyncResult.html +31 -38
  107. data/vendor/local/share/gtk-doc/html/gio/GBufferedInputStream.html +52 -68
  108. data/vendor/local/share/gtk-doc/html/gio/GBufferedOutputStream.html +38 -50
  109. data/vendor/local/share/gtk-doc/html/gio/GCancellable.html +120 -77
  110. data/vendor/local/share/gtk-doc/html/gio/GCharsetConverter.html +26 -34
  111. data/vendor/local/share/gtk-doc/html/gio/GConverter.html +49 -51
  112. data/vendor/local/share/gtk-doc/html/gio/GCredentials.html +39 -62
  113. data/vendor/local/share/gtk-doc/html/gio/GDBusAuthObserver.html +26 -35
  114. data/vendor/local/share/gtk-doc/html/gio/GDBusConnection.html +415 -650
  115. data/vendor/local/share/gtk-doc/html/gio/{gio-GDBusError.html → GDBusError.html} +118 -147
  116. data/vendor/local/share/gtk-doc/html/gio/GDBusMessage.html +204 -347
  117. data/vendor/local/share/gtk-doc/html/gio/GDBusMethodInvocation.html +66 -111
  118. data/vendor/local/share/gtk-doc/html/gio/GDBusProxy.html +210 -309
  119. data/vendor/local/share/gtk-doc/html/gio/GDBusServer.html +68 -87
  120. data/vendor/local/share/gtk-doc/html/gio/GDataInputStream.html +190 -232
  121. data/vendor/local/share/gtk-doc/html/gio/GDataOutputStream.html +89 -118
  122. data/vendor/local/share/gtk-doc/html/gio/GDrive.html +196 -270
  123. data/vendor/local/share/gtk-doc/html/gio/GEmblem.html +40 -46
  124. data/vendor/local/share/gtk-doc/html/gio/GEmblemedIcon.html +56 -24
  125. data/vendor/local/share/gtk-doc/html/gio/GFile.html +1090 -1443
  126. data/vendor/local/share/gtk-doc/html/gio/GFileDescriptorBased.html +13 -16
  127. data/vendor/local/share/gtk-doc/html/gio/GFileEnumerator.html +66 -86
  128. data/vendor/local/share/gtk-doc/html/gio/GFileIOStream.html +31 -45
  129. data/vendor/local/share/gtk-doc/html/gio/GFileIcon.html +19 -21
  130. data/vendor/local/share/gtk-doc/html/gio/GFileInfo.html +466 -602
  131. data/vendor/local/share/gtk-doc/html/gio/GFileInputStream.html +32 -40
  132. data/vendor/local/share/gtk-doc/html/gio/GFileMonitor.html +60 -59
  133. data/vendor/local/share/gtk-doc/html/gio/GFileOutputStream.html +32 -47
  134. data/vendor/local/share/gtk-doc/html/gio/GFilenameCompleter.html +37 -45
  135. data/vendor/local/share/gtk-doc/html/gio/GFilterInputStream.html +22 -26
  136. data/vendor/local/share/gtk-doc/html/gio/GFilterOutputStream.html +22 -26
  137. data/vendor/local/share/gtk-doc/html/gio/GIOModule.html +32 -38
  138. data/vendor/local/share/gtk-doc/html/gio/GIOStream.html +184 -52
  139. data/vendor/local/share/gtk-doc/html/gio/GIcon.html +45 -54
  140. data/vendor/local/share/gtk-doc/html/gio/GInetAddress.html +96 -125
  141. data/vendor/local/share/gtk-doc/html/gio/GInetSocketAddress.html +21 -25
  142. data/vendor/local/share/gtk-doc/html/gio/GInitable.html +49 -71
  143. data/vendor/local/share/gtk-doc/html/gio/GInputStream.html +102 -134
  144. data/vendor/local/share/gtk-doc/html/gio/GLoadableIcon.html +43 -54
  145. data/vendor/local/share/gtk-doc/html/gio/GMemoryInputStream.html +21 -24
  146. data/vendor/local/share/gtk-doc/html/gio/GMemoryOutputStream.html +34 -41
  147. data/vendor/local/share/gtk-doc/html/gio/GMount.html +223 -294
  148. data/vendor/local/share/gtk-doc/html/gio/GMountOperation.html +127 -153
  149. data/vendor/local/share/gtk-doc/html/gio/GNetworkAddress.html +35 -46
  150. data/vendor/local/share/gtk-doc/html/gio/GNetworkService.html +37 -46
  151. data/vendor/local/share/gtk-doc/html/gio/GOutputStream.html +138 -174
  152. data/vendor/local/share/gtk-doc/html/gio/GPermission.html +46 -68
  153. data/vendor/local/share/gtk-doc/html/gio/GPollableInputStream.html +398 -0
  154. data/vendor/local/share/gtk-doc/html/gio/GPollableOutputStream.html +340 -0
  155. data/vendor/local/share/gtk-doc/html/gio/GProxy.html +89 -32
  156. data/vendor/local/share/gtk-doc/html/gio/GProxyAddress.html +42 -56
  157. data/vendor/local/share/gtk-doc/html/gio/GProxyResolver.html +59 -34
  158. data/vendor/local/share/gtk-doc/html/gio/GResolver.html +82 -95
  159. data/vendor/local/share/gtk-doc/html/gio/GSeekable.html +58 -72
  160. data/vendor/local/share/gtk-doc/html/gio/GSettings.html +597 -357
  161. data/vendor/local/share/gtk-doc/html/gio/GSettingsBackend.html +125 -75
  162. data/vendor/local/share/gtk-doc/html/gio/GSimpleAction.html +339 -0
  163. data/vendor/local/share/gtk-doc/html/gio/GSimpleActionGroup.html +200 -0
  164. data/vendor/local/share/gtk-doc/html/gio/GSimpleAsyncResult.html +232 -167
  165. data/vendor/local/share/gtk-doc/html/gio/GSimplePermission.html +15 -16
  166. data/vendor/local/share/gtk-doc/html/gio/GSocket.html +291 -406
  167. data/vendor/local/share/gtk-doc/html/gio/GSocketAddress.html +39 -45
  168. data/vendor/local/share/gtk-doc/html/gio/GSocketClient.html +301 -223
  169. data/vendor/local/share/gtk-doc/html/gio/GSocketConnectable.html +41 -44
  170. data/vendor/local/share/gtk-doc/html/gio/GSocketConnection.html +41 -49
  171. data/vendor/local/share/gtk-doc/html/gio/GSocketControlMessage.html +22 -32
  172. data/vendor/local/share/gtk-doc/html/gio/GSocketListener.html +88 -107
  173. data/vendor/local/share/gtk-doc/html/gio/GSocketService.html +26 -32
  174. data/vendor/local/share/gtk-doc/html/gio/{gio-GSrvTarget.html → GSrvTarget.html} +74 -77
  175. data/vendor/local/share/gtk-doc/html/gio/GTcpConnection.html +21 -22
  176. data/vendor/local/share/gtk-doc/html/gio/GTcpWrapperConnection.html +156 -0
  177. data/vendor/local/share/gtk-doc/html/gio/GThemedIcon.html +40 -46
  178. data/vendor/local/share/gtk-doc/html/gio/GThreadedSocketService.html +29 -35
  179. data/vendor/local/share/gtk-doc/html/gio/GTlsBackend.html +260 -0
  180. data/vendor/local/share/gtk-doc/html/gio/GTlsCertificate.html +396 -0
  181. data/vendor/local/share/gtk-doc/html/gio/GTlsClientConnection.html +428 -0
  182. data/vendor/local/share/gtk-doc/html/gio/GTlsConnection.html +869 -0
  183. data/vendor/local/share/gtk-doc/html/gio/GTlsServerConnection.html +158 -0
  184. data/vendor/local/share/gtk-doc/html/gio/GUnixConnection.html +32 -41
  185. data/vendor/local/share/gtk-doc/html/gio/GUnixCredentialsMessage.html +28 -34
  186. data/vendor/local/share/gtk-doc/html/gio/GUnixFDList.html +44 -54
  187. data/vendor/local/share/gtk-doc/html/gio/GUnixFDMessage.html +36 -41
  188. data/vendor/local/share/gtk-doc/html/gio/GUnixInputStream.html +35 -32
  189. data/vendor/local/share/gtk-doc/html/gio/GUnixOutputStream.html +35 -32
  190. data/vendor/local/share/gtk-doc/html/gio/GUnixSocketAddress.html +59 -67
  191. data/vendor/local/share/gtk-doc/html/gio/GVfs.html +49 -57
  192. data/vendor/local/share/gtk-doc/html/gio/GVolume.html +142 -187
  193. data/vendor/local/share/gtk-doc/html/gio/GVolumeMonitor.html +99 -132
  194. data/vendor/local/share/gtk-doc/html/gio/GZlibCompressor.html +33 -32
  195. data/vendor/local/share/gtk-doc/html/gio/GZlibDecompressor.html +22 -24
  196. data/vendor/local/share/gtk-doc/html/gio/annotation-glossary.html +43 -13
  197. data/vendor/local/share/gtk-doc/html/gio/api-index-2-18.html +5 -5
  198. data/vendor/local/share/gtk-doc/html/gio/api-index-2-20.html +10 -3
  199. data/vendor/local/share/gtk-doc/html/gio/api-index-2-22.html +20 -20
  200. data/vendor/local/share/gtk-doc/html/gio/api-index-2-24.html +8 -8
  201. data/vendor/local/share/gtk-doc/html/gio/api-index-2-26.html +36 -28
  202. data/vendor/local/share/gtk-doc/html/gio/api-index-2-28.html +744 -0
  203. data/vendor/local/share/gtk-doc/html/gio/api-index-deprecated.html +3 -3
  204. data/vendor/local/share/gtk-doc/html/gio/api-index-full.html +915 -107
  205. data/vendor/local/share/gtk-doc/html/gio/application.html +50 -0
  206. data/vendor/local/share/gtk-doc/html/gio/async.html +5 -5
  207. data/vendor/local/share/gtk-doc/html/gio/ch01.html +4 -4
  208. data/vendor/local/share/gtk-doc/html/gio/ch02.html +5 -5
  209. data/vendor/local/share/gtk-doc/html/gio/ch03.html +23 -24
  210. data/vendor/local/share/gtk-doc/html/gio/ch26.html +54 -36
  211. data/vendor/local/share/gtk-doc/html/gio/ch27.html +188 -41
  212. data/vendor/local/share/gtk-doc/html/gio/ch27s02.html +19 -108
  213. data/vendor/local/share/gtk-doc/html/gio/ch27s03.html +16 -179
  214. data/vendor/local/share/gtk-doc/html/gio/ch28.html +57 -0
  215. data/vendor/local/share/gtk-doc/html/gio/{ch26s02.html → ch28s02.html} +10 -10
  216. data/vendor/local/share/gtk-doc/html/gio/{ch26s03.html → ch28s03.html} +10 -10
  217. data/vendor/local/share/gtk-doc/html/gio/{ch26s04.html → ch28s04.html} +10 -10
  218. data/vendor/local/share/gtk-doc/html/gio/{ch26s05.html → ch28s05.html} +10 -10
  219. data/vendor/local/share/gtk-doc/html/gio/{ch26s06.html → ch28s06.html} +17 -15
  220. data/vendor/local/share/gtk-doc/html/gio/{ch26s07.html → ch28s07.html} +10 -10
  221. data/vendor/local/share/gtk-doc/html/gio/ch29.html +70 -0
  222. data/vendor/local/share/gtk-doc/html/gio/ch29s02.html +130 -0
  223. data/vendor/local/share/gtk-doc/html/gio/ch29s03.html +202 -0
  224. data/vendor/local/share/gtk-doc/html/gio/{ch27s04.html → ch29s04.html} +11 -11
  225. data/vendor/local/share/gtk-doc/html/gio/{ch27s05.html → ch29s05.html} +12 -12
  226. data/vendor/local/share/gtk-doc/html/gio/{ch27s06.html → ch29s06.html} +10 -10
  227. data/vendor/local/share/gtk-doc/html/gio/conversion.html +3 -3
  228. data/vendor/local/share/gtk-doc/html/gio/extending-gio.html +27 -14
  229. data/vendor/local/share/gtk-doc/html/gio/extending.html +5 -5
  230. data/vendor/local/share/gtk-doc/html/gio/failable_initialization.html +3 -3
  231. data/vendor/local/share/gtk-doc/html/gio/file_mon.html +3 -3
  232. data/vendor/local/share/gtk-doc/html/gio/file_ops.html +3 -3
  233. data/vendor/local/share/gtk-doc/html/gio/gdbus-convenience.html +3 -3
  234. data/vendor/local/share/gtk-doc/html/gio/gdbus-lowlevel.html +6 -6
  235. data/vendor/local/share/gtk-doc/html/gio/gdbus.html +18 -18
  236. data/vendor/local/share/gtk-doc/html/gio/gio-D-Bus-Addresses.html +39 -62
  237. data/vendor/local/share/gtk-doc/html/gio/gio-D-Bus-Introspection-Data.html +141 -248
  238. data/vendor/local/share/gtk-doc/html/gio/gio-D-Bus-Utilities.html +28 -40
  239. data/vendor/local/share/gtk-doc/html/gio/gio-Desktop-file-based-GAppInfo.html +29 -112
  240. data/vendor/local/share/gtk-doc/html/gio/gio-Extension-Points.html +45 -57
  241. data/vendor/local/share/gtk-doc/html/gio/gio-GContentType.html +58 -68
  242. data/vendor/local/share/gtk-doc/html/gio/gio-GConverterInputstream.html +16 -18
  243. data/vendor/local/share/gtk-doc/html/gio/gio-GConverterOutputstream.html +18 -20
  244. data/vendor/local/share/gtk-doc/html/gio/gio-GFileAttribute.html +82 -76
  245. data/vendor/local/share/gtk-doc/html/gio/gio-GIOError.html +34 -28
  246. data/vendor/local/share/gtk-doc/html/gio/gio-GIOScheduler.html +25 -33
  247. data/vendor/local/share/gtk-doc/html/gio/gio-Owning-Bus-Names.html +87 -113
  248. data/vendor/local/share/gtk-doc/html/gio/gio-TLS-Overview.html +287 -0
  249. data/vendor/local/share/gtk-doc/html/gio/gio-Unix-Mounts.html +119 -151
  250. data/vendor/local/share/gtk-doc/html/gio/gio-Watching-Bus-Names.html +62 -95
  251. data/vendor/local/share/gtk-doc/html/gio/gio-hierarchy.html +66 -6
  252. data/vendor/local/share/gtk-doc/html/gio/gio-querymodules.html +8 -8
  253. data/vendor/local/share/gtk-doc/html/gio/gio.devhelp +312 -91
  254. data/vendor/local/share/gtk-doc/html/gio/gio.devhelp2 +386 -133
  255. data/vendor/local/share/gtk-doc/html/gio/glib-compile-schemas.html +12 -12
  256. data/vendor/local/share/gtk-doc/html/gio/gsettings-tool.html +162 -0
  257. data/vendor/local/share/gtk-doc/html/gio/highlevel-socket.html +7 -4
  258. data/vendor/local/share/gtk-doc/html/gio/icons.html +3 -3
  259. data/vendor/local/share/gtk-doc/html/gio/index.html +88 -36
  260. data/vendor/local/share/gtk-doc/html/gio/index.sgml +506 -95
  261. data/vendor/local/share/gtk-doc/html/gio/migrating.html +23 -23
  262. data/vendor/local/share/gtk-doc/html/gio/networking.html +3 -3
  263. data/vendor/local/share/gtk-doc/html/gio/permissions.html +5 -5
  264. data/vendor/local/share/gtk-doc/html/gio/pt01.html +4 -4
  265. data/vendor/local/share/gtk-doc/html/gio/pt02.html +68 -17
  266. data/vendor/local/share/gtk-doc/html/gio/resolver.html +6 -6
  267. data/vendor/local/share/gtk-doc/html/gio/settings.html +7 -7
  268. data/vendor/local/share/gtk-doc/html/gio/streaming.html +9 -3
  269. data/vendor/local/share/gtk-doc/html/gio/style.css +2 -1
  270. data/vendor/local/share/gtk-doc/html/gio/tls.html +50 -0
  271. data/vendor/local/share/gtk-doc/html/gio/tools.html +4 -4
  272. data/vendor/local/share/gtk-doc/html/gio/types.html +6 -6
  273. data/vendor/local/share/gtk-doc/html/gio/utils.html +7 -7
  274. data/vendor/local/share/gtk-doc/html/gio/volume_mon.html +4 -4
  275. data/vendor/local/share/gtk-doc/html/glib/annotation-glossary.html +8 -11
  276. data/vendor/local/share/gtk-doc/html/glib/api-index-2-10.html +3 -3
  277. data/vendor/local/share/gtk-doc/html/glib/api-index-2-12.html +3 -3
  278. data/vendor/local/share/gtk-doc/html/glib/api-index-2-14.html +3 -3
  279. data/vendor/local/share/gtk-doc/html/glib/api-index-2-16.html +3 -3
  280. data/vendor/local/share/gtk-doc/html/glib/api-index-2-18.html +4 -4
  281. data/vendor/local/share/gtk-doc/html/glib/api-index-2-2.html +3 -3
  282. data/vendor/local/share/gtk-doc/html/glib/api-index-2-20.html +3 -3
  283. data/vendor/local/share/gtk-doc/html/glib/api-index-2-22.html +3 -3
  284. data/vendor/local/share/gtk-doc/html/glib/api-index-2-24.html +3 -3
  285. data/vendor/local/share/gtk-doc/html/glib/api-index-2-26.html +25 -5
  286. data/vendor/local/share/gtk-doc/html/glib/api-index-2-28.html +112 -0
  287. data/vendor/local/share/gtk-doc/html/glib/api-index-2-4.html +6 -6
  288. data/vendor/local/share/gtk-doc/html/glib/api-index-2-6.html +15 -11
  289. data/vendor/local/share/gtk-doc/html/glib/api-index-2-8.html +5 -5
  290. data/vendor/local/share/gtk-doc/html/glib/api-index-deprecated.html +9 -5
  291. data/vendor/local/share/gtk-doc/html/glib/api-index-full.html +201 -89
  292. data/vendor/local/share/gtk-doc/html/glib/glib-Arrays.html +144 -210
  293. data/vendor/local/share/gtk-doc/html/glib/glib-Asynchronous-Queues.html +97 -136
  294. data/vendor/local/share/gtk-doc/html/glib/glib-Atomic-Operations.html +40 -58
  295. data/vendor/local/share/gtk-doc/html/glib/glib-Automatic-String-Completion.html +99 -128
  296. data/vendor/local/share/gtk-doc/html/glib/glib-Balanced-Binary-Trees.html +104 -155
  297. data/vendor/local/share/gtk-doc/html/glib/glib-Base64-Encoding.html +42 -71
  298. data/vendor/local/share/gtk-doc/html/glib/glib-Basic-Types.html +40 -43
  299. data/vendor/local/share/gtk-doc/html/glib/glib-Bookmark-file-parser.html +224 -314
  300. data/vendor/local/share/gtk-doc/html/glib/glib-Byte-Arrays.html +104 -142
  301. data/vendor/local/share/gtk-doc/html/glib/glib-Byte-Order-Macros.html +193 -308
  302. data/vendor/local/share/gtk-doc/html/glib/glib-Caches.html +51 -76
  303. data/vendor/local/share/gtk-doc/html/glib/glib-Character-Set-Conversion.html +170 -307
  304. data/vendor/local/share/gtk-doc/html/glib/glib-Commandline-option-parser.html +154 -198
  305. data/vendor/local/share/gtk-doc/html/glib/glib-Data-Checksums.html +45 -67
  306. data/vendor/local/share/gtk-doc/html/glib/glib-Datasets.html +60 -97
  307. data/vendor/local/share/gtk-doc/html/glib/glib-Date-and-Time-Functions.html +390 -428
  308. data/vendor/local/share/gtk-doc/html/glib/glib-Double-ended-Queues.html +265 -333
  309. data/vendor/local/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html +306 -330
  310. data/vendor/local/share/gtk-doc/html/glib/glib-Dynamic-Loading-of-Modules.html +60 -99
  311. data/vendor/local/share/gtk-doc/html/glib/glib-Error-Reporting.html +122 -152
  312. data/vendor/local/share/gtk-doc/html/glib/glib-File-Utilities.html +241 -571
  313. data/vendor/local/share/gtk-doc/html/glib/glib-GDateTime.html +233 -330
  314. data/vendor/local/share/gtk-doc/html/glib/glib-GTimeZone.html +310 -34
  315. data/vendor/local/share/gtk-doc/html/glib/glib-GVariant.html +739 -590
  316. data/vendor/local/share/gtk-doc/html/glib/glib-GVariantType.html +136 -143
  317. data/vendor/local/share/gtk-doc/html/glib/glib-Glob-style-pattern-matching.html +22 -29
  318. data/vendor/local/share/gtk-doc/html/glib/glib-Hash-Tables.html +210 -297
  319. data/vendor/local/share/gtk-doc/html/glib/glib-Hook-Functions.html +294 -355
  320. data/vendor/local/share/gtk-doc/html/glib/glib-Hostname-Utilities.html +27 -39
  321. data/vendor/local/share/gtk-doc/html/glib/glib-I18N.html +102 -95
  322. data/vendor/local/share/gtk-doc/html/glib/glib-IO-Channels.html +402 -486
  323. data/vendor/local/share/gtk-doc/html/glib/glib-Key-value-file-parser.html +308 -442
  324. data/vendor/local/share/gtk-doc/html/glib/glib-Keyed-Data-Lists.html +75 -116
  325. data/vendor/local/share/gtk-doc/html/glib/glib-Lexical-Scanner.html +229 -297
  326. data/vendor/local/share/gtk-doc/html/glib/glib-Limits-of-Basic-Types.html +36 -36
  327. data/vendor/local/share/gtk-doc/html/glib/glib-Memory-Allocation.html +121 -187
  328. data/vendor/local/share/gtk-doc/html/glib/glib-Memory-Allocators.html +23 -27
  329. data/vendor/local/share/gtk-doc/html/glib/glib-Memory-Chunks.html +80 -107
  330. data/vendor/local/share/gtk-doc/html/glib/glib-Memory-Slices.html +46 -69
  331. data/vendor/local/share/gtk-doc/html/glib/glib-Message-Logging.html +63 -99
  332. data/vendor/local/share/gtk-doc/html/glib/glib-Miscellaneous-Macros.html +121 -115
  333. data/vendor/local/share/gtk-doc/html/glib/glib-Miscellaneous-Utility-Functions.html +304 -327
  334. data/vendor/local/share/gtk-doc/html/glib/glib-N-ary-Trees.html +307 -366
  335. data/vendor/local/share/gtk-doc/html/glib/glib-Numerical-Definitions.html +39 -20
  336. data/vendor/local/share/gtk-doc/html/glib/glib-Perl-compatible-regular-expressions.html +230 -343
  337. data/vendor/local/share/gtk-doc/html/glib/glib-Pointer-Arrays.html +121 -167
  338. data/vendor/local/share/gtk-doc/html/glib/glib-Quarks.html +31 -45
  339. data/vendor/local/share/gtk-doc/html/glib/glib-Random-Numbers.html +73 -113
  340. data/vendor/local/share/gtk-doc/html/glib/glib-Relations-and-Tuples.html +75 -106
  341. data/vendor/local/share/gtk-doc/html/glib/glib-Sequences.html +229 -184
  342. data/vendor/local/share/gtk-doc/html/glib/glib-Shell-related-Utilities.html +31 -40
  343. data/vendor/local/share/gtk-doc/html/glib/glib-Simple-XML-Subset-Parser.html +247 -286
  344. data/vendor/local/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html +281 -283
  345. data/vendor/local/share/gtk-doc/html/glib/glib-Spawning-Processes.html +83 -337
  346. data/vendor/local/share/gtk-doc/html/glib/glib-Standard-Macros.html +65 -80
  347. data/vendor/local/share/gtk-doc/html/glib/glib-String-Chunks.html +36 -42
  348. data/vendor/local/share/gtk-doc/html/glib/glib-String-Utility-Functions.html +408 -621
  349. data/vendor/local/share/gtk-doc/html/glib/glib-Strings.html +253 -322
  350. data/vendor/local/share/gtk-doc/html/glib/glib-Testing.html +161 -252
  351. data/vendor/local/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html +677 -590
  352. data/vendor/local/share/gtk-doc/html/glib/glib-Thread-Pools.html +88 -111
  353. data/vendor/local/share/gtk-doc/html/glib/glib-Threads.html +378 -475
  354. data/vendor/local/share/gtk-doc/html/glib/glib-Timers.html +27 -48
  355. data/vendor/local/share/gtk-doc/html/glib/glib-Trash-Stacks.html +39 -48
  356. data/vendor/local/share/gtk-doc/html/glib/glib-Type-Conversion-Macros.html +19 -25
  357. data/vendor/local/share/gtk-doc/html/glib/glib-URI-Functions.html +57 -93
  358. data/vendor/local/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html +413 -534
  359. data/vendor/local/share/gtk-doc/html/glib/glib-Version-Information.html +117 -21
  360. data/vendor/local/share/gtk-doc/html/glib/glib-Warnings-and-Assertions.html +38 -53
  361. data/vendor/local/share/gtk-doc/html/glib/glib-Windows-Compatibility-Functions.html +60 -114
  362. data/vendor/local/share/gtk-doc/html/glib/glib-building.html +38 -39
  363. data/vendor/local/share/gtk-doc/html/glib/glib-changes.html +7 -13
  364. data/vendor/local/share/gtk-doc/html/glib/glib-compiling.html +5 -5
  365. data/vendor/local/share/gtk-doc/html/glib/glib-core.html +3 -3
  366. data/vendor/local/share/gtk-doc/html/glib/glib-cross-compiling.html +19 -19
  367. data/vendor/local/share/gtk-doc/html/glib/glib-data-types.html +6 -3
  368. data/vendor/local/share/gtk-doc/html/glib/glib-fundamentals.html +3 -3
  369. data/vendor/local/share/gtk-doc/html/glib/glib-gettextize.html +10 -10
  370. data/vendor/local/share/gtk-doc/html/glib/glib-regex-syntax.html +82 -82
  371. data/vendor/local/share/gtk-doc/html/glib/glib-resources.html +9 -9
  372. data/vendor/local/share/gtk-doc/html/glib/glib-running.html +26 -26
  373. data/vendor/local/share/gtk-doc/html/glib/glib-utilities.html +3 -3
  374. data/vendor/local/share/gtk-doc/html/glib/glib.devhelp +144 -103
  375. data/vendor/local/share/gtk-doc/html/glib/glib.devhelp2 +170 -105
  376. data/vendor/local/share/gtk-doc/html/glib/glib.html +3 -3
  377. data/vendor/local/share/gtk-doc/html/glib/gtester-report.html +10 -10
  378. data/vendor/local/share/gtk-doc/html/glib/gtester.html +10 -10
  379. data/vendor/local/share/gtk-doc/html/glib/gvariant-format-strings.html +48 -43
  380. data/vendor/local/share/gtk-doc/html/glib/gvariant-text.html +660 -0
  381. data/vendor/local/share/gtk-doc/html/glib/index.html +8 -4
  382. data/vendor/local/share/gtk-doc/html/glib/index.sgml +67 -2
  383. data/vendor/local/share/gtk-doc/html/glib/style.css +2 -1
  384. data/vendor/local/share/gtk-doc/html/glib/tools.html +5 -5
  385. data/vendor/local/share/gtk-doc/html/gobject/GBinding.html +72 -90
  386. data/vendor/local/share/gtk-doc/html/gobject/GTypeModule.html +79 -108
  387. data/vendor/local/share/gtk-doc/html/gobject/GTypePlugin.html +67 -85
  388. data/vendor/local/share/gtk-doc/html/gobject/annotation-glossary.html +63 -9
  389. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-10.html +4 -4
  390. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-12.html +3 -3
  391. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-14.html +3 -3
  392. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-18.html +3 -3
  393. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-2.html +3 -3
  394. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-22.html +3 -3
  395. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-24.html +3 -3
  396. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-26.html +6 -6
  397. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-28.html +47 -0
  398. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-4.html +4 -4
  399. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-6.html +3 -3
  400. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-8.html +3 -3
  401. data/vendor/local/share/gtk-doc/html/gobject/api-index-deprecated.html +3 -3
  402. data/vendor/local/share/gtk-doc/html/gobject/api-index-full.html +65 -53
  403. data/vendor/local/share/gtk-doc/html/gobject/ch01s02.html +7 -7
  404. data/vendor/local/share/gtk-doc/html/gobject/ch06s03.html +4 -4
  405. data/vendor/local/share/gtk-doc/html/gobject/chapter-gobject.html +8 -11
  406. data/vendor/local/share/gtk-doc/html/gobject/chapter-gtype.html +19 -19
  407. data/vendor/local/share/gtk-doc/html/gobject/chapter-intro.html +6 -6
  408. data/vendor/local/share/gtk-doc/html/gobject/chapter-signal.html +18 -18
  409. data/vendor/local/share/gtk-doc/html/gobject/glib-genmarshal.html +22 -22
  410. data/vendor/local/share/gtk-doc/html/gobject/glib-mkenums.html +16 -16
  411. data/vendor/local/share/gtk-doc/html/gobject/gobject-Boxed-Types.html +40 -54
  412. data/vendor/local/share/gtk-doc/html/gobject/gobject-Closures.html +405 -512
  413. data/vendor/local/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html +170 -213
  414. data/vendor/local/share/gtk-doc/html/gobject/gobject-GParamSpec.html +242 -292
  415. data/vendor/local/share/gtk-doc/html/gobject/gobject-Generic-values.html +91 -127
  416. data/vendor/local/share/gtk-doc/html/gobject/gobject-Signals.html +407 -573
  417. data/vendor/local/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html +951 -1268
  418. data/vendor/local/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html +383 -441
  419. data/vendor/local/share/gtk-doc/html/gobject/gobject-Type-Information.html +648 -829
  420. data/vendor/local/share/gtk-doc/html/gobject/gobject-Value-arrays.html +82 -95
  421. data/vendor/local/share/gtk-doc/html/gobject/gobject-Varargs-Value-Collection.html +31 -49
  422. data/vendor/local/share/gtk-doc/html/gobject/gobject-memory.html +8 -8
  423. data/vendor/local/share/gtk-doc/html/gobject/gobject-properties.html +15 -14
  424. data/vendor/local/share/gtk-doc/html/gobject/gobject-query.html +10 -10
  425. data/vendor/local/share/gtk-doc/html/gobject/gobject.devhelp +62 -58
  426. data/vendor/local/share/gtk-doc/html/gobject/gobject.devhelp2 +62 -58
  427. data/vendor/local/share/gtk-doc/html/gobject/gtype-conventions.html +6 -6
  428. data/vendor/local/share/gtk-doc/html/gobject/gtype-instantiable-classed.html +11 -11
  429. data/vendor/local/share/gtk-doc/html/gobject/gtype-non-instantiable-classed.html +14 -14
  430. data/vendor/local/share/gtk-doc/html/gobject/gtype-non-instantiable.html +6 -6
  431. data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-chainup.html +5 -5
  432. data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-code.html +3 -3
  433. data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-construction.html +7 -7
  434. data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-destruction.html +3 -3
  435. data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-methods.html +9 -9
  436. data/vendor/local/share/gtk-doc/html/gobject/howto-gobject.html +10 -10
  437. data/vendor/local/share/gtk-doc/html/gobject/howto-interface-implement.html +4 -4
  438. data/vendor/local/share/gtk-doc/html/gobject/howto-interface-properties.html +7 -7
  439. data/vendor/local/share/gtk-doc/html/gobject/howto-interface.html +6 -6
  440. data/vendor/local/share/gtk-doc/html/gobject/howto-signals.html +6 -6
  441. data/vendor/local/share/gtk-doc/html/gobject/index.html +11 -10
  442. data/vendor/local/share/gtk-doc/html/gobject/index.sgml +13 -1
  443. data/vendor/local/share/gtk-doc/html/gobject/pr01.html +4 -4
  444. data/vendor/local/share/gtk-doc/html/gobject/pt01.html +7 -7
  445. data/vendor/local/share/gtk-doc/html/gobject/pt02.html +8 -8
  446. data/vendor/local/share/gtk-doc/html/gobject/pt03.html +5 -5
  447. data/vendor/local/share/gtk-doc/html/gobject/rn01.html +4 -4
  448. data/vendor/local/share/gtk-doc/html/gobject/rn02.html +4 -4
  449. data/vendor/local/share/gtk-doc/html/gobject/signal.html +13 -13
  450. data/vendor/local/share/gtk-doc/html/gobject/style.css +2 -1
  451. data/vendor/local/share/gtk-doc/html/gobject/tools-ginspector.html +3 -3
  452. data/vendor/local/share/gtk-doc/html/gobject/tools-gob.html +3 -3
  453. data/vendor/local/share/gtk-doc/html/gobject/tools-gtkdoc.html +6 -6
  454. data/vendor/local/share/gtk-doc/html/gobject/tools-refdb.html +3 -3
  455. data/vendor/local/share/gtk-doc/html/gobject/tools-vala.html +3 -3
  456. data/vendor/local/share/locale/ar/LC_MESSAGES/glib20.mo +0 -0
  457. data/vendor/local/share/locale/be/LC_MESSAGES/glib20.mo +0 -0
  458. data/vendor/local/share/locale/bg/LC_MESSAGES/glib20.mo +0 -0
  459. data/vendor/local/share/locale/bn_IN/LC_MESSAGES/glib20.mo +0 -0
  460. data/vendor/local/share/locale/cs/LC_MESSAGES/glib20.mo +0 -0
  461. data/vendor/local/share/locale/da/LC_MESSAGES/glib20.mo +0 -0
  462. data/vendor/local/share/locale/de/LC_MESSAGES/glib20.mo +0 -0
  463. data/vendor/local/share/locale/el/LC_MESSAGES/glib20.mo +0 -0
  464. data/vendor/local/share/locale/en_GB/LC_MESSAGES/glib20.mo +0 -0
  465. data/vendor/local/share/locale/es/LC_MESSAGES/glib20.mo +0 -0
  466. data/vendor/local/share/locale/et/LC_MESSAGES/glib20.mo +0 -0
  467. data/vendor/local/share/locale/eu/LC_MESSAGES/glib20.mo +0 -0
  468. data/vendor/local/share/locale/fr/LC_MESSAGES/glib20.mo +0 -0
  469. data/vendor/local/share/locale/gl/LC_MESSAGES/glib20.mo +0 -0
  470. data/vendor/local/share/locale/he/LC_MESSAGES/glib20.mo +0 -0
  471. data/vendor/local/share/locale/hu/LC_MESSAGES/glib20.mo +0 -0
  472. data/vendor/local/share/locale/hy/LC_MESSAGES/glib20.mo +0 -0
  473. data/vendor/local/share/locale/id/LC_MESSAGES/glib20.mo +0 -0
  474. data/vendor/local/share/locale/it/LC_MESSAGES/glib20.mo +0 -0
  475. data/vendor/local/share/locale/ja/LC_MESSAGES/glib20.mo +0 -0
  476. data/vendor/local/share/locale/ko/LC_MESSAGES/glib20.mo +0 -0
  477. data/vendor/local/share/locale/lt/LC_MESSAGES/glib20.mo +0 -0
  478. data/vendor/local/share/locale/nb/LC_MESSAGES/glib20.mo +0 -0
  479. data/vendor/local/share/locale/pa/LC_MESSAGES/glib20.mo +0 -0
  480. data/vendor/local/share/locale/pl/LC_MESSAGES/glib20.mo +0 -0
  481. data/vendor/local/share/locale/pt/LC_MESSAGES/glib20.mo +0 -0
  482. data/vendor/local/share/locale/pt_BR/LC_MESSAGES/glib20.mo +0 -0
  483. data/vendor/local/share/locale/ro/LC_MESSAGES/glib20.mo +0 -0
  484. data/vendor/local/share/locale/ru/LC_MESSAGES/glib20.mo +0 -0
  485. data/vendor/local/share/locale/sl/LC_MESSAGES/glib20.mo +0 -0
  486. data/vendor/local/share/locale/sr/LC_MESSAGES/glib20.mo +0 -0
  487. data/vendor/local/share/locale/sr@latin/LC_MESSAGES/glib20.mo +0 -0
  488. data/vendor/local/share/locale/sv/LC_MESSAGES/glib20.mo +0 -0
  489. data/vendor/local/share/locale/ug/LC_MESSAGES/glib20.mo +0 -0
  490. data/vendor/local/share/locale/vi/LC_MESSAGES/glib20.mo +0 -0
  491. data/vendor/local/share/locale/zh_CN/LC_MESSAGES/glib20.mo +0 -0
  492. data/vendor/local/share/locale/zh_HK/LC_MESSAGES/glib20.mo +0 -0
  493. data/vendor/local/share/locale/zh_TW/LC_MESSAGES/glib20.mo +0 -0
  494. data/vendor/local/share/man/man1/glib-genmarshal.1 +2 -2
  495. data/vendor/local/share/man/man1/glib-mkenums.1 +2 -2
  496. data/vendor/local/share/man/man1/gobject-query.1 +2 -2
  497. data/vendor/local/src/tml/packaging/{glib_2.26.1-1_win32.log → glib_2.28.1-1_win32.log} +690 -773
  498. data/vendor/local/src/tml/packaging/{glib_2.26.1-1_win32.sh → glib_2.28.1-1_win32.sh} +2 -4
  499. metadata +78 -146
  500. data/ext/glib2/Makefile +0 -169
  501. data/ext/glib2/glib-enum-types.c +0 -1065
  502. data/ext/glib2/glib-enum-types.h +0 -144
  503. data/ext/glib2/ruby-glib2.pc +0 -3
  504. data/test-unit/COPYING +0 -56
  505. data/test-unit/GPL +0 -340
  506. data/test-unit/History.txt +0 -279
  507. data/test-unit/Manifest.txt +0 -110
  508. data/test-unit/PSFL +0 -271
  509. data/test-unit/README.txt +0 -75
  510. data/test-unit/Rakefile +0 -53
  511. data/test-unit/TODO +0 -5
  512. data/test-unit/bin/testrb +0 -5
  513. data/test-unit/html/bar.png +0 -0
  514. data/test-unit/html/bar.svg +0 -153
  515. data/test-unit/html/developer.png +0 -0
  516. data/test-unit/html/developer.svg +0 -469
  517. data/test-unit/html/famfamfam-logo.png +0 -0
  518. data/test-unit/html/favicon.ico +0 -0
  519. data/test-unit/html/favicon.png +0 -0
  520. data/test-unit/html/favicon.svg +0 -82
  521. data/test-unit/html/heading-mark.png +0 -0
  522. data/test-unit/html/heading-mark.svg +0 -393
  523. data/test-unit/html/index.html +0 -285
  524. data/test-unit/html/index.html.ja +0 -299
  525. data/test-unit/html/install.png +0 -0
  526. data/test-unit/html/install.svg +0 -636
  527. data/test-unit/html/jp.png +0 -0
  528. data/test-unit/html/kinotan-failure.png +0 -0
  529. data/test-unit/html/kinotan-pass.png +0 -0
  530. data/test-unit/html/logo.png +0 -0
  531. data/test-unit/html/logo.svg +0 -483
  532. data/test-unit/html/reference.png +0 -0
  533. data/test-unit/html/rubyforge.png +0 -0
  534. data/test-unit/html/tango-logo.png +0 -0
  535. data/test-unit/html/test-unit.css +0 -339
  536. data/test-unit/html/tutorial.png +0 -0
  537. data/test-unit/html/tutorial.svg +0 -559
  538. data/test-unit/html/us.png +0 -0
  539. data/test-unit/images/color-diff.png +0 -0
  540. data/test-unit/lib/test/unit.rb +0 -328
  541. data/test-unit/lib/test/unit/assertionfailederror.rb +0 -25
  542. data/test-unit/lib/test/unit/assertions.rb +0 -1792
  543. data/test-unit/lib/test/unit/attribute.rb +0 -125
  544. data/test-unit/lib/test/unit/autorunner.rb +0 -415
  545. data/test-unit/lib/test/unit/collector.rb +0 -38
  546. data/test-unit/lib/test/unit/collector/descendant.rb +0 -23
  547. data/test-unit/lib/test/unit/collector/dir.rb +0 -108
  548. data/test-unit/lib/test/unit/collector/load.rb +0 -187
  549. data/test-unit/lib/test/unit/collector/objectspace.rb +0 -34
  550. data/test-unit/lib/test/unit/collector/xml.rb +0 -250
  551. data/test-unit/lib/test/unit/color-scheme.rb +0 -106
  552. data/test-unit/lib/test/unit/color.rb +0 -96
  553. data/test-unit/lib/test/unit/diff.rb +0 -740
  554. data/test-unit/lib/test/unit/error.rb +0 -131
  555. data/test-unit/lib/test/unit/exceptionhandler.rb +0 -39
  556. data/test-unit/lib/test/unit/failure.rb +0 -136
  557. data/test-unit/lib/test/unit/fixture.rb +0 -185
  558. data/test-unit/lib/test/unit/notification.rb +0 -129
  559. data/test-unit/lib/test/unit/omission.rb +0 -191
  560. data/test-unit/lib/test/unit/pending.rb +0 -150
  561. data/test-unit/lib/test/unit/priority.rb +0 -180
  562. data/test-unit/lib/test/unit/runner/console.rb +0 -52
  563. data/test-unit/lib/test/unit/runner/emacs.rb +0 -8
  564. data/test-unit/lib/test/unit/runner/tap.rb +0 -8
  565. data/test-unit/lib/test/unit/runner/xml.rb +0 -15
  566. data/test-unit/lib/test/unit/testcase.rb +0 -515
  567. data/test-unit/lib/test/unit/testresult.rb +0 -125
  568. data/test-unit/lib/test/unit/testsuite.rb +0 -134
  569. data/test-unit/lib/test/unit/ui/console/outputlevel.rb +0 -14
  570. data/test-unit/lib/test/unit/ui/console/testrunner.rb +0 -467
  571. data/test-unit/lib/test/unit/ui/emacs/testrunner.rb +0 -63
  572. data/test-unit/lib/test/unit/ui/tap/testrunner.rb +0 -82
  573. data/test-unit/lib/test/unit/ui/testrunner.rb +0 -53
  574. data/test-unit/lib/test/unit/ui/testrunnermediator.rb +0 -86
  575. data/test-unit/lib/test/unit/ui/testrunnerutilities.rb +0 -41
  576. data/test-unit/lib/test/unit/ui/xml/testrunner.rb +0 -224
  577. data/test-unit/lib/test/unit/util/backtracefilter.rb +0 -42
  578. data/test-unit/lib/test/unit/util/method-owner-finder.rb +0 -28
  579. data/test-unit/lib/test/unit/util/observable.rb +0 -90
  580. data/test-unit/lib/test/unit/util/output.rb +0 -31
  581. data/test-unit/lib/test/unit/util/procwrapper.rb +0 -48
  582. data/test-unit/lib/test/unit/version.rb +0 -7
  583. data/test-unit/sample/adder.rb +0 -13
  584. data/test-unit/sample/subtracter.rb +0 -12
  585. data/test-unit/sample/test_adder.rb +0 -20
  586. data/test-unit/sample/test_subtracter.rb +0 -20
  587. data/test-unit/sample/test_user.rb +0 -23
  588. data/test-unit/test/collector/test-descendant.rb +0 -133
  589. data/test-unit/test/collector/test-load.rb +0 -442
  590. data/test-unit/test/collector/test_dir.rb +0 -406
  591. data/test-unit/test/collector/test_objectspace.rb +0 -100
  592. data/test-unit/test/run-test.rb +0 -22
  593. data/test-unit/test/test-assertions.rb +0 -1849
  594. data/test-unit/test/test-attribute.rb +0 -86
  595. data/test-unit/test/test-color-scheme.rb +0 -69
  596. data/test-unit/test/test-color.rb +0 -47
  597. data/test-unit/test/test-diff.rb +0 -518
  598. data/test-unit/test/test-emacs-runner.rb +0 -60
  599. data/test-unit/test/test-fixture.rb +0 -324
  600. data/test-unit/test/test-notification.rb +0 -33
  601. data/test-unit/test/test-omission.rb +0 -81
  602. data/test-unit/test/test-pending.rb +0 -70
  603. data/test-unit/test/test-priority.rb +0 -119
  604. data/test-unit/test/test-testcase.rb +0 -569
  605. data/test-unit/test/test_error.rb +0 -26
  606. data/test-unit/test/test_failure.rb +0 -33
  607. data/test-unit/test/test_testresult.rb +0 -113
  608. data/test-unit/test/test_testsuite.rb +0 -137
  609. data/test-unit/test/testunit-test-util.rb +0 -14
  610. data/test-unit/test/ui/test_tap.rb +0 -33
  611. data/test-unit/test/ui/test_testrunmediator.rb +0 -20
  612. data/test-unit/test/util/test-method-owner-finder.rb +0 -38
  613. data/test-unit/test/util/test-output.rb +0 -11
  614. data/test-unit/test/util/test_backtracefilter.rb +0 -41
  615. data/test-unit/test/util/test_observable.rb +0 -102
  616. data/test-unit/test/util/test_procwrapper.rb +0 -36
  617. data/vendor/local/share/gtk-doc/html/gio/ch24.html +0 -75
  618. data/vendor/local/share/gtk-doc/html/gio/ch25.html +0 -217
  619. data/vendor/local/share/gtk-doc/html/gio/ch25s02.html +0 -41
  620. data/vendor/local/share/gtk-doc/html/gio/ch25s03.html +0 -39
@@ -1,100 +0,0 @@
1
- # Author:: Nathaniel Talbott.
2
- # Copyright:: Copyright (c) 2000-2003 Nathaniel Talbott. All rights reserved.
3
- # License:: Ruby license.
4
-
5
- require 'test/unit'
6
- require 'test/unit/collector/objectspace'
7
-
8
- module Test
9
- module Unit
10
- module Collector
11
- class TC_ObjectSpace < TestCase
12
- def setup
13
- @tc1 = Class.new(TestCase) do
14
- def self.name
15
- "tc_1"
16
- end
17
- def test_1
18
- end
19
- def test_2
20
- end
21
- end
22
-
23
- @tc2 = Class.new(TestCase) do
24
- def self.name
25
- "tc_2"
26
- end
27
- def test_0
28
- end
29
- end
30
-
31
- @no_tc = Class.new do
32
- def test_4
33
- end
34
- end
35
-
36
- @object_space = {Class => [@tc1, @tc2, @no_tc], String => ['']}
37
- def @object_space.each_object(type)
38
- self[type].each{|item| yield(item) }
39
- end
40
-
41
- @c = ObjectSpace.new(@object_space)
42
- end
43
-
44
- def full_suite(name=ObjectSpace::NAME)
45
- expected = TestSuite.new(name)
46
- expected << (TestSuite.new(@tc1.name) << @tc1.new('test_1') << @tc1.new('test_2'))
47
- expected << (TestSuite.new(@tc2.name) << @tc2.new('test_0'))
48
- end
49
-
50
- def empty_suite
51
- TestSuite.new(ObjectSpace::NAME)
52
- end
53
-
54
- def test_basic_collection
55
- assert_equal(full_suite("name"), @c.collect("name"))
56
-
57
- @c.filter = []
58
- assert_equal(full_suite("name"), @c.collect("name"))
59
- end
60
-
61
- def test_filtered_collection
62
- @c.filter = proc{false}
63
- assert_equal(empty_suite, @c.collect)
64
-
65
- @c.filter = proc{true}
66
- assert_equal(full_suite, @c.collect)
67
-
68
- @c.filter = proc{nil}
69
- assert_equal(full_suite, @c.collect)
70
-
71
- @c.filter = [proc{false}, proc{true}]
72
- assert_equal(empty_suite, @c.collect)
73
-
74
- @c.filter = [proc{true}, proc{false}]
75
- assert_equal(empty_suite, @c.collect)
76
-
77
- @c.filter = [proc{nil}, proc{false}]
78
- assert_equal(empty_suite, @c.collect)
79
-
80
- @c.filter = [proc{nil}, proc{true}]
81
- assert_equal(full_suite, @c.collect)
82
-
83
- expected = TestSuite.new(ObjectSpace::NAME)
84
- expected << (TestSuite.new(@tc1.name) << @tc1.new('test_1'))
85
- expected << (TestSuite.new(@tc2.name) << @tc2.new('test_0'))
86
- @c.filter = proc{|test| ['test_1', 'test_0'].include?(test.method_name)}
87
- assert_equal(expected, @c.collect)
88
-
89
- expected = TestSuite.new(ObjectSpace::NAME)
90
- TestSuite.new(@tc1.name) << @tc1.new('test_1')
91
- TestSuite.new(@tc2.name) << @tc2.new('test_0')
92
- @c.filter = [proc{|t| t.method_name == 'test_1' ? true : nil},
93
- proc{|t| t.method_name == 'test_0' ? true : nil},
94
- proc{false}]
95
- assert_equal(empty_suite, @c.collect)
96
- end
97
- end
98
- end
99
- end
100
- end
@@ -1,22 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- $VERBOSE = true
4
-
5
- $KCODE = "utf8" unless "".respond_to?(:encoding)
6
-
7
- base_dir = File.expand_path(File.join(File.dirname(__FILE__), ".."))
8
- lib_dir = File.join(base_dir, "lib")
9
- test_dir = File.join(base_dir, "test")
10
-
11
- $LOAD_PATH.unshift(lib_dir)
12
-
13
- require 'test/unit'
14
-
15
- test_unit_notify_base_dir = File.join(base_dir, "..", "test-unit-notify")
16
- test_unit_notify_base_dir = File.expand_path(test_unit_notify_base_dir)
17
- if File.exist?(test_unit_notify_base_dir)
18
- $LOAD_PATH.unshift(File.join(test_unit_notify_base_dir, "lib"))
19
- require 'test/unit/notify'
20
- end
21
-
22
- exit Test::Unit::AutoRunner.run(true, test_dir)
@@ -1,1849 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # Author:: Nathaniel Talbott.
4
- # Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved.
5
- # Copyright (c) 2009-2010 Kouhei Sutou. All rights reserved.
6
- # License:: Ruby license.
7
-
8
- require 'test/unit'
9
-
10
- module Test
11
- module Unit
12
- module AssertionCheckable
13
- backtrace_pre = "---Backtrace---"
14
- backtrace_post = "---------------"
15
- BACKTRACE_RE = /#{backtrace_pre}\n.+\n#{backtrace_post}/m
16
-
17
- private
18
- def check(value, message="")
19
- add_assertion
20
- raise AssertionFailedError.new(message) unless value
21
- end
22
-
23
- def check_assertions(expect_fail, expected_message="",
24
- return_value_expected=false)
25
- @actual_assertion_count = 0
26
- failed = true
27
- actual_message = nil
28
- @catch_assertions = true
29
- return_value = nil
30
- begin
31
- return_value = yield
32
- failed = false
33
- rescue AssertionFailedError => error
34
- actual_message = error.message
35
- end
36
- @catch_assertions = false
37
-
38
- if expect_fail
39
- message = "Should have failed, but didn't"
40
- else
41
- message = "Should not have failed, but did with message\n" +
42
- "<#{actual_message}>"
43
- end
44
- check(expect_fail == failed, message)
45
-
46
- message = "Should have made one assertion but made\n" +
47
- "<#{@actual_assertion_count}>"
48
- check(1 == @actual_assertion_count, message)
49
-
50
- if expect_fail
51
- case expected_message
52
- when String
53
- check(actual_message == expected_message,
54
- "Should have the correct message.\n" +
55
- "<#{expected_message.inspect}> expected but was\n" +
56
- "<#{actual_message.inspect}>")
57
- when Regexp
58
- check(actual_message =~ expected_message,
59
- "The message should match correctly.\n" +
60
- "</#{expected_message.source}/> expected to match\n" +
61
- "<#{actual_message.inspect}>")
62
- else
63
- check(false,
64
- "Incorrect expected message type in assert_nothing_failed")
65
- end
66
- else
67
- if return_value_expected
68
- check(!return_value.nil?, "Should return a value")
69
- else
70
- check(return_value.nil?,
71
- "Should not return a value but returned <#{return_value}>")
72
- end
73
- end
74
-
75
- return_value
76
- end
77
-
78
- def check_nothing_fails(return_value_expected=false, &proc)
79
- check_assertions(false, "", return_value_expected, &proc)
80
- end
81
-
82
- def check_fails(expected_message="", &proc)
83
- check_assertions(true, expected_message, &proc)
84
- end
85
-
86
- def inspect_tag(tag)
87
- begin
88
- throw tag
89
- rescue NameError
90
- tag.to_s.inspect
91
- rescue ArgumentError
92
- tag.inspect
93
- end
94
- end
95
-
96
- def add_failure(message, location=caller, options=nil)
97
- unless @catch_assertions
98
- super
99
- end
100
- end
101
-
102
- def add_assertion
103
- if @catch_assertions
104
- @actual_assertion_count += 1
105
- else
106
- super
107
- end
108
- end
109
- end
110
-
111
- class TestAssertions < TestCase
112
- include AssertionCheckable
113
-
114
- def test_assert_block
115
- check_nothing_fails {
116
- assert_block {true}
117
- }
118
- check_nothing_fails {
119
- assert_block("successful assert_block") {true}
120
- }
121
- check_nothing_fails {
122
- assert_block("successful assert_block") {true}
123
- }
124
- check_fails("assert_block failed.") {
125
- assert_block {false}
126
- }
127
- check_fails("failed assert_block") {
128
- assert_block("failed assert_block") {false}
129
- }
130
- end
131
-
132
- def test_assert_equal
133
- check_nothing_fails {
134
- assert_equal("string1", "string1")
135
- }
136
- check_nothing_fails {
137
- assert_equal("string1", "string1", "successful assert_equal")
138
- }
139
-
140
- message = <<-EOM.chomp
141
- <"string1"> expected but was
142
- <"string2">.
143
-
144
- diff:
145
- - string1
146
- ? ^
147
- + string2
148
- ? ^
149
- EOM
150
- check_fails(message) {
151
- assert_equal("string1", "string2")
152
- }
153
-
154
- message = <<-EOM.chomp
155
- failed assert_equal.
156
- <"string1"> expected but was
157
- <"string2">.
158
-
159
- diff:
160
- - string1
161
- ? ^
162
- + string2
163
- ? ^
164
- EOM
165
- check_fails(message) {
166
- assert_equal("string1", "string2", "failed assert_equal")
167
- }
168
-
169
- message = <<-EOM.chomp
170
- <"111111"> expected but was
171
- <111111>.
172
-
173
- diff:
174
- - "111111"
175
- ? - -
176
- + 111111
177
- EOM
178
- check_fails(message) do
179
- assert_equal("111111", 111111)
180
- end
181
- end
182
-
183
- def test_assert_equal_with_long_line
184
- expected = ["0123456789",
185
- "1123456789",
186
- "2123456789",
187
- "3123456789",
188
- "4123456789",
189
- "5123456789",
190
- "6123456789",
191
- "7123456789",
192
- "8123456789"].join
193
- actual = ["0000000000",
194
- "1123456789",
195
- "2123456789",
196
- "3123456789",
197
- "4123456789",
198
- "5123456789",
199
- "6123456789",
200
- "7123456789",
201
- "8123456789"].join
202
- message = <<-EOM.chomp
203
- <"#{expected}"> expected but was
204
- <"#{actual}">.
205
-
206
- diff:
207
- - #{expected}
208
- ? ^^^^^^^^^
209
- + #{actual}
210
- ? ^^^^^^^^^
211
-
212
- folded diff:
213
- - 012345678911234567892123456789312345678941234567895123456789612345678971234567
214
- ? ^^^^^^^^^
215
- + 000000000011234567892123456789312345678941234567895123456789612345678971234567
216
- ? ^^^^^^^^^
217
- 898123456789
218
- EOM
219
- check_fails(message) do
220
- assert_equal(expected, actual)
221
- end
222
- end
223
-
224
- def test_assert_equal_for_too_small_difference
225
- message = <<-EOM.chomp
226
- <1> expected but was
227
- <2>.
228
- EOM
229
- check_fails(message) do
230
- assert_equal(1, 2)
231
- end
232
- end
233
-
234
- def test_assert_equal_for_same_inspected_objects
235
- now = Time.now
236
- now_without_usec = Time.at(now.to_i)
237
- message = <<-EOM.chomp
238
- <#{now.inspect}> expected but was
239
- <#{now.inspect}>.
240
- EOM
241
- check_fails(message) do
242
- assert_equal(now, now_without_usec)
243
- end
244
- end
245
-
246
- def test_assert_equal_with_multi_lines_result
247
- message = <<-EOM.chomp
248
- <#{"a\nb".inspect}> expected but was
249
- <#{"x".inspect}>.
250
-
251
- diff:
252
- + x
253
- - a
254
- - b
255
- EOM
256
- check_fails(message) do
257
- assert_equal("a\nb", "x")
258
- end
259
- end
260
-
261
- def test_assert_equal_with_large_string
262
- message = <<-EOM.chomp
263
- <#{("a\n" + "x" * 997).inspect}> expected but was
264
- <#{"x".inspect}>.
265
-
266
- diff:
267
- + x
268
- - a
269
- - #{"x" * 997}
270
-
271
- folded diff:
272
- + x
273
- - a
274
- #{(["- " + ("x" * 78)] * 12).join("\n")}
275
- - #{"x" * 61}
276
- EOM
277
- check_fails(message) do
278
- assert_equal("a\n" + "x" * 997, "x")
279
- end
280
-
281
- message = <<-EOM.chomp
282
- <#{("a\n" + "x" * 998).inspect}> expected but was
283
- <#{"x".inspect}>.
284
- EOM
285
- check_fails(message) do
286
- assert_equal("a\n" + "x" * 998, "x")
287
- end
288
- end
289
-
290
- def test_assert_equal_with_max_diff_target_string_size
291
- key = "TEST_UNIT_MAX_DIFF_TARGET_STRING_SIZE"
292
- before_value = ENV[key]
293
- ENV[key] = "100"
294
- begin
295
- message = <<-EOM.chomp
296
- <#{("a\n" + "x" * 97).inspect}> expected but was
297
- <#{"x".inspect}>.
298
-
299
- diff:
300
- + x
301
- - a
302
- - #{"x" * 97}
303
-
304
- folded diff:
305
- + x
306
- - a
307
- #{(["- " + ("x" * 78)]).join("\n")}
308
- - #{"x" * 19}
309
- EOM
310
- check_fails(message) do
311
- assert_equal("a\n" + "x" * 97, "x")
312
- end
313
-
314
- message = <<-EOM.chomp
315
- <#{("a\n" + "x" * 98).inspect}> expected but was
316
- <#{"x".inspect}>.
317
- EOM
318
- check_fails(message) do
319
- assert_equal("a\n" + "x" * 98, "x")
320
- end
321
- ensure
322
- ENV[key] = before_value
323
- end
324
- end
325
-
326
- def test_assert_equal_with_different_encoding
327
- utf8_string = "こんにちは"
328
- unless utf8_string.respond_to?(:force_encoding)
329
- omit("encoding test is for Ruby >= 1.9")
330
- end
331
- ascii_8bit_string = utf8_string.dup.force_encoding("ascii-8bit")
332
- message = <<-EOM.chomp
333
- <"こんにちは">("UTF-8") expected but was
334
- <#{ascii_8bit_string.inspect}>("ASCII-8BIT").
335
- EOM
336
- check_fails(message) do
337
- assert_equal(utf8_string, ascii_8bit_string)
338
- end
339
- end
340
-
341
- def test_assert_equal_with_different_hash
342
- designers = {
343
- "Ruby" => "Matz",
344
- "Lisp" => "John McCarthy",
345
- }
346
- categories = {
347
- "LL" => ["Ruby", "Python"],
348
- "Heavy" => ["C", "C++"],
349
- }
350
- message = <<-EOM.chomp
351
- <{"Lisp"=>"John McCarthy", "Ruby"=>"Matz"}> expected but was
352
- <{"Heavy"=>["C", "C++"], "LL"=>["Ruby", "Python"]}>.
353
- EOM
354
- check_fails(message) do
355
- assert_equal(designers, categories)
356
- end
357
- end
358
-
359
- def test_assert_raise_success
360
- return_value = nil
361
- check_nothing_fails(true) do
362
- return_value = assert_raise(RuntimeError) do
363
- raise "Error"
364
- end
365
- end
366
- check(return_value.kind_of?(Exception),
367
- "Should have returned the exception " +
368
- "from a successful assert_raise")
369
- check(return_value.message == "Error",
370
- "Should have returned the correct exception " +
371
- "from a successful assert_raise")
372
-
373
- check_nothing_fails(true) do
374
- assert_raise(ArgumentError, "successful assert_raise") do
375
- raise ArgumentError.new("Error")
376
- end
377
- end
378
-
379
- check_nothing_fails(true) do
380
- assert_raise(RuntimeError) do
381
- raise "Error"
382
- end
383
- end
384
-
385
- check_nothing_fails(true) do
386
- assert_raise(RuntimeError, "successful assert_raise") do
387
- raise "Error"
388
- end
389
- end
390
-
391
- check_nothing_fails(true) do
392
- assert_raise do
393
- raise Exception, "Any exception"
394
- end
395
- end
396
- end
397
-
398
- def test_assert_raise_fail
399
- check_fails("<RuntimeError> exception expected but none was thrown.") do
400
- assert_raise(RuntimeError) do
401
- 1 + 1
402
- end
403
- end
404
-
405
- message = <<-EOM
406
- failed assert_raise.
407
- <ArgumentError> exception expected but was
408
- Class: <RuntimeError>
409
- Message: <"Error">
410
- EOM
411
- check_fails(/\A#{message}#{BACKTRACE_RE}\Z/m) do
412
- assert_raise(ArgumentError, "failed assert_raise") do
413
- raise "Error"
414
- end
415
- end
416
-
417
- message = <<-EOM
418
- Should expect a class of exception, Object.
419
- <false> is not true.
420
- EOM
421
- check_fails(message.chomp) do
422
- assert_nothing_raised(Object) do
423
- 1 + 1
424
- end
425
- end
426
- end
427
-
428
- def test_assert_raise_module
429
- exceptions = [ArgumentError, TypeError]
430
- modules = [Math, Comparable]
431
- rescues = exceptions + modules
432
-
433
- exceptions.each do |exc|
434
- return_value = nil
435
- check_nothing_fails(true) do
436
- return_value = assert_raise(*rescues) do
437
- raise exc, "Error"
438
- end
439
- end
440
- check(return_value.instance_of?(exc),
441
- "Should have returned #{exc} but was #{return_value.class}")
442
- check(return_value.message == "Error",
443
- "Should have returned the correct exception " +
444
- "from a successful assert_raise")
445
- end
446
-
447
- modules.each do |mod|
448
- return_value = nil
449
- check_nothing_fails(true) do
450
- return_value = assert_raise(*rescues) do
451
- raise Exception.new("Error").extend(mod)
452
- end
453
- end
454
- check(mod === return_value,
455
- "Should have returned #{mod}")
456
- check(return_value.message == "Error",
457
- "Should have returned the correct exception " +
458
- "from a successful assert_raise")
459
- end
460
-
461
- check_fails("<[ArgumentError, TypeError, Math, Comparable]> exception " +
462
- "expected but none was thrown.") do
463
- assert_raise(*rescues) do
464
- 1 + 1
465
- end
466
- end
467
-
468
- message = <<-EOM
469
- failed assert_raise.
470
- <[ArgumentError, TypeError]> exception expected but was
471
- Class: <RuntimeError>
472
- Message: <"Error">
473
- EOM
474
- message = Regexp.escape(message)
475
- check_fails(/\A#{message}#{BACKTRACE_RE}\z/m) do
476
- assert_raise(ArgumentError, TypeError, "failed assert_raise") do
477
- raise "Error"
478
- end
479
- end
480
- end
481
-
482
- def test_assert_raise_instance
483
- return_value = nil
484
- check_nothing_fails(true) do
485
- return_value = assert_raise(RuntimeError.new("Error")) do
486
- raise "Error"
487
- end
488
- end
489
- check(return_value.kind_of?(Exception),
490
- "Should have returned the exception " +
491
- "from a successful assert_raise")
492
- check(return_value.message == "Error",
493
- "Should have returned the correct exception " +
494
- "from a successful assert_raise")
495
-
496
- message = <<-EOM
497
- <RuntimeError("XXX")> exception expected but was
498
- Class: <RuntimeError>
499
- Message: <"Error">
500
- EOM
501
- message = Regexp.escape(message)
502
- check_fails(/\A#{message}#{BACKTRACE_RE}\z/) do
503
- return_value = assert_raise(RuntimeError.new("XXX")) do
504
- raise "Error"
505
- end
506
- end
507
-
508
- different_error_class = Class.new(StandardError)
509
- message = <<-EOM
510
- <\#<Class:[xa-f\\d]+>\\("Error"\\)> exception expected but was
511
- Class: <RuntimeError>
512
- Message: <"Error">
513
- EOM
514
- check_fails(/\A#{message}#{BACKTRACE_RE}\z/) do
515
- assert_raise(different_error_class.new("Error")) do
516
- raise "Error"
517
- end
518
- end
519
-
520
- different_error = different_error_class.new("Error")
521
- def different_error.inspect
522
- "DifferentError: \"Error\""
523
- end
524
- message = <<-EOM
525
- <\DifferentError: \\"Error\\"> exception expected but was
526
- Class: <RuntimeError>
527
- Message: <"Error">
528
- EOM
529
- check_fails(/\A#{message}#{BACKTRACE_RE}\z/) do
530
- assert_raise(different_error) do
531
- raise "Error"
532
- end
533
- end
534
-
535
- check_nothing_fails(true) do
536
- assert_raise(different_error_class.new("Error"),
537
- RuntimeError.new("Error"),
538
- RuntimeError.new("XXX")) do
539
- raise "Error"
540
- end
541
- end
542
- end
543
-
544
- def test_assert_instance_of
545
- check_nothing_fails {
546
- assert_instance_of(String, "string")
547
- }
548
- check_nothing_fails {
549
- assert_instance_of(String, "string", "successful assert_instance_of")
550
- }
551
- check_nothing_fails {
552
- assert_instance_of(String, "string", "successful assert_instance_of")
553
- }
554
- check_fails(%Q{<"string"> expected to be an instance of\n<Hash> but was\n<String>.}) {
555
- assert_instance_of(Hash, "string")
556
- }
557
- check_fails(%Q{failed assert_instance_of.\n<"string"> expected to be an instance of\n<Hash> but was\n<String>.}) {
558
- assert_instance_of(Hash, "string", "failed assert_instance_of")
559
- }
560
-
561
- check_nothing_fails do
562
- assert_instance_of([Fixnum, NilClass], 100)
563
- end
564
- check_fails(%Q{<"string"> expected to be an instance of\n[<Fixnum>, <NilClass>] but was\n<String>.}) do
565
- assert_instance_of([Fixnum, NilClass], "string")
566
- end
567
- check_fails(%Q{<100> expected to be an instance of\n[<Numeric>, <NilClass>] but was\n<Fixnum>.}) do
568
- assert_instance_of([Numeric, NilClass], 100)
569
- end
570
- end
571
-
572
- def test_assert_nil
573
- check_nothing_fails {
574
- assert_nil(nil)
575
- }
576
- check_nothing_fails {
577
- assert_nil(nil, "successful assert_nil")
578
- }
579
- check_nothing_fails {
580
- assert_nil(nil, "successful assert_nil")
581
- }
582
- check_fails(%Q{<"string"> expected to be nil.}) {
583
- assert_nil("string")
584
- }
585
- check_fails(%Q{failed assert_nil.\n<"string"> expected to be nil.}) {
586
- assert_nil("string", "failed assert_nil")
587
- }
588
- end
589
-
590
- def test_assert_not_nil
591
- check_nothing_fails{assert_not_nil(false)}
592
- check_nothing_fails{assert_not_nil(false, "message")}
593
- check_fails("<nil> expected to not be nil."){assert_not_nil(nil)}
594
- check_fails("message.\n<nil> expected to not be nil.") {assert_not_nil(nil, "message")}
595
- end
596
-
597
- def test_assert_kind_of
598
- check_nothing_fails {
599
- assert_kind_of(Module, Array)
600
- }
601
- check_nothing_fails {
602
- assert_kind_of(Object, "string", "successful assert_kind_of")
603
- }
604
- check_nothing_fails {
605
- assert_kind_of(Object, "string", "successful assert_kind_of")
606
- }
607
- check_nothing_fails {
608
- assert_kind_of(Comparable, 1)
609
- }
610
- check_fails(%Q{<"string"> expected to be kind_of?\n<Class> but was\n<String>.}) {
611
- assert_kind_of(Class, "string")
612
- }
613
- check_fails(%Q{failed assert_kind_of.\n<"string"> expected to be kind_of?\n<Class> but was\n<String>.}) {
614
- assert_kind_of(Class, "string", "failed assert_kind_of")
615
- }
616
-
617
- check_nothing_fails do
618
- assert_kind_of([Fixnum, NilClass], 100)
619
- end
620
- check_fails(%Q{<"string"> expected to be kind_of?\n[<Fixnum>, <NilClass>] but was\n<String>.}) do
621
- assert_kind_of([Fixnum, NilClass], "string")
622
- end
623
- end
624
-
625
- def test_assert_match
626
- check_nothing_fails {
627
- assert_match(/strin./, "string")
628
- }
629
- check_nothing_fails {
630
- assert_match("strin", "string")
631
- }
632
- check_nothing_fails {
633
- assert_match(/strin./, "string", "successful assert_match")
634
- }
635
- check_nothing_fails {
636
- assert_match(/strin./, "string", "successful assert_match")
637
- }
638
- check_fails(%Q{<"string"> expected to be =~\n</slin./>.}) {
639
- assert_match(/slin./, "string")
640
- }
641
- check_fails(%Q{<"string"> expected to be =~\n</strin\\./>.}) {
642
- assert_match("strin.", "string")
643
- }
644
- check_fails(%Q{failed assert_match.\n<"string"> expected to be =~\n</slin./>.}) {
645
- assert_match(/slin./, "string", "failed assert_match")
646
- }
647
- end
648
-
649
- def test_assert_same
650
- thing = "thing"
651
- check_nothing_fails {
652
- assert_same(thing, thing)
653
- }
654
- check_nothing_fails {
655
- assert_same(thing, thing, "successful assert_same")
656
- }
657
- check_nothing_fails {
658
- assert_same(thing, thing, "successful assert_same")
659
- }
660
- thing2 = "thing"
661
- check_fails(%Q{<"thing">\nwith id <#{thing.__id__}> expected to be equal? to\n<"thing">\nwith id <#{thing2.__id__}>.}) {
662
- assert_same(thing, thing2)
663
- }
664
- check_fails(%Q{failed assert_same.\n<"thing">\nwith id <#{thing.__id__}> expected to be equal? to\n<"thing">\nwith id <#{thing2.__id__}>.}) {
665
- assert_same(thing, thing2, "failed assert_same")
666
- }
667
- end
668
-
669
- def test_assert_nothing_raised
670
- check_nothing_fails {
671
- assert_nothing_raised {
672
- 1 + 1
673
- }
674
- }
675
- check_nothing_fails {
676
- assert_nothing_raised("successful assert_nothing_raised") {
677
- 1 + 1
678
- }
679
- }
680
- check_nothing_fails {
681
- assert_nothing_raised("successful assert_nothing_raised") {
682
- 1 + 1
683
- }
684
- }
685
- check_nothing_fails {
686
- begin
687
- assert_nothing_raised(RuntimeError, StandardError, Comparable, "successful assert_nothing_raised") {
688
- raise ZeroDivisionError.new("ArgumentError")
689
- }
690
- rescue ZeroDivisionError
691
- end
692
- }
693
- check_fails("Should expect a class of exception, Object.\n<false> is not true.") {
694
- assert_nothing_raised(Object) {
695
- 1 + 1
696
- }
697
- }
698
- check_fails(%r{\AException raised:\nClass: <RuntimeError>\nMessage: <"Error">\n---Backtrace---\n.+\n---------------\Z}m) {
699
- assert_nothing_raised {
700
- raise "Error"
701
- }
702
- }
703
- check_fails(%r{\Afailed assert_nothing_raised\.\nException raised:\nClass: <RuntimeError>\nMessage: <"Error">\n---Backtrace---\n.+\n---------------\Z}m) {
704
- assert_nothing_raised("failed assert_nothing_raised") {
705
- raise "Error"
706
- }
707
- }
708
- check_fails(%r{\AException raised:\nClass: <RuntimeError>\nMessage: <"Error">\n---Backtrace---\n.+\n---------------\Z}m) {
709
- assert_nothing_raised(StandardError, RuntimeError) {
710
- raise "Error"
711
- }
712
- }
713
- check_fails("Failure.") do
714
- assert_nothing_raised do
715
- flunk("Failure")
716
- end
717
- end
718
- end
719
-
720
- def test_flunk
721
- check_fails("Flunked.") {
722
- flunk
723
- }
724
- check_fails("flunk message.") {
725
- flunk("flunk message")
726
- }
727
- end
728
-
729
- def test_assert_not_same
730
- thing = "thing"
731
- thing2 = "thing"
732
- check_nothing_fails {
733
- assert_not_same(thing, thing2)
734
- }
735
- check_nothing_fails {
736
- assert_not_same(thing, thing2, "message")
737
- }
738
- check_fails(%Q{<"thing">\nwith id <#{thing.__id__}> expected to not be equal? to\n<"thing">\nwith id <#{thing.__id__}>.}) {
739
- assert_not_same(thing, thing)
740
- }
741
- check_fails(%Q{message.\n<"thing">\nwith id <#{thing.__id__}> expected to not be equal? to\n<"thing">\nwith id <#{thing.__id__}>.}) {
742
- assert_not_same(thing, thing, "message")
743
- }
744
- end
745
-
746
- def test_assert_not_equal
747
- check_nothing_fails {
748
- assert_not_equal("string1", "string2")
749
- }
750
- check_nothing_fails {
751
- assert_not_equal("string1", "string2", "message")
752
- }
753
- check_fails(%Q{<"string"> expected to be != to\n<"string">.}) {
754
- assert_not_equal("string", "string")
755
- }
756
- check_fails(%Q{message.\n<"string"> expected to be != to\n<"string">.}) {
757
- assert_not_equal("string", "string", "message")
758
- }
759
- end
760
-
761
- def test_assert_not_match_pass
762
- check_nothing_fails do
763
- assert_not_match(/sling/, "string")
764
- end
765
- end
766
-
767
- def test_assert_not_match_pass_with_message
768
- check_nothing_fails do
769
- assert_not_match(/sling/, "string", "message")
770
- end
771
- end
772
-
773
- def test_assert_not_match_fail_not_regexp
774
- check_fails("<REGEXP> in assert_not_match(<REGEXP>, ...) " +
775
- "should be a Regexp.\n" +
776
- "<\"asdf\"> expected to be an instance of\n" +
777
- "<Regexp> but was\n" +
778
- "<String>.") do
779
- assert_not_match("asdf", "asdf")
780
- end
781
- end
782
-
783
- def test_assert_not_match_fail_match
784
- check_fails("</string/> expected to not match\n" +
785
- "<\"string\">.") do
786
- assert_not_match(/string/, "string")
787
- end
788
- end
789
-
790
- def test_assert_not_match_fail_match_with_message
791
- check_fails("message.\n" +
792
- "</string/> expected to not match\n" +
793
- "<\"string\">.") do
794
- assert_not_match(/string/, "string", "message")
795
- end
796
- end
797
-
798
- def test_assert_no_match
799
- check_nothing_fails{assert_no_match(/sling/, "string")}
800
- check_nothing_fails{assert_no_match(/sling/, "string", "message")}
801
- 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
802
- assert_no_match("asdf", "asdf")
803
- end
804
- check_fails(%Q{</string/> expected to not match\n<"string">.}) do
805
- assert_no_match(/string/, "string")
806
- end
807
- check_fails(%Q{message.\n</string/> expected to not match\n<"string">.}) do
808
- assert_no_match(/string/, "string", "message")
809
- end
810
- end
811
-
812
- def test_assert_throw
813
- check_nothing_fails do
814
- assert_throw(:thing, "message") do
815
- throw :thing
816
- end
817
- end
818
-
819
- tag = :thing2
820
- check_fails("message.\n" +
821
- "<:thing> expected to be thrown but\n" +
822
- "<#{inspect_tag(tag)}> was thrown.") do
823
- assert_throw(:thing, "message") do
824
- throw :thing2
825
- end
826
- end
827
- check_fails("message.\n" +
828
- "<:thing> should have been thrown.") do
829
- assert_throw(:thing, "message") do
830
- 1 + 1
831
- end
832
- end
833
- end
834
-
835
- def test_assert_nothing_thrown
836
- check_nothing_fails do
837
- assert_nothing_thrown("message") do
838
- 1 + 1
839
- end
840
- end
841
-
842
- tag = :thing
843
- inspected = inspect_tag(tag)
844
- check_fails("message.\n" +
845
- "<#{inspected}> was thrown when nothing was expected.") do
846
- assert_nothing_thrown("message") do
847
- throw tag
848
- end
849
- end
850
- end
851
-
852
- def test_assert_operator
853
- check_nothing_fails {
854
- assert_operator("thing", :==, "thing", "message")
855
- }
856
- check_fails(%Q{<0.15>\ngiven as the operator for #assert_operator must be a Symbol or #respond_to?(:to_str).}) do
857
- assert_operator("thing", 0.15, "thing")
858
- end
859
- check_fails(%Q{message.\n<"thing1"> expected to be\n==\n<"thing2">.}) {
860
- assert_operator("thing1", :==, "thing2", "message")
861
- }
862
- end
863
-
864
- def test_assert_respond_to
865
- check_nothing_fails {
866
- assert_respond_to("thing", :to_s, "message")
867
- }
868
- check_nothing_fails {
869
- assert_respond_to("thing", "to_s", "message")
870
- }
871
- check_fails("<0.15>.kind_of?(Symbol) or\n" +
872
- "<0.15>.respond_to?(:to_str) expected") {
873
- assert_respond_to("thing", 0.15)
874
- }
875
- check_fails("message.\n" +
876
- "<:symbol>.respond_to?(:nonexistence) expected\n" +
877
- "(Class: <Symbol>)") {
878
- assert_respond_to(:symbol, :nonexistence, "message")
879
- }
880
- end
881
-
882
- def test_assert_not_respond_to_pass_symbol
883
- check_nothing_fails do
884
- assert_not_respond_to("thing", :nonexistent, "message")
885
- end
886
- end
887
-
888
- def test_assert_not_respond_to_pass_string
889
- check_nothing_fails do
890
- assert_not_respond_to("thing", :nonexistent, "message")
891
- end
892
- end
893
-
894
- def test_assert_not_respond_to_fail_number
895
- check_fails("<0.15>.kind_of?(Symbol) or\n" +
896
- "<0.15>.respond_to?(:to_str) expected") do
897
- assert_respond_to("thing", 0.15)
898
- end
899
- end
900
-
901
- def tset_assert_not_respond_to_fail_existence
902
- check_fails("message.\n" +
903
- "!<:symbol>.respond_to?(:to_s) expected\n" +
904
- "(Class: <Symbol>)") do
905
- assert_respond_to(:symbol, :to_s, "message")
906
- end
907
- end
908
-
909
- def test_assert_send
910
- object = Object.new
911
- class << object
912
- private
913
- def return_argument(argument, bogus)
914
- return argument
915
- end
916
- end
917
- check_nothing_fails do
918
- assert_send([object, :return_argument, true, "bogus"], "message")
919
- end
920
-
921
- inspected_object = AssertionMessage.convert(object)
922
- expected_message = <<-EOM
923
- message.
924
- <#{inspected_object}> expected to respond to
925
- <return_argument(*[false, "bogus"])> with a true value but was
926
- <false>.
927
- EOM
928
- check_fails(expected_message.chomp) do
929
- assert_send([object, :return_argument, false, "bogus"], "message")
930
- end
931
- end
932
-
933
- def test_condition_invariant
934
- object = Object.new
935
- def object.inspect
936
- @changed = true
937
- end
938
- def object.==(other)
939
- @changed ||= false
940
- return (!@changed)
941
- end
942
- check_nothing_fails do
943
- assert_equal(object, object, "message")
944
- end
945
- end
946
-
947
- def test_assert_boolean
948
- check_nothing_fails do
949
- assert_boolean(true)
950
- end
951
- check_nothing_fails do
952
- assert_boolean(false)
953
- end
954
-
955
- check_fails("<true> or <false> expected but was\n<1>") do
956
- assert_boolean(1)
957
- end
958
-
959
- check_fails("<true> or <false> expected but was\n<nil>") do
960
- assert_boolean(nil)
961
- end
962
-
963
- check_fails("message.\n<true> or <false> expected but was\n<\"XXX\">") do
964
- assert_boolean("XXX", "message")
965
- end
966
- end
967
-
968
- def test_assert_true
969
- check_nothing_fails do
970
- assert_true(true)
971
- end
972
-
973
- check_fails("<true> expected but was\n<false>") do
974
- assert_true(false)
975
- end
976
-
977
- check_fails("<true> expected but was\n<1>") do
978
- assert_true(1)
979
- end
980
-
981
- check_fails("message.\n<true> expected but was\n<nil>") do
982
- assert_true(nil, "message")
983
- end
984
- end
985
-
986
- def test_assert_false
987
- check_nothing_fails do
988
- assert_false(false)
989
- end
990
-
991
- check_fails("<false> expected but was\n<true>") do
992
- assert_false(true)
993
- end
994
-
995
- check_fails("<false> expected but was\n<nil>") do
996
- assert_false(nil)
997
- end
998
-
999
- check_fails("message.\n<false> expected but was\n<:false>") do
1000
- assert_false(:false, "message")
1001
- end
1002
- end
1003
-
1004
- def test_assert_compare
1005
- check_nothing_fails do
1006
- assert_compare(1.4, "<", 10.0)
1007
- end
1008
-
1009
- check_nothing_fails do
1010
- assert_compare(2, "<=", 2)
1011
- end
1012
-
1013
- check_nothing_fails do
1014
- assert_compare(14, ">=", 10.0)
1015
- end
1016
-
1017
- check_nothing_fails do
1018
- assert_compare(14, ">", 13.9)
1019
- end
1020
-
1021
- expected_message = <<-EOM
1022
- <15> < <10> should be true
1023
- <15> expected less than
1024
- <10>.
1025
- EOM
1026
- check_fails(expected_message.chomp) do
1027
- assert_compare(15, "<", 10)
1028
- end
1029
-
1030
- expected_message = <<-EOM
1031
- <15> <= <10> should be true
1032
- <15> expected less than or equal to
1033
- <10>.
1034
- EOM
1035
- check_fails(expected_message.chomp) do
1036
- assert_compare(15, "<=", 10)
1037
- end
1038
-
1039
- expected_message = <<-EOM
1040
- <10> > <15> should be true
1041
- <10> expected greater than
1042
- <15>.
1043
- EOM
1044
- check_fails(expected_message.chomp) do
1045
- assert_compare(10, ">", 15)
1046
- end
1047
-
1048
- expected_message = <<-EOM
1049
- <10> >= <15> should be true
1050
- <10> expected greater than or equal to
1051
- <15>.
1052
- EOM
1053
- check_fails(expected_message.chomp) do
1054
- assert_compare(10, ">=", 15)
1055
- end
1056
- end
1057
-
1058
- def test_assert_fail_assertion
1059
- check_nothing_fails do
1060
- assert_fail_assertion do
1061
- flunk
1062
- end
1063
- end
1064
-
1065
- check_fails("Failed assertion was expected.") do
1066
- assert_fail_assertion do
1067
- end
1068
- end
1069
- end
1070
-
1071
- def test_assert_raise_message
1072
- check_nothing_fails do
1073
- assert_raise_message("Raise!") do
1074
- raise "Raise!"
1075
- end
1076
- end
1077
-
1078
- check_nothing_fails do
1079
- assert_raise_message("Raise!") do
1080
- raise Exception, "Raise!"
1081
- end
1082
- end
1083
-
1084
- check_nothing_fails do
1085
- assert_raise_message(/raise/i) do
1086
- raise "Raise!"
1087
- end
1088
- end
1089
-
1090
- expected_message = <<-EOM
1091
- <"Expected message"> exception message expected but was
1092
- <"Actual message">.
1093
- EOM
1094
- check_fails(expected_message.chomp) do
1095
- assert_raise_message("Expected message") do
1096
- raise "Actual message"
1097
- end
1098
- end
1099
-
1100
- expected_message = <<-EOM
1101
- <"Expected message"> exception message expected but none was thrown.
1102
- EOM
1103
- check_fails(expected_message.chomp) do
1104
- assert_raise_message("Expected message") do
1105
- end
1106
- end
1107
- end
1108
-
1109
- def test_assert_raise_kind_of
1110
- check_nothing_fails(true) do
1111
- assert_raise_kind_of(SystemCallError) do
1112
- raise Errno::EACCES
1113
- end
1114
- end
1115
-
1116
- expected_message = <<-EOM
1117
- <SystemCallError> family exception expected but was
1118
- Class: <RuntimeError>
1119
- Message: <"XXX">
1120
- ---Backtrace---
1121
- EOM
1122
- check_fails(/\A#{Regexp.escape(expected_message)}(?m).+\z/) do
1123
- assert_raise_kind_of(SystemCallError) do
1124
- raise RuntimeError, "XXX"
1125
- end
1126
- end
1127
- end
1128
-
1129
- def test_assert_const_defined
1130
- check_nothing_fails do
1131
- assert_const_defined(Test, :Unit)
1132
- end
1133
-
1134
- check_nothing_fails do
1135
- assert_const_defined(Test, "Unit")
1136
- end
1137
-
1138
- check_fails("<Test>.const_defined?(<:Nonexistence>) expected.") do
1139
- assert_const_defined(Test, :Nonexistence)
1140
- end
1141
- end
1142
-
1143
- def test_assert_not_const_defined
1144
- check_nothing_fails do
1145
- assert_not_const_defined(Test, :Nonexistence)
1146
- end
1147
-
1148
- check_fails("!<Test>.const_defined?(<:Unit>) expected.") do
1149
- assert_not_const_defined(Test, :Unit)
1150
- end
1151
-
1152
- check_fails("!<Test>.const_defined?(<\"Unit\">) expected.") do
1153
- assert_not_const_defined(Test, "Unit")
1154
- end
1155
- end
1156
-
1157
- def test_assert_predicate
1158
- check_nothing_fails do
1159
- assert_predicate([], :empty?)
1160
- end
1161
-
1162
- check_fails("<[1]>.empty? is true value expected but was\n<false>") do
1163
- assert_predicate([1], :empty?)
1164
- end
1165
-
1166
- check_fails("<[1]>.respond_to?(:nonexistent?) expected\n" +
1167
- "(Class: <Array>)") do
1168
- assert_predicate([1], :nonexistent?)
1169
- end
1170
- end
1171
-
1172
- def test_assert_not_predicate
1173
- check_nothing_fails do
1174
- assert_not_predicate([1], :empty?)
1175
- end
1176
-
1177
- check_fails("<[]>.empty? is false value expected but was\n<true>") do
1178
- assert_not_predicate([], :empty?)
1179
- end
1180
-
1181
- check_fails("<[]>.respond_to?(:nonexistent?) expected\n" +
1182
- "(Class: <Array>)") do
1183
- assert_not_predicate([], :nonexistent?)
1184
- end
1185
- end
1186
-
1187
- def test_assert_alias_method
1188
- object = Object.new
1189
- class << object
1190
- def original_method
1191
- end
1192
- alias_method :alias_method, :original_method
1193
-
1194
- def other
1195
- end
1196
- end
1197
-
1198
- check_nothing_fails do
1199
- assert_alias_method(object, :alias_method, :original_method)
1200
- end
1201
-
1202
- check_nothing_fails do
1203
- assert_alias_method(object, :original_method, :alias_method)
1204
- end
1205
-
1206
- check_fails("<#{object.method(:other).inspect}> is alias of\n" +
1207
- "<#{object.method(:original_method).inspect}> expected") do
1208
- assert_alias_method(object, :other, :original_method)
1209
- end
1210
-
1211
- inspected_object = AssertionMessage.convert(object)
1212
- check_fails("<#{inspected_object}>.nonexistent doesn't exist\n" +
1213
- "(Class: <Object>)") do
1214
- assert_alias_method(object, :nonexistent, :original_method)
1215
- end
1216
-
1217
- check_fails("<#{inspected_object}>.nonexistent doesn't exist\n" +
1218
- "(Class: <Object>)") do
1219
- assert_alias_method(object, :alias_method, :nonexistent)
1220
- end
1221
- end
1222
-
1223
- def test_assert_path_exist
1224
- check_nothing_fails do
1225
- assert_path_exist(__FILE__)
1226
- end
1227
-
1228
- nonexistent_file = __FILE__ + ".nonexistent"
1229
- check_fails("<#{nonexistent_file.inspect}> expected to exist") do
1230
- assert_path_exist(nonexistent_file)
1231
- end
1232
- end
1233
-
1234
- def test_assert_path_not_exist
1235
- nonexistent_file = __FILE__ + ".nonexistent"
1236
- check_nothing_fails do
1237
- assert_path_not_exist(nonexistent_file)
1238
- end
1239
-
1240
- check_fails("<#{__FILE__.inspect}> expected to not exist") do
1241
- assert_path_not_exist(__FILE__)
1242
- end
1243
- end
1244
- end
1245
-
1246
- class TestAssert < TestCase
1247
- include AssertionCheckable
1248
-
1249
- def test_pass
1250
- check_nothing_fails do
1251
- assert(true)
1252
- end
1253
- end
1254
-
1255
- def test_pass_neither_false_or_nil
1256
- check_nothing_fails do
1257
- assert("a")
1258
- end
1259
- end
1260
-
1261
- def test_pass_with_message
1262
- check_nothing_fails do
1263
- assert(true, "successful assert")
1264
- end
1265
- end
1266
-
1267
- def test_fail_nil
1268
- check_fails("<nil> is not true.") do
1269
- assert(nil)
1270
- end
1271
- end
1272
-
1273
- def test_fail_false
1274
- check_fails("<false> is not true.") do
1275
- assert(false)
1276
- end
1277
- end
1278
-
1279
- def test_fail_false_with_message
1280
- check_fails("failed assert.\n" +
1281
- "<false> is not true.") do
1282
- assert(false, "failed assert")
1283
- end
1284
- end
1285
-
1286
- def test_error_invalid_message
1287
- check_fails("assertion message must be String or Proc: " +
1288
- "<true>(<TrueClass>)") do
1289
- begin
1290
- assert(true, true)
1291
- rescue ArgumentError
1292
- raise AssertionFailedError, $!.message
1293
- end
1294
- end
1295
- end
1296
- end
1297
-
1298
- class TestAssertInDelta < TestCase
1299
- include AssertionCheckable
1300
-
1301
- def test_pass
1302
- check_nothing_fails do
1303
- assert_in_delta(1.4, 1.4, 0)
1304
- end
1305
- end
1306
-
1307
- def test_pass_without_delta
1308
- check_nothing_fails do
1309
- assert_in_delta(1.401, 1.402)
1310
- end
1311
- end
1312
-
1313
- def test_pass_with_message
1314
- check_nothing_fails do
1315
- assert_in_delta(0.5, 0.4, 0.1, "message")
1316
- end
1317
- end
1318
-
1319
- def test_pass_float_like_object
1320
- check_nothing_fails do
1321
- float_thing = Object.new
1322
- def float_thing.to_f
1323
- 0.2
1324
- end
1325
- assert_in_delta(0.1, float_thing, 0.1)
1326
- end
1327
- end
1328
-
1329
- def test_pass_string_expected
1330
- check_nothing_fails do
1331
- assert_in_delta("0.5", 0.4, 0.1)
1332
- end
1333
- end
1334
-
1335
- def test_fail_with_message
1336
- check_fails("message.\n" +
1337
- "<0.5> -/+ <0.05> expected to include\n" +
1338
- "<0.4>.\n" +
1339
- "\n" +
1340
- "Relation:\n" +
1341
- "<<0.4> < <0.5>-<0.05>[0.45] <= <0.5>+<0.05>[0.55]>") do
1342
- assert_in_delta(0.5, 0.4, 0.05, "message")
1343
- end
1344
- end
1345
-
1346
- def test_fail_because_not_float_like_object
1347
- object = Object.new
1348
- inspected_object = AssertionMessage.convert(object)
1349
- check_fails("The arguments must respond to to_f; " +
1350
- "the first float did not.\n" +
1351
- "<#{inspected_object}>.respond_to?(:to_f) expected\n" +
1352
- "(Class: <Object>)") do
1353
- assert_in_delta(object, 0.4, 0.1)
1354
- end
1355
- end
1356
-
1357
- def test_fail_because_negaitve_delta
1358
- check_fails("The delta should not be negative.\n" +
1359
- "<-0.1> expected to be\n>=\n<0.0>.") do
1360
- assert_in_delta(0.5, 0.4, -0.1, "message")
1361
- end
1362
- end
1363
-
1364
- def test_fail_without_delta
1365
- check_fails("<1.402> -/+ <0.001> expected to include\n" +
1366
- "<1.404>.\n" +
1367
- "\n" +
1368
- "Relation:\n" +
1369
- "<" +
1370
- "<1.402>-<0.001>[#{1.402 - 0.001}] <= " +
1371
- "<1.402>+<0.001>[#{1.402 + 0.001}] < " +
1372
- "<1.404>" +
1373
- ">") do
1374
- assert_in_delta(1.402, 1.404)
1375
- end
1376
- end
1377
- end
1378
-
1379
- class TestAssertNotInDelta < Test::Unit::TestCase
1380
- include AssertionCheckable
1381
-
1382
- def test_pass
1383
- check_nothing_fails do
1384
- assert_not_in_delta(1.42, 1.44, 0.01)
1385
- end
1386
- end
1387
-
1388
- def test_pass_without_delta
1389
- check_nothing_fails do
1390
- assert_not_in_delta(1.402, 1.404)
1391
- end
1392
- end
1393
-
1394
- def test_pass_with_message
1395
- check_nothing_fails do
1396
- assert_not_in_delta(0.5, 0.4, 0.09, "message")
1397
- end
1398
- end
1399
-
1400
- def test_pass_float_like_object
1401
- check_nothing_fails do
1402
- float_thing = Object.new
1403
- def float_thing.to_f
1404
- 0.2
1405
- end
1406
- assert_not_in_delta(0.1, float_thing, 0.09)
1407
- end
1408
- end
1409
-
1410
- def test_pass_string_epxected
1411
- check_nothing_fails do
1412
- assert_not_in_delta("0.5", 0.4, 0.09)
1413
- end
1414
- end
1415
-
1416
- def test_fail
1417
- check_fails("<1.4> -/+ <0.11> expected to not include\n" +
1418
- "<1.5>.\n" +
1419
- "\n" +
1420
- "Relation:\n" +
1421
- "<" +
1422
- "<1.4>-<0.11>[#{1.4 - 0.11}] <= " +
1423
- "<1.5> <= " +
1424
- "<1.4>+<0.11>[#{1.4 + 0.11}]" +
1425
- ">") do
1426
- assert_not_in_delta(1.4, 1.5, 0.11)
1427
- end
1428
- end
1429
-
1430
- def test_fail_without_delta
1431
- check_fails("<1.402> -/+ <0.001> expected to not include\n" +
1432
- "<1.4021>.\n" +
1433
- "\n" +
1434
- "Relation:\n" +
1435
- "<" +
1436
- "<1.402>-<0.001>[#{1.402 - 0.001}] <= " +
1437
- "<1.4021> <= " +
1438
- "<1.402>+<0.001>[#{1.402 + 0.001}]" +
1439
- ">") do
1440
- assert_not_in_delta(1.402, 1.4021)
1441
- end
1442
- end
1443
-
1444
- def test_fail_with_message
1445
- check_fails("message.\n" +
1446
- "<0.5> -/+ <0.11> expected to not include\n" +
1447
- "<0.4>.\n" +
1448
- "\n" +
1449
- "Relation:\n" +
1450
- "<" +
1451
- "<0.5>-<0.11>[0.39] <= " +
1452
- "<0.4> <= " +
1453
- "<0.5>+<0.11>[0.61]" +
1454
- ">") do
1455
- assert_not_in_delta(0.5, 0.4, 0.11, "message")
1456
- end
1457
- end
1458
-
1459
- def test_fail_because_not_float_like_object
1460
- object = Object.new
1461
- inspected_object = AssertionMessage.convert(object)
1462
- check_fails("The arguments must respond to to_f; " +
1463
- "the first float did not.\n" +
1464
- "<#{inspected_object}>.respond_to?(:to_f) expected\n" +
1465
- "(Class: <Object>)") do
1466
- assert_not_in_delta(object, 0.4, 0.1)
1467
- end
1468
- end
1469
-
1470
- def test_fail_because_negaitve_delta
1471
- check_fails("The delta should not be negative.\n" +
1472
- "<-0.11> expected to be\n>=\n<0.0>.") do
1473
- assert_not_in_delta(0.5, 0.4, -0.11, "message")
1474
- end
1475
- end
1476
- end
1477
-
1478
- class TestAssertInEpsilon < TestCase
1479
- include AssertionCheckable
1480
-
1481
- def test_pass
1482
- check_nothing_fails do
1483
- assert_in_epsilon(10000, 9000, 0.1)
1484
- end
1485
- end
1486
-
1487
- def test_pass_without_epsilon
1488
- check_nothing_fails do
1489
- assert_in_epsilon(10000, 9991)
1490
- end
1491
- end
1492
-
1493
- def test_pass_with_message
1494
- check_nothing_fails do
1495
- assert_in_epsilon(10000, 9000, 0.1, "message")
1496
- end
1497
- end
1498
-
1499
- def test_pass_float_like_object
1500
- check_nothing_fails do
1501
- float_thing = Object.new
1502
- def float_thing.to_f
1503
- 9000.0
1504
- end
1505
- assert_in_epsilon(10000, float_thing, 0.1)
1506
- end
1507
- end
1508
-
1509
- def test_pass_string_expected
1510
- check_nothing_fails do
1511
- assert_in_epsilon("10000", 9000, 0.1)
1512
- end
1513
- end
1514
-
1515
- def test_fail_with_message
1516
- check_fails("message.\n" +
1517
- "<10000> -/+ (<10000> * <0.1>)[1000.0] " +
1518
- "expected to include\n" +
1519
- "<8999>.\n" +
1520
- "\n" +
1521
- "Relation:\n" +
1522
- "<" +
1523
- "<8999> < " +
1524
- "<10000>-(<10000>*<0.1>)[9000.0] <= " +
1525
- "<10000>+(<10000>*<0.1>)[11000.0]" +
1526
- ">") do
1527
- assert_in_epsilon(10000, 8999, 0.1, "message")
1528
- end
1529
- end
1530
-
1531
- def test_fail_because_not_float_like_object
1532
- object = Object.new
1533
- inspected_object = AssertionMessage.convert(object)
1534
- check_fails("The arguments must respond to to_f; " +
1535
- "the first float did not.\n" +
1536
- "<#{inspected_object}>.respond_to?(:to_f) expected\n" +
1537
- "(Class: <Object>)") do
1538
- assert_in_epsilon(object, 9000, 0.1)
1539
- end
1540
- end
1541
-
1542
- def test_fail_because_negaitve_epsilon
1543
- check_fails("The epsilon should not be negative.\n" +
1544
- "<-0.1> expected to be\n>=\n<0.0>.") do
1545
- assert_in_epsilon(10000, 9000, -0.1, "message")
1546
- end
1547
- end
1548
-
1549
- def test_fail_without_epsilon
1550
- check_fails("<10000> -/+ (<10000> * <0.001>)[10.0] " +
1551
- "expected to include\n" +
1552
- "<10011>.\n" +
1553
- "\n" +
1554
- "Relation:\n" +
1555
- "<" +
1556
- "<10000>-(<10000>*<0.001>)[9990.0] <= " +
1557
- "<10000>+(<10000>*<0.001>)[10010.0] < " +
1558
- "<10011>" +
1559
- ">") do
1560
- assert_in_epsilon(10000, 10011)
1561
- end
1562
- end
1563
- end
1564
-
1565
- class TestAssertNotInEpsilon < Test::Unit::TestCase
1566
- include AssertionCheckable
1567
-
1568
- def test_pass
1569
- check_nothing_fails do
1570
- assert_not_in_epsilon(10000, 8999, 0.1)
1571
- end
1572
- end
1573
-
1574
- def test_pass_without_epsilon
1575
- check_nothing_fails do
1576
- assert_not_in_epsilon(10000, 9989)
1577
- end
1578
- end
1579
-
1580
- def test_pass_with_message
1581
- check_nothing_fails do
1582
- assert_not_in_epsilon(10000, 8999, 0.1, "message")
1583
- end
1584
- end
1585
-
1586
- def test_pass_float_like_object
1587
- check_nothing_fails do
1588
- float_thing = Object.new
1589
- def float_thing.to_f
1590
- 8999.0
1591
- end
1592
- assert_not_in_epsilon(10000, float_thing, 0.1)
1593
- end
1594
- end
1595
-
1596
- def test_pass_string_epxected
1597
- check_nothing_fails do
1598
- assert_not_in_epsilon("10000", 8999, 0.1)
1599
- end
1600
- end
1601
-
1602
- def test_fail
1603
- check_fails("<10000> -/+ (<10000> * <0.1>)[1000.0] " +
1604
- "expected to not include\n" +
1605
- "<9000>.\n" +
1606
- "\n" +
1607
- "Relation:\n" +
1608
- "<" +
1609
- "<10000>-(<10000>*<0.1>)[9000.0] <= " +
1610
- "<9000> <= " +
1611
- "<10000>+(<10000>*<0.1>)[11000.0]" +
1612
- ">") do
1613
- assert_not_in_epsilon(10000, 9000, 0.1)
1614
- end
1615
- end
1616
-
1617
- def test_fail_without_epsilon
1618
- check_fails("<10000> -/+ (<10000> * <0.001>)[10.0] " +
1619
- "expected to not include\n" +
1620
- "<9990>.\n" +
1621
- "\n" +
1622
- "Relation:\n" +
1623
- "<" +
1624
- "<10000>-(<10000>*<0.001>)[9990.0] <= " +
1625
- "<9990> <= " +
1626
- "<10000>+(<10000>*<0.001>)[10010.0]" +
1627
- ">") do
1628
- assert_not_in_epsilon(10000, 9990)
1629
- end
1630
- end
1631
-
1632
- def test_fail_with_message
1633
- check_fails("message.\n" +
1634
- "<10000> -/+ (<10000> * <0.1>)[1000.0] " +
1635
- "expected to not include\n" +
1636
- "<9000>.\n" +
1637
- "\n" +
1638
- "Relation:\n" +
1639
- "<" +
1640
- "<10000>-(<10000>*<0.1>)[9000.0] <= " +
1641
- "<9000> <= " +
1642
- "<10000>+(<10000>*<0.1>)[11000.0]" +
1643
- ">") do
1644
- assert_not_in_epsilon(10000, 9000, 0.1, "message")
1645
- end
1646
- end
1647
-
1648
- def test_fail_because_not_float_like_object
1649
- object = Object.new
1650
- inspected_object = AssertionMessage.convert(object)
1651
- check_fails("The arguments must respond to to_f; " +
1652
- "the first float did not.\n" +
1653
- "<#{inspected_object}>.respond_to?(:to_f) expected\n" +
1654
- "(Class: <Object>)") do
1655
- assert_not_in_epsilon(object, 9000, 0.1)
1656
- end
1657
- end
1658
-
1659
- def test_fail_because_negaitve_epsilon
1660
- check_fails("The epsilon should not be negative.\n" +
1661
- "<-0.1> expected to be\n>=\n<0.0>.") do
1662
- assert_not_in_epsilon(10000, 9000, -0.1, "message")
1663
- end
1664
- end
1665
- end
1666
-
1667
- class TestAssertInclude < Test::Unit::TestCase
1668
- include AssertionCheckable
1669
-
1670
- def test_pass
1671
- check_nothing_fails do
1672
- assert_include([1, 2, 3], 1)
1673
- end
1674
- end
1675
-
1676
- def test_pass_with_message
1677
- check_nothing_fails do
1678
- assert_include([1, 2, 3], 1, "message")
1679
- end
1680
- end
1681
-
1682
- def test_fail
1683
- check_fails("<[1, 2, 3]> expected to include\n" +
1684
- "<4>.") do
1685
- assert_include([1, 2, 3], 4)
1686
- end
1687
- end
1688
-
1689
- def test_fail_with_message
1690
- check_fails("message.\n" +
1691
- "<[1, 2, 3]> expected to include\n" +
1692
- "<4>.") do
1693
- assert_include([1, 2, 3], 4, "message")
1694
- end
1695
- end
1696
-
1697
- def test_fail_because_not_collection_like_object
1698
- object = Object.new
1699
- inspected_object = AssertionMessage.convert(object)
1700
- check_fails("The collection must respond to :include?.\n" +
1701
- "<#{inspected_object}>.respond_to?(:include?) expected\n" +
1702
- "(Class: <Object>)") do
1703
- assert_include(object, 1)
1704
- end
1705
- end
1706
- end
1707
-
1708
- class TestAssertNotInclude < Test::Unit::TestCase
1709
- include AssertionCheckable
1710
-
1711
- def test_pass
1712
- check_nothing_fails do
1713
- assert_not_include([1, 2, 3], 5)
1714
- end
1715
- end
1716
-
1717
- def test_pass_with_message
1718
- check_nothing_fails do
1719
- assert_not_include([1, 2, 3], 5, "message")
1720
- end
1721
- end
1722
-
1723
- def test_fail
1724
- check_fails("<[1, 2, 3]> expected to not include\n" +
1725
- "<2>.") do
1726
- assert_not_include([1, 2, 3], 2)
1727
- end
1728
- end
1729
-
1730
- def test_fail_with_message
1731
- check_fails("message.\n" +
1732
- "<[1, 2, 3]> expected to not include\n" +
1733
- "<2>.") do
1734
- assert_not_include([1, 2, 3], 2, "message")
1735
- end
1736
- end
1737
-
1738
- def test_fail_because_not_collection_like_object
1739
- object = Object.new
1740
- inspected_object = AssertionMessage.convert(object)
1741
- check_fails("The collection must respond to :include?.\n" +
1742
- "<#{inspected_object}>.respond_to?(:include?) expected\n" +
1743
- "(Class: <Object>)") do
1744
- assert_not_include(object, 1)
1745
- end
1746
- end
1747
- end
1748
-
1749
- class TestAssertEmpty < Test::Unit::TestCase
1750
- include AssertionCheckable
1751
-
1752
- def test_pass
1753
- check_nothing_fails do
1754
- assert_empty([])
1755
- end
1756
- end
1757
-
1758
- def test_pass_with_message
1759
- check_nothing_fails do
1760
- assert_empty([], "message")
1761
- end
1762
- end
1763
-
1764
- def test_fail
1765
- check_fails("<[1]> expected to be empty.") do
1766
- assert_empty([1])
1767
- end
1768
- end
1769
-
1770
- def test_fail_with_message
1771
- check_fails("message.\n" +
1772
- "<[1]> expected to be empty.") do
1773
- assert_empty([1], "message")
1774
- end
1775
- end
1776
-
1777
- def test_fail_because_no_empty_method
1778
- object = Object.new
1779
- inspected_object = AssertionMessage.convert(object)
1780
- check_fails("The object must respond to :empty?.\n" +
1781
- "<#{inspected_object}>.respond_to?(:empty?) expected\n" +
1782
- "(Class: <Object>)") do
1783
- assert_empty(object)
1784
- end
1785
- end
1786
- end
1787
-
1788
- class TestAssertNotEmpty < Test::Unit::TestCase
1789
- include AssertionCheckable
1790
-
1791
- def test_pass
1792
- check_nothing_fails do
1793
- assert_not_empty([1])
1794
- end
1795
- end
1796
-
1797
- def test_pass_with_message
1798
- check_nothing_fails do
1799
- assert_not_empty([1], "message")
1800
- end
1801
- end
1802
-
1803
- def test_fail
1804
- check_fails("<[]> expected to not be empty.") do
1805
- assert_not_empty([])
1806
- end
1807
- end
1808
-
1809
- def test_fail_with_message
1810
- check_fails("message.\n" +
1811
- "<[]> expected to not be empty.") do
1812
- assert_not_empty([], "message")
1813
- end
1814
- end
1815
-
1816
- def test_fail_because_no_empty_method
1817
- object = Object.new
1818
- inspected_object = AssertionMessage.convert(object)
1819
- check_fails("The object must respond to :empty?.\n" +
1820
- "<#{inspected_object}>.respond_to?(:empty?) expected\n" +
1821
- "(Class: <Object>)") do
1822
- assert_not_empty(object)
1823
- end
1824
- end
1825
- end
1826
-
1827
- class TestAssertNotSend < Test::Unit::TestCase
1828
- include AssertionCheckable
1829
-
1830
- def test_pass
1831
- check_nothing_fails do
1832
- assert_not_send([[1, 2], :member?, 4], "message")
1833
- end
1834
- end
1835
-
1836
- def test_fail
1837
- expected_message = <<-EOM
1838
- message.
1839
- <[1, 2]> expected to respond to
1840
- <member?(*[2])> with not a true value but was
1841
- <true>.
1842
- EOM
1843
- check_fails(expected_message.chomp) do
1844
- assert_not_send([[1, 2], :member?, 2], "message")
1845
- end
1846
- end
1847
- end
1848
- end
1849
- end