root/lang/ruby/ruwin/test/helper.rb @ 29088

Revision 29052, 0.6 kB (checked in by isaisstillalive, 5 years ago)
  • テスト用のDummyMSGを各所で定義してたので一本化
Line 
1GC.disable
2
3$LOAD_PATH << File.expand_path(File.join(File.dirname(__FILE__), "..", "lib"))
4$LOAD_PATH << File.expand_path(File.join(File.dirname(__FILE__)))
5
6require "test/unit"
7require "ruwin"
8
9class HiddenWindow < Ruwin::Window
10  STYLE = 0
11  width  0
12  height 0
13end
14
15class Ruwin::Component
16  def message_log
17    @message_log ||= []
18  end
19  def sendMessage *args
20    message_log << args.map{|v| v.dup rescue v }
21    super
22  end
23 
24  def move_log
25    @move_log ||= []
26  end
27  def move *args
28    move_log << args
29    super
30  end
31end
32
33DummyMSG = Struct.new(:hWnd, :msg, :wParam, :lParam, :retval)
Note: See TracBrowser for help on using the browser.