Changeset 2822 for libcaca/trunk/ruby/t/tc_dither.rb
- Timestamp:
- Sep 27, 2008, 4:11:36 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/ruby/t/tc_dither.rb
r2008 r2822 1 1 require 'test/unit' 2 require 'c ucul'2 require 'caca' 3 3 4 4 class TC_Canvas < Test::Unit::TestCase 5 5 def test_create 6 6 assert_nothing_raised { 7 d = C ucul::Dither.new(8, 32, 32, 32, 0, 0, 0, 0)7 d = Caca::Dither.new(8, 32, 32, 32, 0, 0, 0, 0) 8 8 } 9 9 end 10 10 def test_fail_create 11 11 assert_raise(RuntimeError) { 12 d = C ucul::Dither.new(-1, 32, 32, 32, 0, 0, 0, 0)12 d = Caca::Dither.new(-1, 32, 32, 32, 0, 0, 0, 0) 13 13 } 14 14 end 15 15 def test_set_palette 16 16 assert_nothing_raised { 17 d = C ucul::Dither.new(8, 32, 32, 32, 0, 0, 0, 0)17 d = Caca::Dither.new(8, 32, 32, 32, 0, 0, 0, 0) 18 18 d.palette=[[0xfff, 0xfff, 0xfff, 0xfff]]*256 19 19 } … … 21 21 def test_fail_set_palette 22 22 assert_raise(ArgumentError) { 23 d = C ucul::Dither.new(8, 32, 32, 32, 0, 0, 0, 0)23 d = Caca::Dither.new(8, 32, 32, 32, 0, 0, 0, 0) 24 24 d.palette=[] 25 25 } … … 27 27 def test_fail_set_palette2 28 28 assert_raise(RuntimeError) { 29 d = C ucul::Dither.new(8, 32, 32, 32, 0, 0, 0, 0)29 d = Caca::Dither.new(8, 32, 32, 32, 0, 0, 0, 0) 30 30 d.palette=[[0xffff, 0, 0, 0]]*256 31 31 } … … 33 33 def test_set_brightness 34 34 assert_nothing_raised { 35 d = C ucul::Dither.new(8, 32, 32, 32, 0, 0, 0, 0)35 d = Caca::Dither.new(8, 32, 32, 32, 0, 0, 0, 0) 36 36 d.brightness=0.5 37 37 } … … 39 39 def test_set_gamma 40 40 assert_nothing_raised { 41 d = C ucul::Dither.new(8, 32, 32, 32, 0, 0, 0, 0)41 d = Caca::Dither.new(8, 32, 32, 32, 0, 0, 0, 0) 42 42 d.gamma=0.5 43 43 } … … 45 45 def test_set_contrast 46 46 assert_nothing_raised { 47 d = C ucul::Dither.new(8, 32, 32, 32, 0, 0, 0, 0)47 d = Caca::Dither.new(8, 32, 32, 32, 0, 0, 0, 0) 48 48 d.contrast=0.5 49 49 }
Note: See TracChangeset
for help on using the changeset viewer.