diff options
author | Hugo Parente Lima <hugo.lima@openbossa.org> | 2010-04-14 19:32:37 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-09 19:09:59 -0300 |
commit | 74d3c1bb12280ffb2b810ee4bd1272ba6fb8127f (patch) | |
tree | c87daaa1939b537b50ea94c824f620d236717003 /tests/testabstractmetatype.cpp | |
parent | 46cd570358601d83be0e23a378fc688d8ed706b6 (diff) |
Added the "function" tag to ApiExtractor.
This change the behaviour of ApiExtractor regarding to global functions.
All global function you want to be exported to python *need* to be especified
in the type system with the function tag, otherwise they wont be exported at all.
The syntax for this new tag is:
<function signature="..." />
This is just the initial work for this tag, it is missign support for:
- Function modifications.
- Add a function overload with add-function tag.
Diffstat (limited to 'tests/testabstractmetatype.cpp')
-rw-r--r-- | tests/testabstractmetatype.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/testabstractmetatype.cpp b/tests/testabstractmetatype.cpp index 3e75539fb..81e194fd3 100644 --- a/tests/testabstractmetatype.cpp +++ b/tests/testabstractmetatype.cpp @@ -30,6 +30,7 @@ void TestAbstractMetaType::testConstCharPtrType() const char* cppCode ="const char* justAtest();"; const char* xmlCode = "<typesystem package=\"Foo\">\ <primitive-type name='char'/>\ + <function signature='justAtest()' />\ </typesystem>"; TestUtil t(cppCode, xmlCode); QCOMPARE(t.builder()->globalFunctions().size(), 1); @@ -57,6 +58,7 @@ void TestAbstractMetaType::testCharType() const char* xmlCode = "<typesystem package=\"Foo\">\ <primitive-type name='char'/>\ <value-type name='A' />\ + <function signature='justAtest()' />\ </typesystem>"; TestUtil t(cppCode, xmlCode); @@ -118,6 +120,7 @@ void TestAbstractMetaType::testTypedefWithTemplates() const char* xmlCode = "<typesystem package=\"Foo\">\ <container-type name='A' type='list'/>\ <value-type name='B' />\ + <function signature='func(A<B>)' />\ </typesystem>"; TestUtil t(cppCode, xmlCode); |