Commit Graph

33 Commits

Author SHA1 Message Date
Matthias Koefferlein d35e86e189 Updated tests after last change (edge transformation behaviour) 2019-02-10 16:21:44 +01:00
Matthias Koefferlein 30e26c4f96 Avoid an issue with virtual functions
Reimplementing virtual functions with
"const &" arguments wasn't behaving as
expected because these arguments were
copied.

Now, "const &" for arguments (in virtual
function reimplementation) is not implemented
as a copy.

In addition, now it's possible to declare
results as references always (also if const &).

See gsiTest.cc:1078 for example:

  //  gsi::arg_make_reference makes the function's return value
  //  always being taken as a reference
  gsi::method<C_P, const CopyDetector &, const CopyDetector &, gsi::arg_make_reference> ("pass_cd_cref_as_ref", &C_P::pass_cd_cref)
2019-01-31 01:07:15 +01:00
Matthias Koefferlein d4d7ea8022 Updated copyright. 2019-01-08 01:09:25 +01:00
Matthias Koefferlein feb2b69aa9 Merge remote-tracking branch 'origin/master' into dvb 2019-01-08 00:49:16 +01:00
Matthias Koefferlein e3b8d3635c Small bugfix: object._destroy wasn't working for directly passed objects. 2019-01-02 23:18:14 +01:00
Matthias Koefferlein 694730746b WIP: added more ruby, python tests. 2018-11-17 00:28:32 +01:00
Matthias Koefferlein 90c03140b3 Fixed #185 for pymod branch 2018-10-14 23:42:10 +02:00
Matthias Koefferlein a7846ead9f Add-on to previous commit: fixes some Python issues
The comments for LoadLayoutOptions#layer_map, #cif_layer_map
and #dxf_layer_map have been updated to reflect the new status
of these properties (which have been methods). The tests
are updated accordingly (layer_map() -> layer_map).
2018-10-09 00:18:45 +02:00
Matthias Koefferlein 6795de1dbb Merge remote-tracking branch 'remotes/origin/master' into pymod
Provides fixes for issue #166 and #172.
2018-09-26 21:15:08 +02:00
Matthias Köfferlein 808f91223a
Merge pull request #171 from lightwave-lab/testfix/pya_dbTransTest
Changing pya.CplxTrans.angle test from assertEqual to assertAlmostEqual
2018-09-25 20:44:28 +02:00
Thomas Ferreira de Lima 214662997c
Changing pya.CplxTrans.angle test from assertEqual to assertAlmostEqual
Rationale:
pya.CplxTrans.angle is computed by doing atan2(m_sin, m_cos), but the algorithm used both in C and python for sin, cos and atan2 are not as precise as IEEE's float.

In python, for example, this happens:

``` python
>>> from math import pi, cos, sin, atan2
>>> atan2(sin(45*pi/180), cos(45*pi/180)) * 180 / pi == 45
False
>>> atan2(sin(45*pi/180), cos(45*pi/180)) * 180 / pi, 45
(44.99999999999999, 45)
```
2018-09-22 15:15:33 -04:00
Thomas Ferreira de Lima e217e6a891
[skip ci] fixing test test_42 in qtbinding.py and adding note to qtbinding.rb
Sorry, don't know ruby
2018-09-22 14:29:21 -04:00
Matthias Koefferlein 5fe0aca9c7 Fixed a segfault on help(pya.Box)
Needed to refactor the class hierarchy of the Python classes.
Basically the module specific base class was removed as it does
not provide any benefit. The object layout of the PyObject
specialization was modified such that the payload is attached
to the end. This is compatible with the hidden extensions
which Python adds to normal objects.
2018-07-19 23:50:24 +02:00
Matthias Koefferlein d2c890ab6d WIP: fixed unit tests for Qt-less build. 2018-07-10 01:17:35 +02:00
Matthias Koefferlein 07b655d3bc WIP: removed debug output, resolved a consistency issue between QtGui and QtCore - QtGui was injecting an enum into QtGui. 2018-05-30 23:17:35 +02:00
Matthias Koefferlein 0b0393ce56 First version of Python module. 2018-05-26 21:31:39 +02:00
Matthias Koefferlein 65cfb2d4e4 WIP: consistent naming of some predicates in Ruby with ?, unit tests for reader option bindings. 2018-04-17 01:56:59 +02:00
Matthias Koefferlein 3d5780db2b Bugfix #109 (part 3): OASIS/GDS writer fixed + unit test added. 2018-04-06 23:27:29 +02:00
Matthias Koefferlein 6052a04429 A few enhancements and unit tests for PCells
This commit adds unit tests for implementation helper-based
PCells in Python and Ruby.
2018-02-17 01:26:25 +01:00
Matthias Koefferlein 8003d1bb47 Merge branch 'master' into macos-build-on-master 2018-01-02 23:37:45 +01:00
Matthias Koefferlein ffb56335fb Updated copyright note to 2018. 2018-01-01 21:08:06 +01:00
Matthias Koefferlein d5d95c536c Generalized Python unit tests to enhance compatibility across Python versions. 2018-01-01 08:39:41 -08:00
Matthias Koefferlein 395643b427 Fixed #44 (Transformation constructor with x,y not working) 2017-12-23 19:42:39 +01:00
Matthias Koefferlein 4855231342 Fixed #40 (Crash in Python binding)
Plus the same effect was observed for Ruby and fixed there as well.
2017-12-21 00:55:40 +01:00
Matthias Koefferlein 21e42788e6 Fixed #39 (Action cannot be reassigned) 2017-12-17 22:38:48 +01:00
Matthias Koefferlein 1cea7dfd23 Fixed #33 (Plugin factory not working when using with Python)
The fix consisted of introducing "factory" type virtual
methods which ensure that a reference is held to the
returned object. This is important for implementing
factory methods in Python. Without this, the object
get destroyed before we have a chance to increment the
reference count.
2017-12-11 23:51:00 +01:00
klayoutmatthias c442202ca4 Enabled Windows build on Qt5. 2017-07-23 23:36:29 +02:00
Matthias Koefferlein 585d0941bb RBA Unit test enhancements
- Include a copy of the unit test framework so we're no longer
  depending on incompatible versions for Ruby 1 and 2.
- Avoid duplication of path entries in unit tests
2017-07-23 23:03:21 +02:00
Matthias Koefferlein f038efa8be Fixed Python performance test. 2017-06-16 22:50:14 +02:00
Matthias Koefferlein cc88277af9 Added a small performance test for Python too. 2017-06-16 22:49:09 +02:00
Matthias Koefferlein 1f60e7729e Qt signals can be bound to functions with less args in Python
With this change it is possible to bind signals to functions
accepting less arguments. For example:

    def triggered():
      ...

    b = pya.QPushButton()
    b.clicked(triggered)
    b.emit_clicked(True)

wasn't working before since triggered() gets one parameter
(checked) and the call fails. Now, additional parameters are
ignored.
2017-02-24 23:48:47 +01:00
Matthias Koefferlein 0c89999705 Updated Python tests for qtbindings. 2017-02-22 00:24:43 +01:00
Matthias Koefferlein 1b98f9b0f9 Initialized repository with current sources. 2017-02-12 13:21:08 +01:00