mirror of
https://github.com/KLayout/klayout.git
synced 2026-09-01 18:37:50 +02:00
WIP: fixed unit tests for Qt-less build.
This commit is contained in:
Vendored
+26
-10
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user