| Class | RS::Test::RSTestStress |
| In: |
rsil/test/rsteststress.rb
|
| Parent: | Test::Unit::TestCase |
| Class: | RSTestStress |
| File: | rsteststress.rb |
| Purpose: | RSTestStress includes methods to stress-test RSIL. |
| Created by: | Mario Pehle, 2006/06/04 |
| Required modules: | Test::Unit |
| Offers functions: | - |
| Description: | Calls garbage collector. |
| Precondition: | - |
| Postcondition: | - |
| Exceptions: | - |
| Uses: | GC#start |
| Returns: | nil |
| Parameters: | Name | i/o/io | default | Meaning |
# File rsil/test/rsteststress.rb, line 49
49: def teardown
50: GC.start
51: end
| Description: | Does a stress test on RSIL. |
| Precondition: | - |
| Postcondition: | - |
| Exceptions: | - |
| Uses: | RS::Graphics::RSFilter, RS::Graphics::RSImage |
| Returns: | (not save) |
| Parameters: | Name | i/o/io | default | Meaning |
# File rsil/test/rsteststress.rb, line 65
65: def test_stress_rsimage
66: script_dir, script_name = File.split(File.expand_path(__FILE__))
67: bytes = File.read script_dir + '/logo.gif'
68: filter = RS::Graphics::RSFilter.new 'CISepiaTone'
69: filter.set_defaults
70: 5.times do
71: # Thread.new do
72: rsimage = RS::Graphics::RSImage.new
73: rsimage.bytes = bytes
74: filter.inputImage = rsimage.objc_object
75: rsimage.apply_filters! filter
76: rsimage.bytes
77: # end
78: end
79: # rsimage = RS::Graphics::RSImage.new 'testfiles/large.jpg'
80: # filter = RS::Graphics::RSFilter.new 'CILineScreen'
81: # filter.set_defaults
82: # rsimage.apply_filters! filter
83: # rsimage.save 'testfiles/large_filtered.jpg'
84: end