WIP: fixed unit tests for Qt-less build.

This commit is contained in:
Matthias Koefferlein
2018-07-10 01:17:35 +02:00
parent 58fd6ed143
commit d2c890ab6d
21 changed files with 585 additions and 458 deletions
+26 -10
View File
@@ -27,6 +27,10 @@ class LAYMenuTest_TestClass < TestBase
def test_0
if !RBA.constants.member?(:Action)
return
end
a = RBA::Action::new
b = a.dup
@@ -94,6 +98,10 @@ class LAYMenuTest_TestClass < TestBase
def test_1
if !RBA.constants.member?(:Application)
return
end
app = RBA::Application.instance
mw = app.main_window
menu = mw.menu
@@ -261,21 +269,29 @@ RESULT
end
class MenuHandler < RBA::Action
def initialize( t, k, &action )
self.title = t
self.shortcut = k
@action = action
if RBA.constants.member?(:Action)
class MenuHandler < RBA::Action
def initialize( t, k, &action )
self.title = t
self.shortcut = k
@action = action
end
def triggered
@action.call( self )
end
private
@action
end
def triggered
@action.call( self )
end
private
@action
end
def test_2
if !RBA.constants.member?(:Application)
return
end
app = RBA::Application.instance
mw = app.main_window
menu = mw.menu