aboutsummaryrefslogtreecommitdiffstats
path: root/tests/samplebinding/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* Fix crash when creating signatures of function pointers in a parameterAlexandru Croitor2016-12-131-0/+1
| | | | | | | | | | | | | | | | | | Previously any presence of a function pointer parameter (which had a void return type) in a function declaration would cause a crash, because the type of the whole function pointer was misinterpreted as just "void", and when type() was called on such a parameter a null pointer was returned instead of an AbstractMetaType object, which when accessed caused a crash. Fix consists in checking that the parameters of a function do not have a void type (unless there's only one parameter). Some additionals checks are added when trying to access the signature of a function. Change-Id: I4baa477732ce1e7c8a494137f37f58bc0df38a07 Task-number: PYSIDE-455 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Revert "Fix the shiboken tests on VS2015"Christian Tismer2016-06-041-0/+4
| | | | | | | | | | Don't remove the photon test; doing so is just asking to allow bugs to creep in undetected. Fixing the test is much better. This reverts commit 4614591a6cb88626541c03f10ec265f30668915b. Change-Id: I68f0a8f43acb2ff8d4e00b01a1204e9e00a5c7f4 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix the shiboken tests on VS2015Christian Tismer2016-06-031-4/+0
| | | | | | | | | | | | | | | | | | The shiboken tests do not build, so we cannot test at all with VS2015. One issue was a simple C++11 restriction, the other involves the classes in photon.cpp / photon.h . I could not find out how to fix that, so I removed the photon files, in order to get a running test framework. If somebody knows an easy patch instead of removing photon, please let me know. Otherwise I would prefer pretty much to move on. [ChangeLog][shiboken][PYSIDE-324] Fix compilation of tests with VS2015 Change-Id: I6a8d64b18c5eba110f4c03dba63c4b21d6816918 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Simple test for the template pointer parameter fix.Florin Dinu2015-12-111-0/+1
|
* fix broken shiboken tests after the big renamingChristian Tismer2015-10-211-2/+2
|
* Fix for containers with 'const' valuesMatthew Woehlke2014-01-071-0/+2
| | | | | | | | | Fix omission of 'const' specifier when generating binding code for containers whose value type is 'const', which would lead to binding code that does not compile due to 'const' mismatch. Includes test case. Change-Id: Iff99a16ee071bb255f78e86e2456e5206cc00cfb Reviewed-by: John Cummings <jcummings2@users.sf.net>
* Write inititializations in topological orderMatthew Woehlke2013-09-241-0/+1
| | | | | | | | | | | | | | | | | | Add methods to various places in the hierarchy so that the generator can access the topologically ordered class list (in addition to the unordered class list). Modify CppGenerator::finishGeneration to use this. This fixes a failure to correctly create Python wrapper classes due to subclass wrappers being initialized before their base class (with the result that the looked-up type object for the base class is null, causing the derived class to be created without referencing the base). Also change one of the test cases to test that we correctly wrap a typedef of a template class derived from a non-template base (which was failing before this change for the aforementioned reason). Change-Id: Ib4dc2626a41cb7bb905ff4a302c2613ea12d026b Reviewed-by: John Cummings <jcummings2@users.sf.net>
* Improve dependencies for testsMatthew Woehlke2013-07-301-3/+2
| | | | | | | | | | | | | | | | | | | | | Add the global header and typesystem XML, and shiboken itself, as dependencies to running Shiboken for generating the wrapped code used in the unit tests. This gives a better example in case of users looking at this code for how to do things in their own projects, and also makes test writing easier by removing the need to do a clean build or touch files to force the wrapping code to be recreated when modifying the test code or the generator. Change command invocation to use shiboken as a target name (CMake will recognize it as a target and use the correct path automatically), and remove the now redundant dependency of the wrapping libraries on the same. (This is superfluous both because using shiboken as a target will cause CMake to add an implicit dependency on it for users of the generated files, but also because it isn't really needed; the generate command having it as a dependency covers needing it built first, and is what we really care about as far as rebuilding anything if it changes.) Change-Id: If5cdf2e98602e500b49ba7b000e4e30e77e1a136 Reviewed-by: John Ehresman <jpe@wingware.com>
* Find function modifications defined in the 2nd+ base class.John Ehresman2012-06-141-0/+2
| | | | | | | Fixes bug PYSIDE-54 Change-Id: Ic5c341741170cc77e8ebb59c46c746211582ddeb Reviewed-by: Marcelo Lira <marcelo.lira@openbossa.org>
* Merge GeneratorRunner inside Shiboken.Hugo Parente Lima2012-03-091-3/+2
| | | | | | | | | | | | | | | | Conflicts: CMakeLists.txt data/CMakeLists.txt doc/CMakeLists.txt doc/_templates/index.html doc/_templates/layout.html doc/_themes/pysidedocs/static/pysidedocs.css doc/commandlineoptions.rst doc/conf.py.in doc/contents.rst doc/images/bindinggen-development.png doc/images/boostqtarch.png tests/CMakeLists.txt
* Updates std::list methods writer to use the new converters.Marcelo Lira2012-03-081-1/+3
| | | | Also added a couple of related unit tests.
* Added unit test for bug 969.Hugo Parente Lima2012-03-081-0/+1
|
* Added a test for a typedef of a pointer to a struct.Marcelo Lira2012-03-081-0/+1
| | | | This is only a compilation test, no Python test was provided.
* New conversions for containers.Marcelo Lira2012-03-081-0/+1
|
* Added tests for a class that its only constructor is the copy one.Marcelo Lira2012-03-081-0/+2
| | | | | | | | This simulates a situation found in QtWebKit's QWebDatabase and QWebSecurityOrigin classes. Reviewed by Luciano Wolf <luciano.wolf@openbossa.org> Reviewed by Renato Araújo <renato.filho@openbossa.org>
* Added tests for classes that are typedefs that implement a template class.Marcelo Lira2012-03-081-0/+3
| | | | This simulates the situation found in Qt's phonon module.
* Added a test dealing with a reference to an Object Type passed to Python.Marcelo Lira2012-03-081-0/+1
| | | | | The test is for an Object Type that didn't existed in Python and is passed to it as C++ reference through a virtual method.
* Added tests for custom conversion and buffer protocol.Marcelo Lira2012-03-081-0/+1
| | | | It it inspired by some of PySide's QByteArray tests.
* Added test for a typedef to a primitive numerical type.Marcelo Lira2012-03-081-0/+1
|
* Test for bug 464 - "Can't create target lang package and namespace with the ↵Hugo Parente Lima2012-03-081-0/+2
| | | | same name"
* Added tests for conversion operator that returns a constant reference type.Marcelo Lira2012-03-081-0/+3
| | | | | | | This is related to bug #716: http://bugs.pyside.org/show_bug.cgi?id=716 Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
* Added unit tests to simulate the QPainter::drawText overloads.Marcelo Lira2012-03-081-0/+2
| | | | The classes Rect and RectF were added to help with the imitation.
* Tests for reverse operatorsLauro Neto2012-03-081-0/+4
| | | | | | | | | | | CPython calls nb_and with swapped arguments for reverse operators. This tests checks if the reverse operator raises NotImplementedError instead of TypeError when there isn't a valid reverse operator. Raising TypeError would cause the operator to fail.
* The option "avoid protected hack" is now set via command line.sb-1.0.0-rc1Marcelo Lira2012-03-081-1/+1
| | | | | | | | Instead of the old ugly way of compiling the behaviour forever using "#define". Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
* Fix bug 616 - "error compiling when public and private methods differ by the ↵Hugo Parente Lima2012-03-081-0/+1
| | | | | | | const-ness" Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Renato Araújo <renato.filho@openbossa.org>
* Test bindings project files modified to use key/value pair text files.Marcelo Lira2012-03-081-3/+3
| | | | | Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
* Test bindings now use project files instead of generator command line options.Marcelo Lira2012-03-081-10/+5
|
* Shiboken binary now responds to the "--version" argument.Marcelo Lira2012-03-081-1/+2
| | | | | The version command line argument was previously answered by GeneratorRunner. This commit also generally updates some CMake files.
* Shiboken executable calls GeneratorRunner with the renamed "--generator-set" ↵Marcelo Lira2012-03-081-1/+3
| | | | argument.
* Use SBK_PYTHON_INCLUDE_DIR instead of PYTHON_INCLUDE_DIRS or ↵Hugo Parente Lima2012-03-081-1/+1
| | | | | | | PYTHON_INCLUDE_PATH. Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Lauro Moura <lauro.neto@openbossa.org>
* Fix bug#633 - "bool of null QDate (possibly other empty QString/null QObj ↵Hugo Parente Lima2012-03-081-1/+1
| | | | | | | types?) returns True for empty instance; probably should be False" Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Renato Araújo <renato.filho@openbossa.org>
* Added test to assert the precedence of enum arguments over int implicit ↵Marcelo Lira2012-03-081-0/+2
| | | | | | | | | | | | | conversions. This test is inspired by bug #511 [1], and it checks the precedence of an enum argument over a class that can be implicitly built from an integer. [1] http://bugs.openbossa.org/show_bug.cgi?id=511 Reviewed by Luciano Wolf <luciano.wolf@openbossa.org> Reviewed by Renato Araújo <renato.filho@openbossa.org>
* Fix bug#495 - "Broken rich compare operators if they use an object-type as ↵Hugo Parente Lima2012-03-081-0/+1
| | | | parameter"
* Added support for promoting enums from removed namespaces to upper scope.Marcelo Lira2012-03-081-0/+1
| | | | | | | | | | Classes in namespaces marked not to be generated are always moved to upper scopes, the current modification add this same behaviour to enums. Tests were also added. Reviewed by Lauro Moura <lauro.neto@openbossa.org> Reviewed by Renato Araújo <renato.filho@openbossa.org>
* Added tests to check the release of ownership of objects returned from Python.Marcelo Lira2012-03-081-0/+1
| | | | | | | | | | | The ObjectModel test class was introduced to check if the transference of ownership of objects returned from Python to C++ through a virtual method is working properly. Also updated the other test that uses the ObjectView class. Reviewed by Lauro Moura <lauro.neto@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
* Fix bug#513 - "Hardcoded bool return type for operator overloads"Hugo Parente Lima2012-03-081-0/+1
| | | | | Reviewer: Renato Araújo <renato.filho@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
* Test case for proper generation of constructor altered by conversion-rule tag.Marcelo Lira2012-03-081-0/+1
| | | | | Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
* Fix bug#411 - "Incorrect return statement generated in a function that ↵Hugo Parente Lima2012-03-081-0/+1
| | | | | | | returns a reference" Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
* Added test for overload decisor handling container dependencies.Marcelo Lira2012-03-081-0/+1
| | | | | | | | | | | | | | | Explaining with an example. Consider a function called "function" with two signatures accepting a list of Point and a list of PointF, respectively. Consider also that Point is implicitly convertible to PointF. void function(list<Point>&) void function(list<PointF>&) A list of Point should be checked before a list of PointF. Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
* Created unit test for unknown class holder.renatofilho2012-03-081-0/+1
| | | | | Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
* Unit test to target conversion.renatofilho2012-03-081-0/+1
| | | | | Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
* Shiboken generator code moved to the directory generator.Hugo Parente Lima2012-03-081-1/+1
| | | | | Reviewer: Renato Araújo <renato.filho@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
* Fix code generation for modified constructors.Luciano Wolf2012-03-081-0/+1
| | | | | Reviewers: Renato Araújo <renato.filho@openbossa.org> Hugo Parente Lima <hugo.pl@gmail.com>
* Created cmake option 'ENABLE_VERSION_SUFFIX' to use version on generated ↵sb-0.5.0Renato Filho2010-09-101-3/+1
| | | | | | | files to allow multiples version installed simultaneous. Reviewer: Hugo Parente Lima <hugo.pl@gmail.com> Luciano Wolf <luciano.wolf@openbossa.org>
* Impleted auto code for classes derived from list container.Renato Filho2010-08-301-0/+1
| | | | | Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Hugo Parente Lima <hugo.pl@gmail.com>
* Use .pyd to python modules on windows.Renato Filho2010-08-191-0/+3
| | | | | Reviewer: Hugo Parente Lima <hugo.pl@gmail.com> Luciano Wolf <luciano.wolf@openbossa.org>
* Created unit test to operator().Renato Filho2010-08-111-0/+1
| | | | | Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
* Use correct python library in debug mode.Renato Filho2010-07-191-1/+1
| | | | | Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
* Fixes the build-tests by including the library postfixes in the programRenato Filho2010-06-181-1/+1
| | | | | | | | calls Author: Didier Raboud <didier@raboud.com> Reviewers: Luciano Wolf <luciano.wolf@openbossa.org>, Marcelo Lira <marcelo.lira@openbossa.org>
* Used CMAKE_DEBUG_POSTFIX in plugin name on generatorrunner.Renato Filho2010-06-171-1/+1
| | | | | Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>, Marcelo Lira <marcelo.lira@openbossa.org>