mirror of https://github.com/KLayout/klayout.git
Refactoring: moved unit tests to libraries for some other libs
This commit is contained in:
parent
000917d2c9
commit
79811994f6
|
|
@ -83,16 +83,19 @@ TEST(6)
|
|||
|
||||
TEST(7)
|
||||
{
|
||||
test_is_long_runner ();
|
||||
run_test (_this, "pcb-1");
|
||||
}
|
||||
|
||||
TEST(8)
|
||||
{
|
||||
test_is_long_runner ();
|
||||
run_test (_this, "microchip-2");
|
||||
}
|
||||
|
||||
TEST(9)
|
||||
{
|
||||
test_is_long_runner ();
|
||||
run_test (_this, "microchip-3");
|
||||
}
|
||||
|
||||
|
|
@ -118,6 +121,7 @@ TEST(13)
|
|||
|
||||
TEST(14)
|
||||
{
|
||||
test_is_long_runner ();
|
||||
run_test (_this, "gerbv_examples/amacro-ref");
|
||||
}
|
||||
|
||||
|
|
@ -128,6 +132,7 @@ TEST(15)
|
|||
|
||||
TEST(16)
|
||||
{
|
||||
test_is_long_runner ();
|
||||
run_test (_this, "gerbv_examples/protel-pnp");
|
||||
}
|
||||
|
||||
|
|
@ -168,16 +173,19 @@ TEST(23)
|
|||
|
||||
TEST(24)
|
||||
{
|
||||
test_is_long_runner ();
|
||||
run_test (_this, "sr-sample");
|
||||
}
|
||||
|
||||
TEST(25)
|
||||
{
|
||||
test_is_long_runner ();
|
||||
run_test (_this, "sr-sample2");
|
||||
}
|
||||
|
||||
TEST(26)
|
||||
{
|
||||
test_is_long_runner ();
|
||||
run_test (_this, "pos-neg");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
DESTDIR_UT = $$OUT_PWD/../..
|
||||
DESTDIR = $$OUT_PWD/..
|
||||
|
||||
TARGET = ant_tests
|
||||
TARGET = ext_tests
|
||||
|
||||
include($$PWD/../../lib_ut.pri)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,54 +1,7 @@
|
|||
|
||||
DESTDIR = $$OUT_PWD/..
|
||||
TARGET = klayout_gsi
|
||||
TEMPLATE = subdirs
|
||||
SUBDIRS = gsi gsi_test unit_tests
|
||||
|
||||
include($$PWD/../lib.pri)
|
||||
|
||||
DEFINES += MAKE_GSI_LIBRARY
|
||||
|
||||
SOURCES = \
|
||||
gsi.cc \
|
||||
gsiClassBase.cc \
|
||||
gsiClass.cc \
|
||||
gsiDeclBasic.cc \
|
||||
gsiDeclInternal.cc \
|
||||
gsiExpression.cc \
|
||||
gsiExternalMain.cc \
|
||||
gsiInterpreter.cc \
|
||||
gsiMethods.cc \
|
||||
gsiInspector.cc \
|
||||
gsiObject.cc \
|
||||
gsiSerialisation.cc \
|
||||
gsiTypes.cc \
|
||||
gsiObjectHolder.cc \
|
||||
|
||||
HEADERS = \
|
||||
gsiCallback.h \
|
||||
gsiCallbackVar.h \
|
||||
gsiClassBase.h \
|
||||
gsiClass.h \
|
||||
gsiDeclBasic.h \
|
||||
gsiDecl.h \
|
||||
gsiExpression.h \
|
||||
gsiExternalMain.h \
|
||||
gsi.h \
|
||||
gsiInspector.h \
|
||||
gsiInterpreter.h \
|
||||
gsiIterators.h \
|
||||
gsiMethods.h \
|
||||
gsiMethodsVar.h \
|
||||
gsiObject.h \
|
||||
gsiSerialisation.h \
|
||||
gsiSignals.h \
|
||||
gsiTypes.h \
|
||||
gsiObjectHolder.h \
|
||||
gsiCommon.h
|
||||
|
||||
# Note: unlike other modules, the tl declarations have to go here
|
||||
# since gsi is dependent on tl
|
||||
SOURCES += gsiDeclTl.cc
|
||||
|
||||
INCLUDEPATH += $$TL_INC
|
||||
DEPENDPATH += $$TL_INC
|
||||
LIBS += -L$$DESTDIR -lklayout_tl
|
||||
gsi_test.depends += gsi
|
||||
unit_tests.depends += gsi gsi_test
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,54 @@
|
|||
|
||||
DESTDIR = $$OUT_PWD/../..
|
||||
TARGET = klayout_gsi
|
||||
|
||||
include($$PWD/../../lib.pri)
|
||||
|
||||
DEFINES += MAKE_GSI_LIBRARY
|
||||
|
||||
SOURCES = \
|
||||
gsi.cc \
|
||||
gsiClassBase.cc \
|
||||
gsiClass.cc \
|
||||
gsiDeclBasic.cc \
|
||||
gsiDeclInternal.cc \
|
||||
gsiExpression.cc \
|
||||
gsiExternalMain.cc \
|
||||
gsiInterpreter.cc \
|
||||
gsiMethods.cc \
|
||||
gsiInspector.cc \
|
||||
gsiObject.cc \
|
||||
gsiSerialisation.cc \
|
||||
gsiTypes.cc \
|
||||
gsiObjectHolder.cc \
|
||||
|
||||
HEADERS = \
|
||||
gsiCallback.h \
|
||||
gsiCallbackVar.h \
|
||||
gsiClassBase.h \
|
||||
gsiClass.h \
|
||||
gsiDeclBasic.h \
|
||||
gsiDecl.h \
|
||||
gsiExpression.h \
|
||||
gsiExternalMain.h \
|
||||
gsi.h \
|
||||
gsiInspector.h \
|
||||
gsiInterpreter.h \
|
||||
gsiIterators.h \
|
||||
gsiMethods.h \
|
||||
gsiMethodsVar.h \
|
||||
gsiObject.h \
|
||||
gsiSerialisation.h \
|
||||
gsiSignals.h \
|
||||
gsiTypes.h \
|
||||
gsiObjectHolder.h \
|
||||
gsiCommon.h
|
||||
|
||||
# Note: unlike other modules, the tl declarations have to go here
|
||||
# since gsi is dependent on tl
|
||||
SOURCES += gsiDeclTl.cc
|
||||
|
||||
INCLUDEPATH += $$TL_INC
|
||||
DEPENDPATH += $$TL_INC
|
||||
LIBS += -L$$DESTDIR -lklayout_tl
|
||||
|
||||
|
|
@ -33,6 +33,7 @@
|
|||
#include <memory>
|
||||
#include <cstdio>
|
||||
|
||||
#include "gsiCommon.h"
|
||||
#include "tlVariant.h"
|
||||
#include "tlString.h"
|
||||
|
||||
|
|
@ -57,7 +58,7 @@ enum Enum
|
|||
* It provides instance counting and tracking of one instance.
|
||||
* It provides copy semantics.
|
||||
*/
|
||||
struct A
|
||||
struct GSI_PUBLIC A
|
||||
: public gsi::ObjectBase
|
||||
{
|
||||
/**
|
||||
|
|
@ -238,7 +239,7 @@ struct A
|
|||
};
|
||||
|
||||
|
||||
struct A_NC
|
||||
struct GSI_PUBLIC A_NC
|
||||
: public A
|
||||
{
|
||||
A_NC () : A () { }
|
||||
|
|
@ -252,7 +253,7 @@ private:
|
|||
};
|
||||
|
||||
template<class Iter>
|
||||
struct ValueIter
|
||||
struct GSI_PUBLIC ValueIter
|
||||
{
|
||||
public:
|
||||
typedef typename std::iterator_traits<Iter> it_traits;
|
||||
|
|
@ -285,7 +286,7 @@ private:
|
|||
};
|
||||
|
||||
template<class Iter>
|
||||
struct FreeIter
|
||||
struct GSI_PUBLIC FreeIter
|
||||
{
|
||||
public:
|
||||
typedef typename std::iterator_traits<Iter> it_traits;
|
||||
|
|
@ -361,7 +362,7 @@ private:
|
|||
};
|
||||
|
||||
template<class Iter>
|
||||
struct FreeIterUsePtr
|
||||
struct GSI_PUBLIC FreeIterUsePtr
|
||||
{
|
||||
public:
|
||||
typedef typename std::iterator_traits<Iter> it_traits;
|
||||
|
|
@ -398,7 +399,7 @@ private:
|
|||
Iter mb, me;
|
||||
};
|
||||
|
||||
struct B
|
||||
struct GSI_PUBLIC B
|
||||
{
|
||||
B ();
|
||||
B (const B &d);
|
||||
|
|
@ -824,7 +825,7 @@ struct B
|
|||
static B *b_inst;
|
||||
};
|
||||
|
||||
class C
|
||||
class GSI_PUBLIC C
|
||||
{
|
||||
public:
|
||||
virtual ~C () { }
|
||||
|
|
@ -849,7 +850,7 @@ public:
|
|||
static std::vector<int> m_v;
|
||||
};
|
||||
|
||||
class C_P
|
||||
class GSI_PUBLIC C_P
|
||||
: public C
|
||||
{
|
||||
public:
|
||||
|
|
@ -861,7 +862,7 @@ public:
|
|||
gsi::Callback f_cb;
|
||||
};
|
||||
|
||||
struct E
|
||||
struct GSI_PUBLIC E
|
||||
: public gsi::ObjectBase
|
||||
{
|
||||
E ();
|
||||
|
|
@ -896,7 +897,7 @@ private:
|
|||
};
|
||||
|
||||
// Same as "E", but not based on ObjectBase
|
||||
struct F
|
||||
struct GSI_PUBLIC F
|
||||
{
|
||||
F() : x(0) { }
|
||||
static const F *ic();
|
||||
|
|
@ -910,7 +911,7 @@ struct F
|
|||
static std::auto_ptr<F> f_inst;
|
||||
};
|
||||
|
||||
struct G
|
||||
struct GSI_PUBLIC G
|
||||
{
|
||||
G () : m_iv (0) { }
|
||||
int iv() const { return m_iv; }
|
||||
|
|
@ -925,7 +926,7 @@ struct G
|
|||
std::string m_sv;
|
||||
};
|
||||
|
||||
class X
|
||||
class GSI_PUBLIC X
|
||||
: public gsi::ObjectBase
|
||||
{
|
||||
public:
|
||||
|
|
@ -956,7 +957,7 @@ private:
|
|||
static std::auto_ptr<X> sp_a, sp_b;
|
||||
};
|
||||
|
||||
class Y
|
||||
class GSI_PUBLIC Y
|
||||
: public X
|
||||
{
|
||||
public:
|
||||
|
|
@ -987,27 +988,27 @@ private:
|
|||
Y *mp_c;
|
||||
};
|
||||
|
||||
class Y2
|
||||
class GSI_PUBLIC Y2
|
||||
: public X
|
||||
{
|
||||
public:
|
||||
int x1 () const { return 2; }
|
||||
};
|
||||
|
||||
class Y3
|
||||
class GSI_PUBLIC Y3
|
||||
: public X
|
||||
{
|
||||
public:
|
||||
int x1 () const { return 3; }
|
||||
};
|
||||
|
||||
class Y4
|
||||
class GSI_PUBLIC Y4
|
||||
{
|
||||
public:
|
||||
int x1 () const { return 4; }
|
||||
};
|
||||
|
||||
class YY : public Y
|
||||
class GSI_PUBLIC YY : public Y
|
||||
{
|
||||
public:
|
||||
YY ();
|
||||
|
|
@ -1015,7 +1016,7 @@ public:
|
|||
virtual QString cls_name() const;
|
||||
};
|
||||
|
||||
class Z
|
||||
class GSI_PUBLIC Z
|
||||
{
|
||||
public:
|
||||
Z ();
|
||||
|
|
@ -1030,7 +1031,7 @@ private:
|
|||
X *mp_x;
|
||||
};
|
||||
|
||||
class Z_P
|
||||
class GSI_PUBLIC Z_P
|
||||
: public Z
|
||||
{
|
||||
public:
|
||||
|
|
@ -1043,7 +1044,7 @@ public:
|
|||
gsi::Callback f_cb;
|
||||
};
|
||||
|
||||
class SQ
|
||||
class GSI_PUBLIC SQ
|
||||
: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
@ -1069,7 +1070,7 @@ private:
|
|||
int m_tag;
|
||||
};
|
||||
|
||||
class SE
|
||||
class GSI_PUBLIC SE
|
||||
: public tl::Object
|
||||
{
|
||||
public:
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
|
||||
DESTDIR = $$OUT_PWD/../..
|
||||
TARGET = gsi_test
|
||||
|
||||
include($$PWD/../../lib.pri)
|
||||
|
||||
DEFINES += MAKE_GSI_LIBRARY
|
||||
|
||||
SOURCES = \
|
||||
gsiTest.cc \
|
||||
|
||||
HEADERS = \
|
||||
gsiTest.h \
|
||||
|
||||
INCLUDEPATH += $$TL_INC $$GSI_INC
|
||||
DEPENDPATH += $$TL_INC $$GSI_INC
|
||||
LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi
|
||||
|
||||
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include "gsiExpression.h"
|
||||
#include "gsiDecl.h"
|
||||
#include "gsiTest.h"
|
||||
#include "dbBox.h"
|
||||
#include "dbEdge.h"
|
||||
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
DESTDIR_UT = $$OUT_PWD/../..
|
||||
DESTDIR = $$OUT_PWD/..
|
||||
|
||||
TARGET = gsi_tests
|
||||
|
||||
include($$PWD/../../lib_ut.pri)
|
||||
|
||||
SOURCES = \
|
||||
gsiExpression.cc \
|
||||
|
||||
INCLUDEPATH += $$TL_INC $$GSI_INC $$GSI_TEST_INC $$UT_INC $$DB_INC
|
||||
DEPENDPATH += $$TL_INC $$GSI_INC $$GSI_TEST_INC $$UT_INC $$DB_INC
|
||||
|
||||
LIBS += -L$$DESTDIR_UT -lklayout_tl -lklayout_gsi -lgsi_test -lklayout_ut -lklayout_db
|
||||
|
||||
|
|
@ -5,7 +5,8 @@ DB_INC = $$PWD/db/db
|
|||
DRC_INC = $$PWD/drc/drc
|
||||
EDT_INC = $$PWD/edt/edt
|
||||
EXT_INC = $$PWD/ext/ext
|
||||
GSI_INC = $$PWD/gsi
|
||||
GSI_INC = $$PWD/gsi/gsi
|
||||
GSI_TEST_INC = $$PWD/gsi/gsi_test
|
||||
GSIQT_INC = $$PWD/gsiqt
|
||||
IMG_INC = $$PWD/img
|
||||
LIB_INC = $$PWD/lib
|
||||
|
|
|
|||
|
|
@ -8,12 +8,7 @@ TEMPLATE = app
|
|||
|
||||
TARGET = ut_runner
|
||||
|
||||
HEADERS = \
|
||||
gsiTest.h
|
||||
|
||||
SOURCES = \
|
||||
gsiExpression.cc \
|
||||
gsiTest.cc \
|
||||
imgObject.cc \
|
||||
layAnnotationShapes.cc \
|
||||
layBitmap.cc \
|
||||
|
|
@ -37,3 +32,8 @@ equals(HAVE_QT5, "1") {
|
|||
CONFIG += qtestlib
|
||||
}
|
||||
|
||||
# TODO: remove later
|
||||
INCLUDEPATH += $$GSI_TEST_INC
|
||||
DEPENDPATH += $$GSI_TEST_INC
|
||||
LIBS += -L$$DESTDIR -lgsi_test
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue