mirror of https://github.com/KLayout/klayout.git
Fixing tests for non-Qt builds
This commit is contained in:
parent
cd34125b0c
commit
7997d1375c
|
|
@ -37,19 +37,22 @@ class PluginFactory < RBA::PluginFactory
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class Plugin2EditorOptionsPage < RBA::EditorOptionsPage
|
has_qt = RBA.constants.member?(:EditorOptionsPage) && RBA.constants.member?(:MainWindow)
|
||||||
|
if has_qt
|
||||||
|
|
||||||
|
class Plugin2EditorOptionsPage < RBA::EditorOptionsPage
|
||||||
def initialize
|
def initialize
|
||||||
super("title", 1)
|
super("title", 1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class Plugin2ConfigPage < RBA::ConfigPage
|
class Plugin2ConfigPage < RBA::ConfigPage
|
||||||
def initialize
|
def initialize
|
||||||
super("title")
|
super("title")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class Plugin2 < RBA::Plugin
|
class Plugin2 < RBA::Plugin
|
||||||
def set_tp(tp)
|
def set_tp(tp)
|
||||||
@tp = tp
|
@tp = tp
|
||||||
end
|
end
|
||||||
|
|
@ -59,9 +62,9 @@ class Plugin2 < RBA::Plugin
|
||||||
def tracking_position
|
def tracking_position
|
||||||
@tp || RBA::DPoint::new
|
@tp || RBA::DPoint::new
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class PluginFactory2 < RBA::PluginFactory
|
class PluginFactory2 < RBA::PluginFactory
|
||||||
def initialize()
|
def initialize()
|
||||||
@ep = 0
|
@ep = 0
|
||||||
@cp = 0
|
@cp = 0
|
||||||
|
|
@ -89,9 +92,9 @@ class PluginFactory2 < RBA::PluginFactory
|
||||||
def cp
|
def cp
|
||||||
@cp
|
@cp
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class LayPlugin_TestClass < TestBase
|
class LayPlugin_TestClass < TestBase
|
||||||
|
|
||||||
def test_1
|
def test_1
|
||||||
|
|
||||||
|
|
@ -172,6 +175,14 @@ class LayPlugin_TestClass < TestBase
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
# at least one test is needed
|
||||||
|
class LayPlugin_TestClass < TestBase
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
load("test_epilogue.rb")
|
load("test_epilogue.rb")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue