Ignore:
Timestamp:
Sep 27, 2008, 4:11:36 PM (12 years ago)
Author:
Sam Hocevar
Message:

Continuing the libcucul-libcaca merge.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/ruby/t/tc_dither.rb

    r2008 r2822  
    11require 'test/unit'
    2 require 'cucul'
     2require 'caca'
    33
    44class TC_Canvas < Test::Unit::TestCase
    55    def test_create
    66        assert_nothing_raised {
    7             d = Cucul::Dither.new(8, 32, 32, 32, 0, 0, 0, 0)
     7            d = Caca::Dither.new(8, 32, 32, 32, 0, 0, 0, 0)
    88        }
    99    end
    1010    def test_fail_create
    1111        assert_raise(RuntimeError) {
    12             d = Cucul::Dither.new(-1, 32, 32, 32, 0, 0, 0, 0)
     12            d = Caca::Dither.new(-1, 32, 32, 32, 0, 0, 0, 0)
    1313        }
    1414    end
    1515    def test_set_palette
    1616        assert_nothing_raised {
    17             d = Cucul::Dither.new(8, 32, 32, 32, 0, 0, 0, 0)
     17            d = Caca::Dither.new(8, 32, 32, 32, 0, 0, 0, 0)
    1818            d.palette=[[0xfff, 0xfff, 0xfff, 0xfff]]*256
    1919        }
     
    2121    def test_fail_set_palette
    2222        assert_raise(ArgumentError) {
    23             d = Cucul::Dither.new(8, 32, 32, 32, 0, 0, 0, 0)
     23            d = Caca::Dither.new(8, 32, 32, 32, 0, 0, 0, 0)
    2424            d.palette=[]
    2525        }
     
    2727    def test_fail_set_palette2
    2828        assert_raise(RuntimeError) {
    29             d = Cucul::Dither.new(8, 32, 32, 32, 0, 0, 0, 0)
     29            d = Caca::Dither.new(8, 32, 32, 32, 0, 0, 0, 0)
    3030            d.palette=[[0xffff, 0, 0, 0]]*256
    3131        }
     
    3333    def test_set_brightness
    3434        assert_nothing_raised {
    35             d = Cucul::Dither.new(8, 32, 32, 32, 0, 0, 0, 0)
     35            d = Caca::Dither.new(8, 32, 32, 32, 0, 0, 0, 0)
    3636            d.brightness=0.5
    3737        }
     
    3939    def test_set_gamma
    4040        assert_nothing_raised {
    41             d = Cucul::Dither.new(8, 32, 32, 32, 0, 0, 0, 0)
     41            d = Caca::Dither.new(8, 32, 32, 32, 0, 0, 0, 0)
    4242            d.gamma=0.5
    4343        }
     
    4545    def test_set_contrast
    4646        assert_nothing_raised {
    47             d = Cucul::Dither.new(8, 32, 32, 32, 0, 0, 0, 0)
     47            d = Caca::Dither.new(8, 32, 32, 32, 0, 0, 0, 0)
    4848            d.contrast=0.5
    4949        }
Note: See TracChangeset for help on using the changeset viewer.