aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fixes Converter<void*>::toPython method.Marcelo Lira2010-03-231-0/+6
| | | | | | | | The void* converter transforms a C++ NULL pointer in a Python None. An unit test for this case was added as well. Reviewed by Anderson Lizardo <anderson.lizardo@openbossa.org> Reviewed by Bruno Araújo <bruno.araujo@openbossa.org>
* Adds tests to type system modifications regarding reference to pointer type.Marcelo Lira2010-03-224-0/+153
| | | | | Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Lauro Moura <lauro.neto@openbossa.org>
* Adding greedy method to CollectorLauro Neto2010-03-224-2/+28
| | | | | This method will somehow conflict with the external operator in libother OtherObjectType
* Adding OtherObjectType to libotherLauro Neto2010-03-227-0/+148
| | | | Used in external reverse operators defined in other modules.
* Adds a test for a method with modifications and custom conversion rules.Marcelo Lira2010-03-193-1/+28
| | | | | | | | | | | | | The test function does nothing in fact, it is there just to cause a situation that could cause a compilation problem if the generator is not working as it should. In other words if it compiles, then it is ok. :) The added method was a dummy clone of a similar QPixmap.loadFromData method signature that prevented QtGui from compiling properly. Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Anderson Lizardo <anderson.lizardo@openbossa.org>
* Added a unit test to check the object-type hashability.Hugo Lima2010-03-191-1/+7
| | | | | Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Reviewer: Bruno Araújo <bruno.araujo@openbossa.org>
* Allow hash-function tag to be definied in object-types (Fix bug #186).Hugo Lima2010-03-193-1/+8
|
* Write enum checks before int, long and bool checks.Hugo Lima2010-03-181-2/+5
| | | | | | Enums are implicitly converted to these types in C++, if we dont do that the enum version of some functions can never be called, because the int one will be if the int check was written before the enum check.
* Renamed templates used for conversions of containers.Hugo Lima2010-03-183-3/+3
|
* Changed the semantic of Converter<T>::isConvertible method.Hugo Lima2010-03-182-6/+15
| | | | | | | | | The new semantic is: Returns true when the type can be converted to T OR the type is T. The old semantic was: Returns true when the type can be converted to T and false if the type is T, however int and float converters did not follow this rule, because they used PyNumber_Check on their isConvertible implementation.
* Added test for conversion of lists with invalid contents.Hugo Lima2010-03-181-0/+5
|
* added support for pure virtual methods returning void ptrsMatti Airas2010-03-176-0/+27
| | | | | | | the return statements now have correct values for pure virtual methods returning void pointers. also added a dummy test for this (can't really test it properly until the semantics of casting the python return value into a void pointer is properly defined -- if ever).
* fixed a typo in the test class nameMatti Airas2010-03-171-2/+2
|
* Merge branch 'master' into extensibleconversionsMarcelo Lira2010-03-046-2/+23
|\ | | | | | | | | | | | | | | | | Conflicts: cppgenerator.cpp libshiboken/basewrapper.cpp Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Lauro Moura <lauro.neto@openbossa.org>
| * Merge remote branch 'hugopl/typediscovery2'Hugo Lima2010-03-036-2/+23
| |\ | | | | | | | | | | | | Conflicts: libshiboken/conversions.h
| | * Turn Number::m_value private to not cause problem when compiling with "avoid ↵Hugo Lima2010-03-021-1/+1
| | | | | | | | | | | | protected hack" on.
| | * Use polymorphic-id-expression to discover the correct type of a C++ object.Hugo Lima2010-03-023-1/+8
| | |
| | * Add test for bug on the current type discovery algorithm.Hugo Lima2010-03-023-0/+14
| | |
* | | Adds tests for a class without implicit conversions being extended in ↵Marcelo Lira2010-03-029-0/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | another module. One value type class, called NoImplicitConversion, without implicit conversions of any kind is declared in the first library, libsample. In the other library, libother, ExtendsNoImplicitConversion defines a conversion operator to turn itself into a NoImplicitConversion class. The unit tests tries to pass an ExtendsNoImplicitConversion object where a NoImplicitConversion is expected.
* | | Generator now writes code to support extended conversions.Marcelo Lira2010-03-021-1/+1
|/ / | | | | | | Removed "new_ctor_operator" test from black list.
* / Refactored and documented base Converters.Marcelo Lira2010-03-022-4/+4
|/ | | | | | | | | | | | To improve legibility and understanding ConverterBase<T> was renamed to ValueTypeConverter<T>, and ConverterBase<T*> specialization is now an independent base converter ObjectTypeConverter<T>. Converter_CppEnum was renamed to EnumConverter. The HeaderGenerator and custom converters for the test bindings were updated accordingly. Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Lauro Moura <lauro.neto@openbossa.org>
* Adds unit test for implicit conversion defined by a conversion operator.Marcelo Lira2010-03-013-0/+59
| | | | Reviewed by Hugo Parente <hugo.lima@openbossa.org>
* Shiboken generator now supports references to pointers as arguments.Marcelo Lira2010-02-261-0/+3
| | | | | | | Two methods with references to object type and value type pointers were added to BlackBox test class just to check the compilation. Reviewed by Hugo Parente <hugo.lima@openbossa.org>
* Added test for use of ObjectCopier of a type declared in other module.Hugo Lima2010-02-261-0/+3
| | | | This should create undefinied symbols on other module if it fails.
* Fix bug#142.Hugo Lima2010-02-244-0/+50
| | | | Reviewed by Marcelo Lira <marcelo.lira@openbossa.org> and Luciano Wolf <luciano.wolf@openbossa.org>
* Fixed support for innerclass.Renato Filho2010-02-241-0/+38
| | | | Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
* Adding default value for enum/flag constructorLauro Neto2010-02-231-0/+5
|
* Add hash function for Str and proper unit test.Hugo Lima2010-02-234-1/+56
|
* The C++-like enum values are now registered inside the related enums.Marcelo Lira2010-02-231-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Originally the values of an enum were registered in the scope that enclosed the enum declaration, just like C++ does, now in addition to this the values are registered inside the enum type. To exemplify, the following C++ enum: Scope { enum Foo { Value }; }; can be accessed in Python as this: Scope.Value as well as this: Scope.Foo.Value The enum unit tests were expanded to check for this new behaviour. Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
* Remove warning in injected code related to comparison between signed and ↵Hugo Lima2010-02-221-1/+1
| | | | | | unsigned integer expressions. Reviewed by Renato Araújo <renato.filho@openbossa.org>
* Adds test for C++ 'const char*' argument receiving a Python None as a null ↵Marcelo Lira2010-02-202-0/+52
| | | | | | | pointer. The test function 'countCharacters(const char*)' now returns -1 when receiving a null pointer.
* All enums are now extensible to match the C++ casting behaviour.Marcelo Lira2010-02-201-4/+11
| | | | | | | | | | | | | | | Now the user can build new values of a particular enum type passing an integer to its constructor. Thus, the following C++ code: MyEnum val = (MyEnum) 1; is the equivalent of this Python code: val = MyEnum(1) The enum unit tests were also updated. Reviewed by Lauro Moura <lauro.neto@openbossa.org>
* Added more tests for bugs found in overload resolution.Hugo Lima2010-02-193-1/+23
|
* Fixing array deallocation in exampleLauro Neto2010-02-191-1/+1
| | | | Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
* Adding test for sequenceToIntArrayLauro Neto2010-02-194-0/+65
| | | | Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
* other binding does not link against sample binding.Hugo Lima2010-02-182-3/+2
|
* User definied converters are written outside Shiboken namespace.Hugo Lima2010-02-185-1/+10
|
* Adds test for cast operator for a class in a different module.Marcelo Lira2010-02-188-1/+159
| | | | | | | | The new test adds a Number class to test library libother which defines an cast operator to Str, from libsample. The unit test tries to build an Str object passing an Number parameter. Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
* libother now uses its own library export macros instead of libsample ones.Marcelo Lira2010-02-182-2/+54
|
* Removed tests related to reference keeping from black list.Marcelo Lira2010-02-121-1/+1
|
* The tests for C++ class' fields and reference count will fail.Marcelo Lira2010-02-101-1/+1
| | | | | | | | Tests that check if a referred object reference count was decreased after its keeper object death. Since support for post-mortem reference cleaning wasn't implemented yet the tests are marked as a known fail. Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
* Adds 'reference-count' tag to ObjectView::setModel from test bindings.Marcelo Lira2010-02-101-1/+7
|
* Adds tests for reference counting in model/view style relationships.Marcelo Lira2010-02-107-0/+196
|
* Adds tests for classes with public member variables.Marcelo Lira2010-02-103-4/+133
| | | | | Three kinds of types are represented: primitive, value and object types. The unit tests also check for correct reference counting.
* Implement support to conversion rule.Renato Filho2010-02-094-17/+26
| | | | Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
* Adds tests for argument removal and type modification for virtual methods.Marcelo Lira2010-02-093-1/+41
| | | | Reviewed by Lauro Moura <lauro.neto@openbossa.org>
* Fixes generation of binding reimplementation of modified virtual methods.Marcelo Lira2010-02-092-1/+4
| | | | | Argument removal and type modification no longer affects the generation of virtual method signatures in the binding code.
* Adds test for argument removal plus argument type modification.Marcelo Lira2010-02-084-0/+33
|
* Fixing sort overloadLauro Neto2010-02-083-0/+25
| | | | | | Now sorting OverloadData recursively Reviewer: Renato Filho <renato.filho@openbossa.org>
* Shiboken::setParent also accepts list of children.Renato Filho2010-02-051-6/+3
| | | | Reviewed by Hugo Parente <hugo.lima@openbossa.org>