Merge pull request #14 from klayoutmatthias/macos-build

Some changes for Windows build compatibility
This commit is contained in:
Kazunari Sekigawa 2018-01-02 08:30:08 +09:00 committed by GitHub
commit 3bc7756aaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
43 changed files with 190 additions and 126 deletions

View File

@ -32,14 +32,17 @@
# define ANT_PUBLIC __declspec(dllimport) # define ANT_PUBLIC __declspec(dllimport)
# endif # endif
# define ANT_LOCAL # define ANT_LOCAL
# define ANT_PUBLIC_TEMPLATE
# else # else
# if __GNUC__ >= 4 || defined(__clang__) # if __GNUC__ >= 4 || defined(__clang__)
# define ANT_PUBLIC __attribute__ ((visibility ("default"))) # define ANT_PUBLIC __attribute__ ((visibility ("default")))
# define ANT_PUBLIC_TEMPLATE __attribute__ ((visibility ("default")))
# define ANT_LOCAL __attribute__ ((visibility ("hidden"))) # define ANT_LOCAL __attribute__ ((visibility ("hidden")))
# else # else
# define ANT_PUBLIC # define ANT_PUBLIC
# define ANT_PUBLIC_TEMPLATE
# define ANT_LOCAL # define ANT_LOCAL
# endif # endif

View File

@ -32,14 +32,17 @@
# define BD_PUBLIC __declspec(dllimport) # define BD_PUBLIC __declspec(dllimport)
# endif # endif
# define BD_LOCAL # define BD_LOCAL
# define BD_PUBLIC_TEMPLATE
# else # else
# if __GNUC__ >= 4 || defined(__clang__) # if __GNUC__ >= 4 || defined(__clang__)
# define BD_PUBLIC __attribute__ ((visibility ("default"))) # define BD_PUBLIC __attribute__ ((visibility ("default")))
# define BD_PUBLIC_TEMPLATE __attribute__ ((visibility ("default")))
# define BD_LOCAL __attribute__ ((visibility ("hidden"))) # define BD_LOCAL __attribute__ ((visibility ("hidden")))
# else # else
# define BD_PUBLIC # define BD_PUBLIC
# define BD_PUBLIC_TEMPLATE
# define BD_LOCAL # define BD_LOCAL
# endif # endif

View File

