class ClutterBrightnessContrastEffectTest

Copyright (C) 2014 Ruby-GNOME2 Project Team

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Public Instance Methods

setup() click to toggle source
# File clutter/test/test-clutter-brightness-contrast-effect.rb, line 20
def setup
  @effect = Clutter::BrightnessContrastEffect.new
end
test_brightness() click to toggle source
# File clutter/test/test-clutter-brightness-contrast-effect.rb, line 24
def test_brightness
  brightness = 127
  @effect.brightness = brightness
  assert_equal([brightness, brightness, brightness],
               @effect.brightness)
end
test_brightness_rgb_params() click to toggle source
# File clutter/test/test-clutter-brightness-contrast-effect.rb, line 31
def test_brightness_rgb_params
  brightness_red = 120
  brightness_green = 200
  brightness_blue = 250
  @effect.set_brightness(brightness_red, brightness_green,
                         brightness_blue)
  assert_equal([brightness_red, brightness_green, brightness_blue],
               @effect.brightness)
end
test_contrast() click to toggle source
# File clutter/test/test-clutter-brightness-contrast-effect.rb, line 41
def test_contrast
  contrast = 127
  @effect.contrast = contrast
  assert_equal([contrast, contrast, contrast],
               @effect.contrast)
end
test_contrast_rgb_params() click to toggle source
# File clutter/test/test-clutter-brightness-contrast-effect.rb, line 48
def test_contrast_rgb_params
  contrast_red = 250
  contrast_green = 120
  contrast_blue = 100
  @effect.set_contrast(contrast_red, contrast_green, contrast_blue)
  assert_equal([contrast_red, contrast_green, contrast_blue],
               @effect.contrast)
end