Changeset 28914
- Timestamp:
- 01/23/09 16:53:23 (4 years ago)
- Location:
- lang/ruby/ruwin
- Files:
-
- 2 modified
-
lib/ruwin/control.rb (modified) (2 diffs)
-
test/ruwin/test_control.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/ruby/ruwin/lib/ruwin/control.rb
r28911 r28914 10 10 :bottom => nil, 11 11 :width => nil, 12 :height => nil 12 :height => nil, 13 :font => nil 13 14 14 15 def initialize … … 16 17 move @proparty[:left]||0, @proparty[:top]||0, @proparty[:width]||0, @proparty[:height]||0 17 18 end 19 self.font = @proparty[:font] if @proparty[:font] 18 20 end 19 21 -
lang/ruby/ruwin/test/ruwin/test_control.rb
r28911 r28914 75 75 76 76 77 %w{left top right bottom width height }.each do |property|77 %w{left top right bottom width height font}.each do |property| 78 78 class_eval <<-"END" 79 79 def test_#{property} … … 115 115 assert_equal font, instance.font 116 116 end 117 118 def test_font_property 119 klass = Class.new(Ruwin::Control) 120 klass.class_eval %{CLASS_NAME = "EDIT"} 121 122 expected_font = Ruwin::Font.new "MS GOTHIC", 13 123 klass.class_eval do 124 font expected_font 125 end 126 127 window = HiddenWindow.new 128 instance = klass.new(window) 129 130 assert_equal expected_font.params, instance.font.params 131 end 117 132 end
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)