@ -57,7 +57,7 @@ class ArrayRepository;
*/ */
template <class C, class R = C> template <class C, class R = C>
struct DB_PUBLIC box struct DB_PUBLIC_TEMPLATE box
{ {
typedef C coord_type; typedef C coord_type;
typedef box<C, R> box_type; typedef box<C, R> box_type;

View File

@ -32,14 +32,17 @@
# define DB_PUBLIC __declspec(dllimport) # define DB_PUBLIC __declspec(dllimport)
# endif # endif
# define DB_LOCAL # define DB_LOCAL
# define DB_PUBLIC_TEMPLATE
# else # else
# if __GNUC__ >= 4 || defined(__clang__) # if __GNUC__ >= 4 || defined(__clang__)
# define DB_PUBLIC __attribute__ ((visibility ("default"))) # define DB_PUBLIC __attribute__ ((visibility ("default")))
# define DB_PUBLIC_TEMPLATE __attribute__ ((visibility ("default")))
# define DB_LOCAL __attribute__ ((visibility ("hidden"))) # define DB_LOCAL __attribute__ ((visibility ("hidden")))
# else # else
# define DB_PUBLIC # define DB_PUBLIC
# define DB_PUBLIC_TEMPLATE
# define DB_LOCAL # define DB_LOCAL
# endif # endif

View File

@ -42,7 +42,7 @@ template <class C> class generic_repository;
class ArrayRepository; class ArrayRepository;
template <class C> template <class C>
class DB_PUBLIC edge class DB_PUBLIC_TEMPLATE edge
{ {
public: public:
typedef C coord_type; typedef C coord_type;

View File

@ -40,7 +40,7 @@
namespace db { namespace db {
template <class C> template <class C>
class DB_PUBLIC edge_pair class DB_PUBLIC_TEMPLATE edge_pair
{ {
public: public:
typedef C coord_type; typedef C coord_type;

View File

@ -509,6 +509,8 @@ private:
* determines how to initialize the iterators and what types to use. * determines how to initialize the iterators and what types to use.
*/ */
// NOTE: we do explicit instantiation, so the exposure is declared
// as DB_PUBLIC - as if it wasn't a template
template <class IterTraits> template <class IterTraits>
class DB_PUBLIC instance_iterator class DB_PUBLIC instance_iterator
{ {

View File

@ -69,7 +69,7 @@ typedef generic_repository<db::Coord> GenericRepository;
* Since we are using a custom cell list, we have to provide our own iterator * Since we are using a custom cell list, we have to provide our own iterator
*/ */
template <class C> template <class C>
class DB_PUBLIC cell_list_iterator class DB_PUBLIC_TEMPLATE cell_list_iterator
{ {
public: public:
typedef C cell_type; typedef C cell_type;

View File

@ -207,6 +207,8 @@ private:
* The path can be converted to a polygon. * The path can be converted to a polygon.
*/ */
// NOTE: we do explicit instantiation, so the exposure is declared
// as DB_PUBLIC - as if it wasn't a template
template <class C> template <class C>
class DB_PUBLIC path class DB_PUBLIC path
{ {

View File

@ -43,7 +43,7 @@ template <class C> class vector;
*/ */
template <class C> template <class C>
class DB_PUBLIC point class DB_PUBLIC_TEMPLATE point
{ {
public: public:
typedef C coord_type; typedef C coord_type;

View File

@ -83,6 +83,8 @@ inline bool default_compression<db::DCoord> ()
* hull and holes respectively. * hull and holes respectively.
*/ */
// NOTE: we do explicit instantiation, so the exposure is declared
// as DB_PUBLIC - as if it wasn't a template
template <class C> template <class C>
class DB_PUBLIC polygon_contour class DB_PUBLIC polygon_contour
{ {
@ -1364,7 +1366,7 @@ private:
*/ */
template <class C> template <class C>
class DB_PUBLIC polygon class DB_PUBLIC_TEMPLATE polygon
{ {
public: public:
typedef C coord_type; typedef C coord_type;
@ -2324,7 +2326,7 @@ private:
*/ */
template <class C> template <class C>
class DB_PUBLIC simple_polygon class DB_PUBLIC_TEMPLATE simple_polygon
{ {
public: public:
typedef C coord_type; typedef C coord_type;

View File

@ -1593,7 +1593,7 @@ public:
* into the db::Object manager's undo/redo queue. * into the db::Object manager's undo/redo queue.
*/ */
template <class Sh, class StableTag> template <class Sh, class StableTag>
class DB_PUBLIC layer_op class DB_PUBLIC_TEMPLATE layer_op
: public LayerOpBase : public LayerOpBase
{ {
public: public:

View File

@ -222,7 +222,7 @@ private:
*/ */
template <class C> template <class C>
class DB_PUBLIC text class DB_PUBLIC_TEMPLATE text
{ {
public: public:
typedef C coord_type; typedef C coord_type;

View File

@ -42,10 +42,10 @@ namespace tl {
namespace db { namespace db {
template <class I, class F, class R = double> class DB_PUBLIC complex_trans; template <class I, class F, class R = double> class DB_PUBLIC_TEMPLATE complex_trans;
template <class C> class DB_PUBLIC simple_trans; template <class C> class DB_PUBLIC_TEMPLATE simple_trans;
template <class C> class disp_trans; template <class C> class DB_PUBLIC_TEMPLATE disp_trans;
template <class C> class fixpoint_trans; template <class C> class DB_PUBLIC_TEMPLATE fixpoint_trans;
/** /**
* @brief Provide the default predicates and properties for transformations for the coordinate type C * @brief Provide the default predicates and properties for transformations for the coordinate type C
@ -1035,7 +1035,7 @@ operator<< (std::ostream &os, const disp_trans<C> &t)
*/ */
template <class C> template <class C>
class DB_PUBLIC simple_trans class DB_PUBLIC_TEMPLATE simple_trans
: public fixpoint_trans<C> : public fixpoint_trans<C>
{ {
public: public:
@ -1439,7 +1439,7 @@ operator<< (std::ostream &os, const simple_trans<C> &t)
* type used internally for representing the floating-point members). * type used internally for representing the floating-point members).
*/ */
template <class I, class F, class R> template <class I, class F, class R>
class DB_PUBLIC complex_trans class DB_PUBLIC_TEMPLATE complex_trans
{ {
public: public:
typedef I coord_type; typedef I coord_type;

View File

@ -45,7 +45,7 @@ template <class C> class point;
*/ */
template <class C> template <class C>
class DB_PUBLIC vector class DB_PUBLIC_TEMPLATE vector
{ {
public: public:
typedef C coord_type; typedef C coord_type;

View File

@ -32,14 +32,17 @@
# define DRC_PUBLIC __declspec(dllimport) # define DRC_PUBLIC __declspec(dllimport)
# endif # endif
# define DRC_LOCAL # define DRC_LOCAL
# define DRC_PUBLIC_TEMPLATE
# else # else
# if __GNUC__ >= 4 || defined(__clang__) # if __GNUC__ >= 4 || defined(__clang__)
# define DRC_PUBLIC __attribute__ ((visibility ("default"))) # define DRC_PUBLIC __attribute__ ((visibility ("default")))
# define DRC_PUBLIC_TEMPLATE __attribute__ ((visibility ("default")))
# define DRC_LOCAL __attribute__ ((visibility ("hidden"))) # define DRC_LOCAL __attribute__ ((visibility ("hidden")))
# else # else
# define DRC_PUBLIC # define DRC_PUBLIC
# define DRC_PUBLIC_TEMPLATE
# define DRC_LOCAL # define DRC_LOCAL
# endif # endif

View File

@ -32,14 +32,17 @@
# define EDT_PUBLIC __declspec(dllimport) # define EDT_PUBLIC __declspec(dllimport)
# endif # endif
# define EDT_LOCAL # define EDT_LOCAL
# define EDT_PUBLIC_TEMPLATE
# else # else
# if __GNUC__ >= 4 || defined(__clang__) # if __GNUC__ >= 4 || defined(__clang__)
# define EDT_PUBLIC __attribute__ ((visibility ("default"))) # define EDT_PUBLIC __attribute__ ((visibility ("default")))
# define EDT_PUBLIC_TEMPLATE __attribute__ ((visibility ("default")))
# define EDT_LOCAL __attribute__ ((visibility ("hidden"))) # define EDT_LOCAL __attribute__ ((visibility ("hidden")))
# else # else
# define EDT_PUBLIC # define EDT_PUBLIC
# define EDT_PUBLIC_TEMPLATE
# define EDT_LOCAL # define EDT_LOCAL
# endif # endif

View File

@ -32,14 +32,17 @@
# define EXT_PUBLIC __declspec(dllimport) # define EXT_PUBLIC __declspec(dllimport)
# endif # endif
# define EXT_LOCAL # define EXT_LOCAL
# define EXT_PUBLIC_TEMPLATE
# else # else
# if __GNUC__ >= 4 || defined(__clang__) # if __GNUC__ >= 4 || defined(__clang__)
# define EXT_PUBLIC __attribute__ ((visibility ("default"))) # define EXT_PUBLIC __attribute__ ((visibility ("default")))
# define EXT_PUBLIC_TEMPLATE __attribute__ ((visibility ("default")))
# define EXT_LOCAL __attribute__ ((visibility ("hidden"))) # define EXT_LOCAL __attribute__ ((visibility ("hidden")))
# else # else
# define EXT_PUBLIC # define EXT_PUBLIC
# define EXT_PUBLIC_TEMPLATE
# define EXT_LOCAL # define EXT_LOCAL
# endif # endif

View File

@ -116,7 +116,7 @@ void _var_user_read_impl (T * /*a*/, tl::Extractor & /*ex*/, tl::false_tag)
* @brief A VariantUserClassBase specialization that links GSI classes and Variant classes * @brief A VariantUserClassBase specialization that links GSI classes and Variant classes
*/ */
template <class T> template <class T>
class GSI_PUBLIC VariantUserClass class GSI_PUBLIC_TEMPLATE VariantUserClass
: public tl::VariantUserClass<T>, private VariantUserClassImpl : public tl::VariantUserClass<T>, private VariantUserClassImpl
{ {
public: public:
@ -551,7 +551,7 @@ public:
* the given methods. * the given methods.
*/ */
template <class X> template <class X>
class GSI_PUBLIC ClassExt class GSI_PUBLIC_TEMPLATE ClassExt
: public ClassBase : public ClassBase
{ {
public: public:
@ -708,7 +708,7 @@ struct adaptor_type_info<X, NoAdaptorTag>
* or to call it's methods in some generic way. * or to call it's methods in some generic way.
*/ */
template <class X, class Adapted = NoAdaptorTag> template <class X, class Adapted = NoAdaptorTag>
class GSI_PUBLIC Class class GSI_PUBLIC_TEMPLATE Class
: public ClassBase : public ClassBase
{ {
public: public:
@ -937,7 +937,7 @@ public:
* a subclass of the parent. * a subclass of the parent.
*/ */
template <class P, class X, class Adapted = NoAdaptorTag> template <class P, class X, class Adapted = NoAdaptorTag>
class GSI_PUBLIC ChildClass class GSI_PUBLIC_TEMPLATE ChildClass
: public Class<X, Adapted> : public Class<X, Adapted>
{ {
public: public:
@ -970,7 +970,7 @@ public:
* a subclass of the parent. * a subclass of the parent.
*/ */
template <class P, class X, class B, class Adapted = NoAdaptorTag> template <class P, class X, class B, class Adapted = NoAdaptorTag>
class GSI_PUBLIC ChildSubClass class GSI_PUBLIC_TEMPLATE ChildSubClass
: public SubClass<X, B, Adapted> : public SubClass<X, B, Adapted>
{ {
public: public:

View File

@ -32,14 +32,17 @@
# define GSI_PUBLIC __declspec(dllimport) # define GSI_PUBLIC __declspec(dllimport)
# endif # endif
# define GSI_LOCAL # define GSI_LOCAL
# define GSI_PUBLIC_TEMPLATE
# else # else
# if __GNUC__ >= 4 || defined(__clang__) # if __GNUC__ >= 4 || defined(__clang__)
# define GSI_PUBLIC __attribute__ ((visibility ("default"))) # define GSI_PUBLIC __attribute__ ((visibility ("default")))
# define GSI_PUBLIC_TEMPLATE __attribute__ ((visibility ("default")))
# define GSI_LOCAL __attribute__ ((visibility ("hidden"))) # define GSI_LOCAL __attribute__ ((visibility ("hidden")))
# else # else
# define GSI_PUBLIC # define GSI_PUBLIC
# define GSI_PUBLIC_TEMPLATE
# define GSI_LOCAL # define GSI_LOCAL
# endif # endif

View File

@ -36,7 +36,7 @@ namespace gsi
class GSI_PUBLIC ClassBase; class GSI_PUBLIC ClassBase;
struct NoAdaptorTag; struct NoAdaptorTag;
template <class T, class A> class GSI_PUBLIC Class; template <class T, class A> class GSI_PUBLIC_TEMPLATE Class;
/** /**
* @brief The implementation delegate for the VariantUserClass<T> * @brief The implementation delegate for the VariantUserClass<T>

View File

@ -650,7 +650,7 @@ public:
* @brief Generic string adaptor implementation * @brief Generic string adaptor implementation
*/ */
template <class X> template <class X>
class GSI_PUBLIC StringAdaptorImpl class GSI_PUBLIC_TEMPLATE StringAdaptorImpl
: public StringAdaptor : public StringAdaptor
{ {
}; };
@ -945,7 +945,7 @@ private:
* @brief Specialization for const unsigned char * * @brief Specialization for const unsigned char *
*/ */
template <class CP> template <class CP>
class GSI_PUBLIC StringAdaptorImplCCP class GSI_PUBLIC_TEMPLATE StringAdaptorImplCCP
: public StringAdaptor : public StringAdaptor
{ {
public: public:
@ -1103,7 +1103,7 @@ public:
* @brief Generic string adaptor implementation * @brief Generic string adaptor implementation
*/ */
template <class X> template <class X>
class GSI_PUBLIC VariantAdaptorImpl class GSI_PUBLIC_TEMPLATE VariantAdaptorImpl
: public VariantAdaptor : public VariantAdaptor
{ {
}; };
@ -1359,7 +1359,7 @@ public:
* @brief Implementation of the generic iterator adaptor for a specific container * @brief Implementation of the generic iterator adaptor for a specific container
*/ */
template <class Cont> template <class Cont>
class GSI_PUBLIC VectorAdaptorIteratorImpl class GSI_PUBLIC_TEMPLATE VectorAdaptorIteratorImpl
: public VectorAdaptorIterator : public VectorAdaptorIterator
{ {
public: public:
@ -1434,7 +1434,7 @@ void push_vector (QSet<X> &v, const X &x)
* @brief Implementation of the generic adaptor for a specific container * @brief Implementation of the generic adaptor for a specific container
*/ */
template <class Cont> template <class Cont>
class GSI_PUBLIC VectorAdaptorImpl class GSI_PUBLIC_TEMPLATE VectorAdaptorImpl
: public VectorAdaptor : public VectorAdaptor
{ {
public: public:
@ -1709,7 +1709,7 @@ struct map_access<QHash<X, Y> >
* @brief Implementation of the generic iterator adaptor for a specific container * @brief Implementation of the generic iterator adaptor for a specific container
*/ */
template <class Cont> template <class Cont>
class GSI_PUBLIC MapAdaptorIteratorImpl class GSI_PUBLIC_TEMPLATE MapAdaptorIteratorImpl
: public MapAdaptorIterator : public MapAdaptorIterator
{ {
public: public:
@ -1745,7 +1745,7 @@ private:
* @brief Implementation of the generic adaptor for a specific container * @brief Implementation of the generic adaptor for a specific container
*/ */
template <class Cont> template <class Cont>
class GSI_PUBLIC MapAdaptorImpl class GSI_PUBLIC_TEMPLATE MapAdaptorImpl
: public MapAdaptor : public MapAdaptor
{ {
public: public:

View File

@ -62,12 +62,12 @@ class GSI_PUBLIC StringAdaptor;
class GSI_PUBLIC VariantAdaptor; class GSI_PUBLIC VariantAdaptor;
class GSI_PUBLIC ClassBase; class GSI_PUBLIC ClassBase;
struct NoAdaptorTag; struct NoAdaptorTag;
template <class X, class A> class GSI_PUBLIC Class; template <class X, class A> class GSI_PUBLIC_TEMPLATE Class;
template <class X> struct ClassTag; template <class X> struct ClassTag;
template <class I> class GSI_PUBLIC IterAdaptor; template <class I> class GSI_PUBLIC_TEMPLATE IterAdaptor;
template <class V> class GSI_PUBLIC IterPtrAdaptor; template <class V> class GSI_PUBLIC_TEMPLATE IterPtrAdaptor;
template <class V> class GSI_PUBLIC ConstIterPtrAdaptor; template <class V> class GSI_PUBLIC_TEMPLATE ConstIterPtrAdaptor;
template <class I> class GSI_PUBLIC FreeIterAdaptor; template <class I> class GSI_PUBLIC_TEMPLATE FreeIterAdaptor;
template <class X> const ClassBase *cls_decl (); template <class X> const ClassBase *cls_decl ();
/** /**

View File

@ -32,14 +32,17 @@
# define IMG_PUBLIC __declspec(dllimport) # define IMG_PUBLIC __declspec(dllimport)
# endif # endif
# define IMG_LOCAL # define IMG_LOCAL
# define IMG_PUBLIC_TEMPLATE
# else # else
# if __GNUC__ >= 4 || defined(__clang__) # if __GNUC__ >= 4 || defined(__clang__)
# define IMG_PUBLIC __attribute__ ((visibility ("default"))) # define IMG_PUBLIC __attribute__ ((visibility ("default")))
# define IMG_PUBLIC_TEMPLATE __attribute__ ((visibility ("default")))
# define IMG_LOCAL __attribute__ ((visibility ("hidden"))) # define IMG_LOCAL __attribute__ ((visibility ("hidden")))
# else # else
# define IMG_PUBLIC # define IMG_PUBLIC
# define IMG_PUBLIC_TEMPLATE
# define IMG_LOCAL # define IMG_LOCAL
# endif # endif

View File

@ -32,14 +32,17 @@
# define LAY_PUBLIC __declspec(dllimport) # define LAY_PUBLIC __declspec(dllimport)
# endif # endif
# define LAY_LOCAL # define LAY_LOCAL
# define LAY_PUBLIC_TEMPLATE
# else # else
# if __GNUC__ >= 4 || defined(__clang__) # if __GNUC__ >= 4 || defined(__clang__)
# define LAY_PUBLIC __attribute__ ((visibility ("default"))) # define LAY_PUBLIC __attribute__ ((visibility ("default")))
# define LAY_PUBLIC_TEMPLATE __attribute__ ((visibility ("default")))
# define LAY_LOCAL __attribute__ ((visibility ("hidden"))) # define LAY_LOCAL __attribute__ ((visibility ("hidden")))
# else # else
# define LAY_PUBLIC # define LAY_PUBLIC
# define LAY_PUBLIC_TEMPLATE
# define LAY_LOCAL # define LAY_LOCAL
# endif # endif

View File

@ -32,14 +32,17 @@
# define LAYBASIC_PUBLIC __declspec(dllimport) # define LAYBASIC_PUBLIC __declspec(dllimport)
# endif # endif
# define LAYBASIC_LOCAL # define LAYBASIC_LOCAL
# define LAYBASIC_PUBLIC_TEMPLATE
# else # else
# if __GNUC__ >= 4 || defined(__clang__) # if __GNUC__ >= 4 || defined(__clang__)
# define LAYBASIC_PUBLIC __attribute__ ((visibility ("default"))) # define LAYBASIC_PUBLIC __attribute__ ((visibility ("default")))
# define LAYBASIC_PUBLIC_TEMPLATE __attribute__ ((visibility ("default")))
# define LAYBASIC_LOCAL __attribute__ ((visibility ("hidden"))) # define LAYBASIC_LOCAL __attribute__ ((visibility ("hidden")))
# else # else
# define LAYBASIC_PUBLIC # define LAYBASIC_PUBLIC
# define LAYBASIC_PUBLIC_TEMPLATE
# define LAYBASIC_LOCAL # define LAYBASIC_LOCAL
# endif # endif

View File

@ -32,14 +32,17 @@
# define LIB_PUBLIC __declspec(dllimport) # define LIB_PUBLIC __declspec(dllimport)
# endif # endif
# define LIB_LOCAL # define LIB_LOCAL
# define LIB_PUBLIC_TEMPLATE
# else # else
# if __GNUC__ >= 4 # if __GNUC__ >= 4 || defined(__clang__)
# define LIB_PUBLIC __attribute__ ((visibility ("default"))) # define LIB_PUBLIC __attribute__ ((visibility ("default")))
# define LIB_PUBLIC_TEMPLATE __attribute__ ((visibility ("default")))
# define LIB_LOCAL __attribute__ ((visibility ("hidden"))) # define LIB_LOCAL __attribute__ ((visibility ("hidden")))
# else # else
# define LIB_PUBLIC # define LIB_PUBLIC
# define LIB_PUBLIC_TEMPLATE
# define LIB_LOCAL # define LIB_LOCAL
# endif # endif

View File

@ -32,14 +32,17 @@
# define LYM_PUBLIC __declspec(dllimport) # define LYM_PUBLIC __declspec(dllimport)
# endif # endif
# define LYM_LOCAL # define LYM_LOCAL
# define LYM_PUBLIC_TEMPLATE
# else # else
# if __GNUC__ >= 4 || defined(__clang__) # if __GNUC__ >= 4 || defined(__clang__)
# define LYM_PUBLIC __attribute__ ((visibility ("default"))) # define LYM_PUBLIC __attribute__ ((visibility ("default")))
# define LYM_PUBLIC_TEMPLATE __attribute__ ((visibility ("default")))
# define LYM_LOCAL __attribute__ ((visibility ("hidden"))) # define LYM_LOCAL __attribute__ ((visibility ("hidden")))
# else # else
# define LYM_PUBLIC # define LYM_PUBLIC
# define LYM_PUBLIC_TEMPLATE
# define LYM_LOCAL # define LYM_LOCAL
# endif # endif

View File

@ -32,14 +32,17 @@
# define PYA_PUBLIC __declspec(dllimport) # define PYA_PUBLIC __declspec(dllimport)
# endif # endif
# define PYA_LOCAL # define PYA_LOCAL
# define PYA_PUBLIC_TEMPLATE
# else # else
# if __GNUC__ >= 4 || defined(__clang__) # if __GNUC__ >= 4 || defined(__clang__)
# define PYA_PUBLIC __attribute__ ((visibility ("default"))) # define PYA_PUBLIC __attribute__ ((visibility ("default")))
# define PYA_PUBLIC_TEMPLATE __attribute__ ((visibility ("default")))
# define PYA_LOCAL __attribute__ ((visibility ("hidden"))) # define PYA_LOCAL __attribute__ ((visibility ("hidden")))
# else # else
# define PYA_PUBLIC # define PYA_PUBLIC
# define PYA_PUBLIC_TEMPLATE
# define PYA_LOCAL # define PYA_LOCAL
# endif # endif

View File

@ -32,14 +32,17 @@
# define PYA_PUBLIC __declspec(dllimport) # define PYA_PUBLIC __declspec(dllimport)
# endif # endif
# define PYA_LOCAL # define PYA_LOCAL
# define PYA_PUBLIC_TEMPLATE
# else # else
# if __GNUC__ >= 4 || defined(__clang__) # if __GNUC__ >= 4 || defined(__clang__)
# define PYA_PUBLIC __attribute__ ((visibility ("default"))) # define PYA_PUBLIC __attribute__ ((visibility ("default")))
# define PYA_PUBLIC_TEMPLATE __attribute__ ((visibility ("default")))
# define PYA_LOCAL __attribute__ ((visibility ("hidden"))) # define PYA_LOCAL __attribute__ ((visibility ("hidden")))
# else # else
# define PYA_PUBLIC # define PYA_PUBLIC
# define PYA_PUBLIC_TEMPLATE
# define PYA_LOCAL # define PYA_LOCAL
# endif # endif

View File

@ -32,14 +32,17 @@
# define RBA_PUBLIC __declspec(dllimport) # define RBA_PUBLIC __declspec(dllimport)
# endif # endif
# define RBA_LOCAL # define RBA_LOCAL
# define RBA_PUBLIC_TEMPLATE
# else # else
# if __GNUC__ >= 4 || defined(__clang__) # if __GNUC__ >= 4 || defined(__clang__)
# define RBA_PUBLIC __attribute__ ((visibility ("default"))) # define RBA_PUBLIC __attribute__ ((visibility ("default")))
# define RBA_PUBLIC_TEMPLATE __attribute__ ((visibility ("default")))
# define RBA_LOCAL __attribute__ ((visibility ("hidden"))) # define RBA_LOCAL __attribute__ ((visibility ("hidden")))
# else # else
# define RBA_PUBLIC # define RBA_PUBLIC
# define RBA_PUBLIC_TEMPLATE
# define RBA_LOCAL # define RBA_LOCAL
# endif # endif

View File

@ -32,14 +32,17 @@
# define RBA_PUBLIC __declspec(dllimport) # define RBA_PUBLIC __declspec(dllimport)
# endif # endif
# define RBA_LOCAL # define RBA_LOCAL
# define RBA_PUBLIC_TEMPLATE
# else # else
# if __GNUC__ >= 4 || defined(__clang__) # if __GNUC__ >= 4 || defined(__clang__)
# define RBA_PUBLIC __attribute__ ((visibility ("default"))) # define RBA_PUBLIC __attribute__ ((visibility ("default")))
# define RBA_PUBLIC_TEMPLATE __attribute__ ((visibility ("default")))
# define RBA_LOCAL __attribute__ ((visibility ("hidden"))) # define RBA_LOCAL __attribute__ ((visibility ("hidden")))
# else # else
# define RBA_PUBLIC # define RBA_PUBLIC
# define RBA_PUBLIC_TEMPLATE
# define RBA_LOCAL # define RBA_LOCAL
# endif # endif

View File

@ -32,14 +32,17 @@
# define RDB_PUBLIC __declspec(dllimport) # define RDB_PUBLIC __declspec(dllimport)
# endif # endif
# define RDB_LOCAL # define RDB_LOCAL
# define RDB_PUBLIC_TEMPLATE
# else # else
# if __GNUC__ >= 4 || defined(__clang__) # if __GNUC__ >= 4 || defined(__clang__)
# define RDB_PUBLIC __attribute__ ((visibility ("default"))) # define RDB_PUBLIC __attribute__ ((visibility ("default")))
# define RDB_PUBLIC_TEMPLATE __attribute__ ((visibility ("default")))
# define RDB_LOCAL __attribute__ ((visibility ("hidden"))) # define RDB_LOCAL __attribute__ ((visibility ("hidden")))
# else # else
# define RDB_PUBLIC # define RDB_PUBLIC
# define RDB_PUBLIC_TEMPLATE
# define RDB_LOCAL # define RDB_LOCAL
# endif # endif

View File

@ -32,14 +32,17 @@
# define TL_PUBLIC __declspec(dllimport) # define TL_PUBLIC __declspec(dllimport)
# endif # endif
# define TL_LOCAL # define TL_LOCAL
# define TL_PUBLIC_TEMPLATE
# else # else
# if __GNUC__ >= 4 || defined(__clang__) # if __GNUC__ >= 4 || defined(__clang__)
# define TL_PUBLIC __attribute__ ((visibility ("default"))) # define TL_PUBLIC __attribute__ ((visibility ("default")))
# define TL_PUBLIC_TEMPLATE __attribute__ ((visibility ("default")))
# define TL_LOCAL __attribute__ ((visibility ("hidden"))) # define TL_LOCAL __attribute__ ((visibility ("hidden")))
# else # else
# define TL_PUBLIC # define TL_PUBLIC
# define TL_PUBLIC_TEMPLATE
# define TL_LOCAL # define TL_LOCAL
# endif # endif
@ -56,14 +59,17 @@
# define GSI_PUBLIC __declspec(dllimport) # define GSI_PUBLIC __declspec(dllimport)
# endif # endif
# define GSI_LOCAL # define GSI_LOCAL
# define GSI_PUBLIC_TEMPLATE
# else # else
# if __GNUC__ >= 4 || defined(__clang__) # if __GNUC__ >= 4 || defined(__clang__)
# define GSI_PUBLIC __attribute__ ((visibility ("default"))) # define GSI_PUBLIC __attribute__ ((visibility ("default")))
# define GSI_PUBLIC_TEMPLATE __attribute__ ((visibility ("default")))
# define GSI_LOCAL __attribute__ ((visibility ("hidden"))) # define GSI_LOCAL __attribute__ ((visibility ("hidden")))
# else # else
# define GSI_PUBLIC # define GSI_PUBLIC
# define GSI_PUBLIC_TEMPLATE
# define GSI_LOCAL # define GSI_LOCAL
# endif # endif

View File

@ -114,12 +114,12 @@ void handle_event_exception (std::exception &ex);
* @endcode * @endcode
*/ */
template <class A1 = void, class A2 = void, class A3 = void, class A4 = void, class A5 = void> class TL_PUBLIC event_function_base; template <class A1 = void, class A2 = void, class A3 = void, class A4 = void, class A5 = void> class TL_PUBLIC_TEMPLATE event_function_base;
template <class T, class A1 = void, class A2 = void, class A3 = void, class A4 = void, class A5 = void> class TL_PUBLIC event_function; template <class T, class A1 = void, class A2 = void, class A3 = void, class A4 = void, class A5 = void> class TL_PUBLIC_TEMPLATE event_function;
template <class T, class D, class A1 = void, class A2 = void, class A3 = void, class A4 = void, class A5 = void> class TL_PUBLIC event_function_with_data; template <class T, class D, class A1 = void, class A2 = void, class A3 = void, class A4 = void, class A5 = void> class TL_PUBLIC_TEMPLATE event_function_with_data;
template <class T, class A1 = void, class A2 = void, class A3 = void, class A4 = void, class A5 = void> class TL_PUBLIC generic_event_function; template <class T, class A1 = void, class A2 = void, class A3 = void, class A4 = void, class A5 = void> class TL_PUBLIC_TEMPLATE generic_event_function;
template <class T, class D, class A1 = void, class A2 = void, class A3 = void, class A4 = void, class A5 = void> class TL_PUBLIC generic_event_function_with_data; template <class T, class D, class A1 = void, class A2 = void, class A3 = void, class A4 = void, class A5 = void> class TL_PUBLIC_TEMPLATE generic_event_function_with_data;
template <class A1 = void, class A2 = void, class A3 = void, class A4 = void, class A5 = void> class TL_PUBLIC event; template <class A1 = void, class A2 = void, class A3 = void, class A4 = void, class A5 = void> class TL_PUBLIC_TEMPLATE event;
typedef event<> Event; typedef event<> Event;
#define _COUNT 0 #define _COUNT 0

View File

@ -31,7 +31,7 @@
#endif #endif
template <_TMPLARGS> template <_TMPLARGS>
class TL_PUBLIC event_function_base<_TMPLARGLISTP> class TL_PUBLIC_TEMPLATE event_function_base<_TMPLARGLISTP>
: public tl::Object : public tl::Object
{ {
public: public:
@ -42,7 +42,7 @@ public:
}; };
template <_JOIN(class T, _TMPLARGS)> template <_JOIN(class T, _TMPLARGS)>
class TL_PUBLIC event_function<T, _TMPLARGLISTP> class TL_PUBLIC_TEMPLATE event_function<T, _TMPLARGLISTP>
: public event_function_base<_TMPLARGLIST> : public event_function_base<_TMPLARGLIST>
{ {
public: public:
@ -71,7 +71,7 @@ private:
}; };
template <class T, _JOIN(class D, _TMPLARGS)> template <class T, _JOIN(class D, _TMPLARGS)>
class TL_PUBLIC event_function_with_data<T, D, _TMPLARGLISTP> class TL_PUBLIC_TEMPLATE event_function_with_data<T, D, _TMPLARGLISTP>
: public event_function_base<_TMPLARGLIST> : public event_function_base<_TMPLARGLIST>
{ {
public: public:
@ -101,7 +101,7 @@ private:
}; };
template <_JOIN(class T, _TMPLARGS)> template <_JOIN(class T, _TMPLARGS)>
class TL_PUBLIC generic_event_function<T, _TMPLARGLISTP> class TL_PUBLIC_TEMPLATE generic_event_function<T, _TMPLARGLISTP>
: public event_function_base<_TMPLARGLIST> : public event_function_base<_TMPLARGLIST>
{ {
public: public:
@ -131,7 +131,7 @@ private:
}; };
template <class T, _JOIN(class D, _TMPLARGS)> template <class T, _JOIN(class D, _TMPLARGS)>
class TL_PUBLIC generic_event_function_with_data<T, D, _TMPLARGLISTP> class TL_PUBLIC_TEMPLATE generic_event_function_with_data<T, D, _TMPLARGLISTP>
: public event_function_base<_TMPLARGLIST> : public event_function_base<_TMPLARGLIST>
{ {
public: public:
@ -162,7 +162,7 @@ private:
}; };
template <_TMPLARGS> template <_TMPLARGS>
class TL_PUBLIC event<_TMPLARGLISTP> class TL_PUBLIC_TEMPLATE event<_TMPLARGLISTP>
{ {
public: public:
typedef event_function_base<_TMPLARGLISTP> func; typedef event_function_base<_TMPLARGLISTP> func;

View File

@ -240,7 +240,7 @@ private:
* This class represents a weak or shared pointer for the given type T. * This class represents a weak or shared pointer for the given type T.
*/ */
template <class T, bool Shared> template <class T, bool Shared>
class TL_PUBLIC weak_or_shared_ptr class TL_PUBLIC_TEMPLATE weak_or_shared_ptr
: public WeakOrSharedPtr : public WeakOrSharedPtr
{ {
public: public:
@ -376,7 +376,7 @@ public:
* See description of tl::Object for details. * See description of tl::Object for details.
*/ */
template <class T> template <class T>
class TL_PUBLIC weak_ptr class TL_PUBLIC_TEMPLATE weak_ptr
: public weak_or_shared_ptr<T, false> : public weak_or_shared_ptr<T, false>
{ {
public: public:
@ -404,7 +404,7 @@ public:
* See description of tl::Object for details. * See description of tl::Object for details.
*/ */
template <class T> template <class T>
class TL_PUBLIC shared_ptr class TL_PUBLIC_TEMPLATE shared_ptr
: public weak_or_shared_ptr<T, true> : public weak_or_shared_ptr<T, true>
{ {
public: public:

View File

@ -44,7 +44,7 @@ namespace gsi
{ {
class GSI_PUBLIC ClassBase; class GSI_PUBLIC ClassBase;
struct NoAdaptorTag; struct NoAdaptorTag;
template <class T, class A> class GSI_PUBLIC Class; template <class T, class A> class GSI_PUBLIC_TEMPLATE Class;
template <class X> const ClassBase *cls_decl (); template <class X> const ClassBase *cls_decl ();
} }
@ -102,7 +102,7 @@ protected:
* We will employ RTTI to identify a type through that base class. * We will employ RTTI to identify a type through that base class.
*/ */
template <class T> template <class T>
class TL_PUBLIC VariantUserClass class TL_PUBLIC_TEMPLATE VariantUserClass
: public VariantUserClassBase : public VariantUserClassBase
{ {
public: public:

View File

@ -150,7 +150,7 @@ public:
*/ */
template <class Obj> template <class Obj>
class TL_PUBLIC XMLReaderProxy class TL_PUBLIC_TEMPLATE XMLReaderProxy
: public XMLReaderProxyBase : public XMLReaderProxyBase
{ {
public: public:
@ -714,7 +714,7 @@ private:
*/ */
template <class Obj, class Parent, class Read, class Write> template <class Obj, class Parent, class Read, class Write>
class TL_PUBLIC XMLElement class TL_PUBLIC_TEMPLATE XMLElement
: public XMLElementBase : public XMLElementBase
{ {
public: public:
@ -819,7 +819,7 @@ private:
*/ */
template <class Obj, class Parent, class Read, class Write> template <class Obj, class Parent, class Read, class Write>
class TL_PUBLIC XMLElementWithParentRef class TL_PUBLIC_TEMPLATE XMLElementWithParentRef
: public XMLElementBase : public XMLElementBase
{ {
public: public:
@ -933,7 +933,7 @@ private:
*/ */
template <class Value, class Parent, class Read, class Write, class Converter> template <class Value, class Parent, class Read, class Write, class Converter>
class TL_PUBLIC XMLMember class TL_PUBLIC_TEMPLATE XMLMember
: public XMLElementBase : public XMLElementBase
{ {
public: public:
@ -1024,7 +1024,7 @@ private:
*/ */
template <class Value, class Parent, class Write, class Converter> template <class Value, class Parent, class Write, class Converter>
class TL_PUBLIC XMLWildcardMember class TL_PUBLIC_TEMPLATE XMLWildcardMember
: public XMLElementBase : public XMLElementBase
{ {
public: public:
@ -1092,7 +1092,7 @@ private:
*/ */
template <class Obj> template <class Obj>
class TL_PUBLIC XMLStruct class TL_PUBLIC_TEMPLATE XMLStruct
: public XMLElementBase : public XMLElementBase
{ {
public: public:

View File

@ -92,6 +92,28 @@ def ph(x):
else: else:
return x.replace("X", "") return x.replace("X", "")
def map2str(dict):
# A helper function to product a "canonical" (i.e. sorted-keys) string
# representation of a dict
keys = list(dict)
for k in keys:
if type(k) is str:
strKeys = []
strDict = {}
for x in keys:
strKeys.append(str(x))
strDict[str(x)] = dict[x]
strings = []
for x in sorted(strKeys):
strings.append(str(x) + ": " + str(strDict[x]))
return "{" + ", ".join(strings) + "}"
strings = []
for x in sorted(keys):
strings.append(str(x) + ": " + str(dict[x]))
return "{" + ", ".join(strings) + "}"
class BasicTest(unittest.TestCase): class BasicTest(unittest.TestCase):
def test_00(self): def test_00(self):
@ -2066,44 +2088,27 @@ class BasicTest(unittest.TestCase):
def test_41(self): def test_41(self):
v3 = sys.version_info >= (3, 0)
# maps # maps
b = pya.B() b = pya.B()
b.insert_map1(1, "hello") b.insert_map1(1, "hello")
if v3: self.assertEqual(map2str(b.map1), "{1: hello}")
self.assertEqual(repr(b.map1), "{1: 'hello'}")
else:
self.assertEqual(repr(b.map1), "{1L: 'hello'}")
b.map1 = {} b.map1 = {}
b.insert_map1(2, "hello") b.insert_map1(2, "hello")
if v3: self.assertEqual(map2str(b.map1_cref()), "{2: hello}")
self.assertEqual(repr(b.map1_cref()), "{2: 'hello'}")
else:
self.assertEqual(repr(b.map1_cref()), "{2L: 'hello'}")
b.map1 = {} b.map1 = {}
b.insert_map1(3, "hello") b.insert_map1(3, "hello")
if v3: self.assertEqual(map2str(b.map1_cptr()), "{3: hello}")
self.assertEqual(repr(b.map1_cptr()), "{3: 'hello'}")
else:
self.assertEqual(repr(b.map1_cptr()), "{3L: 'hello'}")
b.map1 = {} b.map1 = {}
b.insert_map1(4, "hello") b.insert_map1(4, "hello")
if v3: self.assertEqual(map2str(b.map1_ref()), "{4: hello}")
self.assertEqual(repr(b.map1_ref()), "{4: 'hello'}")
else:
self.assertEqual(repr(b.map1_ref()), "{4L: 'hello'}")
b.map1 = {} b.map1 = {}
b.insert_map1(5, "hello") b.insert_map1(5, "hello")
if v3: self.assertEqual(map2str(b.map1_ptr()), "{5: hello}")
self.assertEqual(repr(b.map1_ptr()), "{5: 'hello'}")
else:
self.assertEqual(repr(b.map1_ptr()), "{5L: 'hello'}")
self.assertEqual(b.map1_cptr_null() == None, True); self.assertEqual(b.map1_cptr_null() == None, True);
self.assertEqual(b.map1_ptr_null() == None, True); self.assertEqual(b.map1_ptr_null() == None, True);
@ -2117,52 +2122,28 @@ class BasicTest(unittest.TestCase):
self.assertEqual(error_caught, True) self.assertEqual(error_caught, True)
b.map1 = { 42: "1", -17: "True" } b.map1 = { 42: "1", -17: "True" }
if v3: self.assertEqual(map2str(b.map1), "{-17: True, 42: 1}")
self.assertEqual(repr(b.map1), "{42: '1', -17: 'True'}")
else:
self.assertEqual(repr(b.map1), "{42L: '1', -17L: 'True'}")
b.set_map1_cref({ 42: "2", -17: "True" }) b.set_map1_cref({ 42: "2", -17: "True" })
if v3: self.assertEqual(map2str(b.map1), "{-17: True, 42: 2}")
self.assertEqual(repr(b.map1), "{42: '2', -17: 'True'}")
else:
self.assertEqual(repr(b.map1), "{42L: '2', -17L: 'True'}")
b.set_map1_cptr({ 42: "3", -17: "True" }) b.set_map1_cptr({ 42: "3", -17: "True" })
if v3: self.assertEqual(map2str(b.map1), "{-17: True, 42: 3}")
self.assertEqual(repr(b.map1), "{42: '3', -17: 'True'}")
else:
self.assertEqual(repr(b.map1), "{42L: '3', -17L: 'True'}")
b.set_map1_cptr(None) b.set_map1_cptr(None)
if v3: self.assertEqual(map2str(b.map1), "{-17: True, 42: 3}")
self.assertEqual(repr(b.map1), "{42: '3', -17: 'True'}")
else:
self.assertEqual(repr(b.map1), "{42L: '3', -17L: 'True'}")
b.set_map1_ref({ 42: "4", -17: "True" }) b.set_map1_ref({ 42: "4", -17: "True" })
if v3: self.assertEqual(map2str(b.map1), "{-17: True, 42: 4}")
self.assertEqual(repr(b.map1), "{42: '4', -17: 'True'}")
else:
self.assertEqual(repr(b.map1), "{42L: '4', -17L: 'True'}")
b.set_map1_ptr({ 42: "5", -17: "True" }) b.set_map1_ptr({ 42: "5", -17: "True" })
if v3: self.assertEqual(map2str(b.map1), "{-17: True, 42: 5}")
self.assertEqual(repr(b.map1), "{42: '5', -17: 'True'}")
else:
self.assertEqual(repr(b.map1), "{42L: '5', -17L: 'True'}")
b.set_map1_ptr(None) b.set_map1_ptr(None)
if v3: self.assertEqual(map2str(b.map1), "{-17: True, 42: 5}")
self.assertEqual(repr(b.map1), "{42: '5', -17: 'True'}")
else:
self.assertEqual(repr(b.map1), "{42L: '5', -17L: 'True'}")
b.map2 = { 'xy': 1, -17: True } b.map2 = { 'xy': 1, -17: True }
if v3: self.assertEqual(map2str(b.map2), "{-17: True, xy: 1}")
self.assertEqual(repr(b.map2), "{'xy': 1, -17: True}")
else:
self.assertEqual(repr(b.map2), "{'xy': 1L, -17L: True}")
self.assertEqual(b.map2_null(), None) self.assertEqual(b.map2_null(), None)

View File

@ -77,6 +77,28 @@ class MyObject(pya.QObject):
def on_event_filter(self, ef): def on_event_filter(self, ef):
self.ef = ef self.ef = ef
def map2str(dict):
# A helper function to product a "canonical" (i.e. sorted-keys) string
# representation of a dict
keys = list(dict)
for k in keys:
if type(k) is str:
strKeys = []
strDict = {}
for x in keys:
strKeys.append(str(x))
strDict[str(x)] = dict[x]
strings = []
for x in sorted(strKeys):
strings.append(str(x) + ": " + str(strDict[x]))
return "{" + ", ".join(strings) + "}"
strings = []
for x in sorted(keys):
strings.append(str(x) + ": " + str(dict[x]))
return "{" + ", ".join(strings) + "}"
# The Qt binding tests # The Qt binding tests
class QtBindingTest(unittest.TestCase): class QtBindingTest(unittest.TestCase):
@ -462,15 +484,13 @@ class QtBindingTest(unittest.TestCase):
# QHash bindings # QHash bindings
slm = MyStandardItemModel() slm = MyStandardItemModel()
r1 = "{0: \'display\', 1: \'decoration\', 2: \'edit\', 3: \'toolTip\', 4: \'statusTip\', 5: \'whatsThis\'}"
r2 = "{0L: \'display\', 1L: \'decoration\', 2L: \'edit\', 3L: \'toolTip\', 4L: \'statusTip\', 5L: \'whatsThis\'}"
self.assertEqual(str(slm.roleNames()) == r1 or str(slm.roleNames()) == r2, True)
rn = slm.roleNames() rn = slm.roleNames()
rn[7] = "blabla" self.assertEqual(map2str(rn), "{0: display, 1: decoration, 2: edit, 3: toolTip, 4: statusTip, 5: whatsThis}")
slm.srn(rn) rnNew = slm.roleNames()
r1 = "{0: \'display\', 1: \'decoration\', 2: \'edit\', 3: \'toolTip\', 4: \'statusTip\', 5: \'whatsThis\', 7: \'blabla\'}" rnNew[7] = "blabla"
r2 = "{0L: \'display\', 1L: \'decoration\', 2L: \'edit\', 3L: \'toolTip\', 4L: \'statusTip\', 5L: \'whatsThis\', 7L: \'blabla\'}" slm.srn(rnNew)
self.assertEqual(str(slm.roleNames()) == r1 or str(slm.roleNames()) == r2, True) rn = slm.roleNames()
self.assertEqual(map2str(rn), "{0: display, 1: decoration, 2: edit, 3: toolTip, 4: statusTip, 5: whatsThis, 7: blabla}")
def test_44(self): def test_44(self):
@ -488,8 +508,8 @@ class QtBindingTest(unittest.TestCase):
self.assertEqual(child.height > 100, True) self.assertEqual(child.height > 100, True)
parent.resize(100, 100) parent.resize(100, 100)
self.assertEqual(child.width < 100, True) self.assertEqual(child.width <= 100, True)
self.assertEqual(child.height < 100, True) self.assertEqual(child.height <= 100, True)
# now if we delete the parent, the child needs to become disconnected # now if we delete the parent, the child needs to become disconnected

View File

@ -170,7 +170,7 @@ class DBTrans_TestClass < TestBase
assert_equal( c.is_mag?, true ) assert_equal( c.is_mag?, true )
assert_equal( c.rot, RBA::DCplxTrans::M0.rot ) assert_equal( c.rot, RBA::DCplxTrans::M0.rot )
assert_equal( c.s_trans.to_s, "m0 2.5,-12.5" ) assert_equal( c.s_trans.to_s, "m0 2.5,-12.5" )
assert_equal( c.angle, 45 ) assert_equal( (c.angle - 45).abs < 1e-10, true )
assert_equal( c.ctrans( 5 ).to_s, "3.75" ) assert_equal( c.ctrans( 5 ).to_s, "3.75" )
assert_equal( c.trans( RBA::DPoint::new( 12, 16 ) ).to_s, "17.3492424049,-14.6213203436" ) assert_equal( c.trans( RBA::DPoint::new( 12, 16 ) ).to_s, "17.3492424049,-14.6213203436" )
@ -324,7 +324,7 @@ class DBTrans_TestClass < TestBase
assert_equal( c.is_mag?, true ) assert_equal( c.is_mag?, true )
assert_equal( c.rot, RBA::CplxTrans::M0.rot ) assert_equal( c.rot, RBA::CplxTrans::M0.rot )
assert_equal( c.s_trans.to_s, "m0 3,-13" ) assert_equal( c.s_trans.to_s, "m0 3,-13" )
assert_equal( c.angle, 45 ) assert_equal( (c.angle - 45).abs < 1e-10, true )
assert_equal( c.ctrans( 5 ).to_s, "3.75" ) assert_equal( c.ctrans( 5 ).to_s, "3.75" )
assert_equal( c.trans( RBA::Point::new( 12, 16 ) ).to_s, "17.3492424049,-14.6213203436" ) assert_equal( c.trans( RBA::Point::new( 12, 16 ) ).to_s, "17.3492424049,-14.6213203436" )

View File

@ -576,8 +576,8 @@ class QtBinding_TestClass < TestBase
assert_equal(child.height() > 100, true) assert_equal(child.height() > 100, true)
parent.resize(100, 100) parent.resize(100, 100)
assert_equal(child.width() < 100, true) assert_equal(child.width() <= 100, true)
assert_equal(child.height() < 100, true) assert_equal(child.height() <= 100, true)
# now if we delete the parent, the child needs to become disconnected # now if we delete the parent, the child needs to become disconnected