doc/classes/CacheAndCollections.src/M000007.html in ripxplore-0.0.2 vs doc/classes/CacheAndCollections.src/M000007.html in ripxplore-0.4.0

- old
+ new

@@ -3,20 +3,24 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> - <title>test_random_filecache (CacheAndCollections)</title> + <title>test_native_image_cache (CacheAndCollections)</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> </head> <body class="standalone-code"> - <pre><span class="ruby-comment cmt"># File test/tc_cache_and_collections.rb, line 24</span> - <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_random_filecache</span> - <span class="ruby-identifier">file_cache</span>.<span class="ruby-identifier">make_file_system_image_list</span> - <span class="ruby-identifier">assert_not_nil</span>(<span class="ruby-identifier">file_cache</span>.<span class="ruby-identifier">file_system_image_urls_in_cache</span>) - <span class="ruby-identifier">assert_not_nil</span>(<span class="ruby-identifier">file_cache</span>.<span class="ruby-identifier">random_file_system_image</span>) - <span class="ruby-identifier">assert_not_equal</span>(<span class="ruby-value">0</span>,<span class="ruby-identifier">file_cache</span>.<span class="ruby-identifier">random_file_system_image</span>(<span class="ruby-identifier">:pictures</span>).<span class="ruby-identifier">pictures</span>) - <span class="ruby-identifier">assert_not_equal</span>(<span class="ruby-value">0</span>,<span class="ruby-identifier">file_cache</span>.<span class="ruby-identifier">random_file_system_image</span>(<span class="ruby-identifier">:texts</span>).<span class="ruby-identifier">texts</span>) + <pre><span class="ruby-comment cmt"># File test/tc_cache_and_collections.rb, line 12</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_native_image_cache</span> + <span class="ruby-identifier">url</span>=<span class="ruby-value str">&quot;http://mirrors.apple2.org.za/ftp.apple.asimov.net/images/graphics/printshop/Print%20Shop%20Graphics%20Library%20-%20Volume%201%20-%20Back.dsk&quot;</span> + <span class="ruby-identifier">image_file</span>=<span class="ruby-identifier">file_cache</span>.<span class="ruby-identifier">get_file_system_image</span>(<span class="ruby-identifier">url</span>) + <span class="ruby-identifier">native_file</span>=<span class="ruby-identifier">image_file</span>.<span class="ruby-identifier">pictures</span>[<span class="ruby-value">0</span>] + <span class="ruby-identifier">file_cache</span>.<span class="ruby-identifier">purge_native_file_from_cache</span>(<span class="ruby-identifier">native_file</span>) + <span class="ruby-identifier">cached_native_file_filename</span>=<span class="ruby-identifier">file_cache</span>.<span class="ruby-identifier">cache_name_for_native_file</span>(<span class="ruby-identifier">native_file</span>,<span class="ruby-value str">'png'</span>) + <span class="ruby-identifier">assert</span>(<span class="ruby-operator">!</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>( <span class="ruby-identifier">cached_native_file_filename</span>),<span class="ruby-value str">&quot;purging native file from cache should remove file from disk&quot;</span>) + <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">cached_native_file_filename</span>,<span class="ruby-identifier">file_cache</span>.<span class="ruby-identifier">force_native_file_to_cache</span>(<span class="ruby-identifier">native_file</span>,<span class="ruby-identifier">:to_picture</span>,<span class="ruby-value str">'png'</span>),<span class="ruby-value str">&quot;force_native_file_to_cache should return path of cached file when it DOES write to disk&quot;</span>) + <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">cached_native_file_filename</span>,<span class="ruby-identifier">file_cache</span>.<span class="ruby-identifier">force_native_file_to_cache</span>(<span class="ruby-identifier">native_file</span>,<span class="ruby-identifier">:to_picture</span>,<span class="ruby-value str">'png'</span>),<span class="ruby-value str">&quot;force_native_file_to_cache should return path of cached file when it DOES NOT write to disk&quot;</span>) + <span class="ruby-identifier">assert</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">cached_native_file_filename</span>),<span class="ruby-node">&quot;forcing native file to native file cache should result in #{cached_native_file_filename} existing on disk&quot;</span>) <span class="ruby-keyword kw">end</span></pre> </body> </html> \ No newline at end of file