Changeset 28664

Show
Ignore:
Timestamp:
01/19/09 21:14:02 (4 years ago)
Author:
isaisstillalive
Message:
  • ListBox?、ComboBoxの外観のテストを記述。
Location:
lang/ruby/ruwin
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • lang/ruby/ruwin/lib/ruwin/combo_box.rb

    r28652 r28664  
    2525     
    2626    class Dropdown < ComboBox 
     27      STYLE = superclass::STYLE|CBS_DROPDOWN 
    2728    end 
    2829  end 
  • lang/ruby/ruwin/test/ruwin/test_combo_box.rb

    r28652 r28664  
    55 
    66class TestRuwinComboBox < Test::Unit::TestCase 
     7  include Ruwin::Const::ComboBox 
    78  include TestModuleListBox 
    89  TARGET_CLASS = Ruwin::ComboBox 
     
    1112    assert_equal "COMBOBOX", @listbox.classname 
    1213  end 
     14   
     15  def test_style 
     16    assert_equal CBS_SIMPLE, (@listbox.style&CBS_SIMPLE) 
     17  end 
    1318end 
    1419 
    1520class TestRuwinComboBoxDropdown < Test::Unit::TestCase 
     21  include Ruwin::Const::ComboBox 
    1622  include TestModuleListBox 
    1723  TARGET_CLASS = Ruwin::ComboBox::Dropdown 
     
    2026    assert_equal "COMBOBOX", @listbox.classname 
    2127  end 
     28   
     29  def test_style 
     30    assert_equal CBS_DROPDOWN, (@listbox.style&CBS_DROPDOWN) 
     31  end 
    2232end 
  • lang/ruby/ruwin/test/ruwin/test_list_box.rb

    r28652 r28664  
    7676 
    7777class TestRuwinListBox < Test::Unit::TestCase 
     78  include Ruwin::Const::ListBox 
    7879  include TestModuleListBoxList 
    7980  TARGET_CLASS = Ruwin::ListBox 
     
    8283    assert_equal "LISTBOX", @listbox.classname 
    8384  end 
     85   
     86  def test_style 
     87    assert_equal 0, (@listbox.style&LBS_MULTIPLESEL) 
     88  end 
    8489end 
    8590 
    8691class TestRuwinListBoxDropdown < Test::Unit::TestCase 
     92  include Ruwin::Const::ComboBox 
    8793  include TestModuleListBoxList 
    8894  TARGET_CLASS = Ruwin::ListBox::Dropdown 
     
    9197    assert_equal "COMBOBOX", @listbox.classname 
    9298  end 
     99   
     100  def test_style 
     101    assert_equal CBS_DROPDOWNLIST, (@listbox.style&CBS_DROPDOWNLIST) 
     102  end 
    93103end 
    94104 
    95105class TestRuwinListBoxMultiple < Test::Unit::TestCase 
     106  include Ruwin::Const::ListBox 
    96107  include TestModuleListBox 
    97108  TARGET_CLASS = Ruwin::ListBox::Multiple 
     
    99110  def test_classname 
    100111    assert_equal "LISTBOX", @listbox.classname 
     112  end 
     113   
     114  def test_style 
     115    assert_equal LBS_MULTIPLESEL, (@listbox.style&LBS_MULTIPLESEL) 
    101116  end 
    102117