summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Aubry2012-11-14 09:28:34 (EST)
committerSimon Bernard2012-11-15 08:04:32 (EST)
commit223bab3112e48ac35fd989a2b77dacb743fbd4ce (patch)
treee107e44b7abcfe37033da9986cfd5296eafe77d3
parent31bde313becdc1b91078da16b2dfbf690a7f0e97 (diff)
downloadorg.eclipse.koneki.ldt-223bab3112e48ac35fd989a2b77dacb743fbd4ce.zip
org.eclipse.koneki.ldt-223bab3112e48ac35fd989a2b77dacb743fbd4ce.tar.gz
org.eclipse.koneki.ldt-223bab3112e48ac35fd989a2b77dacb743fbd4ce.tar.bz2
Bug 389887 - Fix the case of more than one return in a function
and adding tests to cover it
-rw-r--r--libraries/doctemplates/template/item.lua4
-rw-r--r--tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/html/function/doubledescribedreturn.html42
-rw-r--r--tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/html/function/doubledescribedtypedreturn.html45
-rw-r--r--tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/html/function/doubledescribedtypelinkedreturn.html46
-rw-r--r--tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/html/function/doubletypedreturn.html49
-rw-r--r--tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/html/function/doubletypelinkedreturn.html49
-rw-r--r--tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/lua/function/doubledescribedreturn.lua10
-rw-r--r--tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/lua/function/doubledescribedtypedreturn.lua10
-rw-r--r--tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/lua/function/doubledescribedtypelinkedreturn.lua10
-rw-r--r--tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/lua/function/doubletypedreturn.lua11
-rw-r--r--tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/lua/function/doubletypelinkedreturn.lua11
-rw-r--r--tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/model/function/doubledescribedreturn.serialized104
-rw-r--r--tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/model/function/doubledescribedtypedreturn.serialized112
-rw-r--r--tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/model/function/doubledescribedtypelinkedreturn.serialized114
-rw-r--r--tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/model/function/doubletypedreturn.serialized112
-rw-r--r--tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/model/function/doubletypelinkedreturn.serialized114
-rw-r--r--tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/testhtml.lua1
17 files changed, 841 insertions, 3 deletions
diff --git a/libraries/doctemplates/template/item.lua b/libraries/doctemplates/template/item.lua
index db6d84e..f7fd6f2 100644
--- a/libraries/doctemplates/template/item.lua
+++ b/libraries/doctemplates/template/item.lua
@@ -139,9 +139,9 @@ return
#
# local paramlist = niceparmlist(ret.types)
# if #ret.types > 0 and #paramlist > 0 then
-# local returnline = "<em>" .. paramlist .. "</em>"
+# returnline = "<em>" .. paramlist .. "</em>"
# end
-# returnline = returnline .. "\n" .. (ret.description and ret.description)
+# returnline = returnline .. "\n" .. ret.description
$( format (returnline))
</li>
# end
diff --git a/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/html/function/doubledescribedreturn.html b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/html/function/doubledescribedreturn.html
new file mode 100644
index 0000000..6a07aba
--- /dev/null
+++ b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/html/function/doubledescribedreturn.html
@@ -0,0 +1,42 @@
+<div id="content">
+ <h1>
+ Module
+ <code>modulename</code>
+ </h1>
+ <h2><a id="#(modulename)">Type <code>modulename</code></a></h2>
+ <table class="function_list">
+ <tr>
+ <td class="name" nowrap="nowrap"><a
+ href="##(modulename).functionname">modulename.functionname()</a></td>
+ <td class="summary"><p>Function short description.</p></td>
+ </tr>
+ </table>
+
+ <h2>
+ Type
+ <code>modulename</code>
+ </h2>
+ <h3>Field(s)</h3>
+ <dl class="function">
+ <dt>
+ <a id="#(modulename).functionname" >
+ <strong>modulename.functionname()</strong>
+ </a>
+ </dt>
+ <dd>
+ <p>Function short description.</p>
+ <p>Function long description</p>
+ <h3>Return values</h3>
+ <ol>
+ <li>
+ <p>return description</p>
+ </li>
+ <li>
+ <p>return second description</p>
+ </li>
+ </ol>
+
+ </dd>
+ </dl>
+
+</div>
diff --git a/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/html/function/doubledescribedtypedreturn.html b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/html/function/doubledescribedtypedreturn.html
new file mode 100644
index 0000000..0eaa113
--- /dev/null
+++ b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/html/function/doubledescribedtypedreturn.html
@@ -0,0 +1,45 @@
+<div id="content">
+ <h1>
+ Module
+ <code>modulename</code>
+ </h1>
+
+ <h2>
+ <a id="#(modulename)">Type <code>modulename</code></a>
+ </h2>
+ <table class="function_list">
+ <tr>
+ <td class="name" nowrap="nowrap"><a
+ href="##(modulename).functionname">modulename.functionname()</a></td>
+ <td class="summary"><p>Function short description.</p></td>
+ </tr>
+ </table>
+
+ <h2>
+ Type
+ <code>modulename</code>
+ </h2>
+ <h3>Field(s)</h3>
+ <dl class="function">
+ <dt>
+ <a id="#(modulename).functionname" >
+ <strong>modulename.functionname()</strong>
+ </a>
+ </dt>
+ <dd>
+ <p>Function short description.</p>
+ <p>Function long description</p>
+
+ <h3>Return values</h3>
+ <ol>
+ <li>
+ <p><em>#string:</em> return description</p>
+ </li>
+ <li>
+ <p><em>#table:</em> return second description</p>
+ </li>
+ </ol>
+ </dd>
+ </dl>
+
+</div>
diff --git a/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/html/function/doubledescribedtypelinkedreturn.html b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/html/function/doubledescribedtypelinkedreturn.html
new file mode 100644
index 0000000..63bd9b8
--- /dev/null
+++ b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/html/function/doubledescribedtypelinkedreturn.html
@@ -0,0 +1,46 @@
+<div id="content">
+ <h1>
+ Module
+ <code>modulename</code>
+ </h1>
+
+ <h2>
+ <a id="#(modulename)">Type <code>modulename</code></a>
+ </h2>
+ <table class="function_list">
+ <tr>
+ <td class="name" nowrap="nowrap"><a
+ href="##(modulename).functionname">modulename.functionname()</a></td>
+ <td class="summary"><p>Function short description.</p></td>
+ </tr>
+ </table>
+
+ <h2>
+ Type
+ <code>modulename</code>
+ </h2>
+ <h3>Field(s)</h3>
+ <dl class="function">
+ <dt>
+ <a id="#(modulename).functionname" >
+ <strong>modulename.functionname()</strong>
+ </a>
+ </dt>
+ <dd>
+ <p>Function short description.</p>
+ <p>Function long description</p>
+
+
+ <h3>Return values</h3>
+ <ol>
+ <li>
+ <p><em><a href="othermodule.html##(atype)">othermodule#atype</a>:</em>return description</p>
+ </li>
+ <li>
+ <p><em><a href="othermodule.html##(secondtype)">othermodule#secondtype</a>:</em>return second description</p>
+ </li>
+ </ol>
+ </dd>
+ </dl>
+
+</div>
diff --git a/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/html/function/doubletypedreturn.html b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/html/function/doubletypedreturn.html
new file mode 100644
index 0000000..5a2a239
--- /dev/null
+++ b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/html/function/doubletypedreturn.html
@@ -0,0 +1,49 @@
+<div id="content">
+ <h1>
+ Module
+ <code>modulename</code>
+ </h1>
+
+
+
+
+
+ <h2>
+ <a id="#(modulename)">Type <code>modulename</code></a>
+ </h2>
+ <table class="function_list">
+ <tr>
+ <td class="name" nowrap="nowrap"><a
+ href="##(modulename).functionname">modulename.functionname()</a></td>
+ <td class="summary"><p>Function short description.</p>
+</td>
+ </tr>
+ </table>
+
+ <h2>
+ Type
+ <code>modulename</code>
+ </h2>
+ <h3>Field(s)</h3>
+ <dl class="function">
+ <dt>
+ <a id="#(modulename).functionname" >
+ <strong>modulename.functionname()</strong>
+ </a>
+ </dt>
+ <dd>
+ <p>Function short description.</p>
+ <p>Function long description</p>
+ <h3>Return values</h3>
+ <ol>
+ <li>
+ <p><em>#string:</em></p>
+ </li>
+ <li>
+ <p><em>#table:</em></p>
+ </li>
+ </ol>
+ </dd>
+ </dl>
+
+</div>
diff --git a/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/html/function/doubletypelinkedreturn.html b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/html/function/doubletypelinkedreturn.html
new file mode 100644
index 0000000..4aceef6
--- /dev/null
+++ b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/html/function/doubletypelinkedreturn.html
@@ -0,0 +1,49 @@
+<div id="content">
+ <h1>
+ Module
+ <code>modulename</code>
+ </h1>
+
+
+
+
+
+ <h2>
+ <a id="#(modulename)">Type <code>modulename</code></a>
+ </h2>
+ <table class="function_list">
+ <tr>
+ <td class="name" nowrap="nowrap"><a
+ href="##(modulename).functionname">modulename.functionname()</a></td>
+ <td class="summary"><p> Function short description.</p>
+</td>
+ </tr>
+ </table>
+
+ <h2>
+ Type
+ <code>modulename</code>
+ </h2>
+ <h3>Field(s)</h3>
+ <dl class="function">
+ <dt>
+ <a id="#(modulename).functionname" >
+ <strong>modulename.functionname()</strong>
+ </a>
+ </dt>
+ <dd>
+ <p>Function short description.</p>
+ <p>Function long description</p>
+ <h3>Return values</h3>
+ <ol>
+ <li>
+ <p><em><a href="othermodule.html##(atype)">othermodule#atype</a>:</em></p>
+ </li>
+ <li>
+ <p><em><a href="othermodule.html##(secondtype)">othermodule#secondtype</a>:</em></p>
+ </li>
+ </ol>
+ </dd>
+ </dl>
+
+</div>
diff --git a/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/lua/function/doubledescribedreturn.lua b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/lua/function/doubledescribedreturn.lua
new file mode 100644
index 0000000..8dda2b4
--- /dev/null
+++ b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/lua/function/doubledescribedreturn.lua
@@ -0,0 +1,10 @@
+--- @module modulename
+
+---
+-- Function short description.
+-- Function long description
+-- @function [parent = #modulename] functionname
+-- @return return description
+-- @return return second description
+return nil
+
diff --git a/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/lua/function/doubledescribedtypedreturn.lua b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/lua/function/doubledescribedtypedreturn.lua
new file mode 100644
index 0000000..3134b8f
--- /dev/null
+++ b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/lua/function/doubledescribedtypedreturn.lua
@@ -0,0 +1,10 @@
+--- @module modulename
+
+---
+-- Function short description.
+-- Function long description
+-- @function [parent = #modulename] functionname
+-- @return #string return description
+-- @return #table return second description
+return nil
+
diff --git a/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/lua/function/doubledescribedtypelinkedreturn.lua b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/lua/function/doubledescribedtypelinkedreturn.lua
new file mode 100644
index 0000000..dcf3d4b
--- /dev/null
+++ b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/lua/function/doubledescribedtypelinkedreturn.lua
@@ -0,0 +1,10 @@
+--- @module modulename
+
+---
+-- Function short description.
+-- Function long description
+-- @function [parent = #modulename] functionname
+-- @return othermodule#atype return description
+-- @return othermodule#secondtype return second description
+return nil
+
diff --git a/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/lua/function/doubletypedreturn.lua b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/lua/function/doubletypedreturn.lua
new file mode 100644
index 0000000..34c0e63
--- /dev/null
+++ b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/lua/function/doubletypedreturn.lua
@@ -0,0 +1,11 @@
+--- @module modulename
+
+---
+-- Function short description.
+-- Function long description
+-- @function [parent = #modulename] functionname
+-- @return #string
+-- @return #table
+return nil
+
+
diff --git a/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/lua/function/doubletypelinkedreturn.lua b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/lua/function/doubletypelinkedreturn.lua
new file mode 100644
index 0000000..a2f2057
--- /dev/null
+++ b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/lua/function/doubletypelinkedreturn.lua
@@ -0,0 +1,11 @@
+--- @module modulename
+
+---
+-- Function short description.
+-- Function long description
+-- @function [parent = #modulename] functionname
+-- @return othermodule#atype
+-- @return othermodule#secondtype
+return nil
+
+
diff --git a/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/model/function/doubledescribedreturn.serialized b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/model/function/doubledescribedreturn.serialized
new file mode 100644
index 0000000..fc47a2a
--- /dev/null
+++ b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/model/function/doubledescribedreturn.serialized
@@ -0,0 +1,104 @@
+do local _={
+ description="",
+ globalvars={
+
+ }
+ --[[table: 0x9ee50c0]],
+ shortdescription="",
+ name="modulename",
+ returns={
+ [1]={
+ types={
+ [1]={
+ typename="modulename",
+ tag="internaltyperef"
+ }
+ --[[table: 0x9ee4f88]]
+ }
+ --[[table: 0x9ee5050]],
+ description="",
+ tag="return"
+ }
+ --[[table: 0x9ee4fb0]]
+ }
+ --[[table: 0x9ee50e8]],
+ types={
+ ["__=__1"]={
+ shortdescription="Function short description.",
+ description="Function long description",
+ name="__=__1",
+ parent=nil --[[ref]],
+ returns={
+ [1]={
+ types={
+
+ }
+ --[[table: 0x9f3ef68]],
+ description="return description",
+ tag="return"
+ }
+ --[[table: 0x9f3ef40]],
+ [2]={
+ types={
+
+ }
+ --[[table: 0x9f3f1e0]],
+ description="return second description",
+ tag="return"
+ }
+ --[[table: 0x9f3ef90]]
+ }
+ --[[table: 0x9f3efe0]],
+ params={
+
+ }
+ --[[table: 0x9f3efb8]],
+ tag="functiontypedef"
+ }
+ --[[table: 0x9f3eef8]],
+ modulename={
+ fields={
+ functionname={
+ type={
+ typename="__=__1",
+ tag="internaltyperef"
+ }
+ --[[table: 0x9f3f2c8]],
+ description="Function long description",
+ parent=nil --[[ref]],
+ shortdescription="Function short description.",
+ name="functionname",
+ sourcerange={
+ min=25,
+ max=204
+ }
+ --[[table: 0x9f3eeb8]],
+ occurrences={
+
+ }
+ --[[table: 0x9f3ee90]],
+ tag="item"
+ }
+ --[[table: 0x9f3ed80]]
+ }
+ --[[table: 0x9f37248]],
+ name="modulename",
+ parent=nil --[[ref]],
+ sourcerange={
+ min=1,
+ max=23
+ }
+ --[[table: 0x9f37270]],
+ tag="recordtypedef"
+ }
+ --[[table: 0x9f37138]]
+ }
+ --[[table: 0x9ee5098]],
+ tag="file"
+ }
+ --[[table: 0x9ee4f60]];
+ _.types["__=__1"].parent=_;
+ _.types.modulename.fields.functionname.parent=_.types.modulename;
+ _.types.modulename.parent=_;
+ return _;
+end \ No newline at end of file
diff --git a/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/model/function/doubledescribedtypedreturn.serialized b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/model/function/doubledescribedtypedreturn.serialized
new file mode 100644
index 0000000..fc3bb88
--- /dev/null
+++ b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/model/function/doubledescribedtypedreturn.serialized
@@ -0,0 +1,112 @@
+do local _={
+ description="",
+ globalvars={
+
+ }
+ --[[table: 0x9ef3ad0]],
+ shortdescription="",
+ name="modulename",
+ returns={
+ [1]={
+ types={
+ [1]={
+ typename="modulename",
+ tag="internaltyperef"
+ }
+ --[[table: 0x9ef3998]]
+ }
+ --[[table: 0x9ef3a60]],
+ description="",
+ tag="return"
+ }
+ --[[table: 0x9ef39c0]]
+ }
+ --[[table: 0x9ef3af8]],
+ types={
+ ["__#string=__1"]={
+ shortdescription="Function short description.",
+ description="Function long description",
+ name="__#string=__1",
+ parent=nil --[[ref]],
+ returns={
+ [1]={
+ types={
+ [1]={
+ typename="string",
+ tag="primitivetyperef"
+ }
+ --[[table: 0x9f33dc0]]
+ }
+ --[[table: 0x9f33d98]],
+ description="return description",
+ tag="return"
+ }
+ --[[table: 0x9f33d70]],
+ [2]={
+ types={
+ [1]={
+ typename="table",
+ tag="primitivetyperef"
+ }
+ --[[table: 0x9f340b0]]
+ }
+ --[[table: 0x9f34088]],
+ description="return second description",
+ tag="return"
+ }
+ --[[table: 0x9f33fe8]]
+ }
+ --[[table: 0x9f33e10]],
+ params={
+
+ }
+ --[[table: 0x9f33de8]],
+ tag="functiontypedef"
+ }
+ --[[table: 0x9f33d28]],
+ modulename={
+ fields={
+ functionname={
+ type={
+ typename="__#string=__1",
+ tag="internaltyperef"
+ }
+ --[[table: 0x9f34220]],
+ description="Function long description",
+ parent=nil --[[ref]],
+ shortdescription="Function short description.",
+ name="functionname",
+ sourcerange={
+ min=25,
+ max=219
+ }
+ --[[table: 0x9f33ce8]],
+ occurrences={
+
+ }
+ --[[table: 0x9f33cc0]],
+ tag="item"
+ }
+ --[[table: 0x9f33bb0]]
+ }
+ --[[table: 0x9f2ce38]],
+ name="modulename",
+ parent=nil --[[ref]],
+ sourcerange={
+ min=1,
+ max=23
+ }
+ --[[table: 0x9f2ce60]],
+ tag="recordtypedef"
+ }
+ --[[table: 0x9f2cd28]]
+ }
+ --[[table: 0x9ef3aa8]],
+ tag="file"
+ }
+ --[[table: 0x9ef3970]];
+ _.types["__#string=__1"].parent=_;
+ _.types.modulename.fields.functionname.parent=_.types.modulename;
+ _.types.modulename.parent=_;
+ return _;
+end \ No newline at end of file
diff --git a/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/model/function/doubledescribedtypelinkedreturn.serialized b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/model/function/doubledescribedtypelinkedreturn.serialized
new file mode 100644
index 0000000..8aa000a
--- /dev/null
+++ b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/model/function/doubledescribedtypelinkedreturn.serialized
@@ -0,0 +1,114 @@
+do local _={
+ description="",
+ globalvars={
+
+ }
+ --[[table: 0xa048da0]],
+ shortdescription="",
+ name="modulename",
+ returns={
+ [1]={
+ types={
+ [1]={
+ typename="modulename",
+ tag="internaltyperef"
+ }
+ --[[table: 0xa048c68]]
+ }
+ --[[table: 0xa048d08]],
+ description="",
+ tag="return"
+ }
+ --[[table: 0xa024c50]]
+ }
+ --[[table: 0xa048dc8]],
+ types={
+ ["__othermodule#atype=__1"]={
+ shortdescription="Function short description.",
+ description="Function long description",
+ name="__othermodule#atype=__1",
+ parent=nil --[[ref]],
+ returns={
+ [1]={
+ types={
+ [1]={
+ typename="atype",
+ modulename="othermodule",
+ tag="externaltyperef"
+ }
+ --[[table: 0x9fd6b28]]
+ }
+ --[[table: 0x9fd6b00]],
+ description="return description",
+ tag="return"
+ }
+ --[[table: 0xa055930]],
+ [2]={
+ types={
+ [1]={
+ typename="secondtype",
+ modulename="othermodule",
+ tag="externaltyperef"
+ }
+ --[[table: 0x9f5b8a0]]
+ }
+ --[[table: 0x9f5b878]],
+ description="return second description",
+ tag="return"
+ }
+ --[[table: 0x9fea5d8]]
+ }
+ --[[table: 0x9fea450]],
+ params={
+
+ }
+ --[[table: 0x9fea428]],
+ tag="functiontypedef"
+ }
+ --[[table: 0x9fea368]],
+ modulename={
+ fields={
+ functionname={
+ type={
+ typename="__othermodule#atype=__1",
+ tag="internaltyperef"
+ }
+ --[[table: 0x9f5ba50]],
+ description="Function long description",
+ parent=nil --[[ref]],
+ shortdescription="Function short description.",
+ name="functionname",
+ sourcerange={
+ min=25,
+ max=245
+ }
+ --[[table: 0x9fea340]],
+ occurrences={
+
+ }
+ --[[table: 0x9fea318]],
+ tag="item"
+ }
+ --[[table: 0x9fea208]]
+ }
+ --[[table: 0x9ed4e68]],
+ name="modulename",
+ parent=nil --[[ref]],
+ sourcerange={
+ min=1,
+ max=23
+ }
+ --[[table: 0x9ed4e90]],
+ tag="recordtypedef"
+ }
+ --[[table: 0xa048d30]]
+ }
+ --[[table: 0xa048d78]],
+ tag="file"
+ }
+ --[[table: 0xa048c40]];
+ _.types["__othermodule#atype=__1"].parent=_;
+ _.types.modulename.fields.functionname.parent=_.types.modulename;
+ _.types.modulename.parent=_;
+ return _;
+end \ No newline at end of file
diff --git a/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/model/function/doubletypedreturn.serialized b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/model/function/doubletypedreturn.serialized
new file mode 100644
index 0000000..0d263b6
--- /dev/null
+++ b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/model/function/doubletypedreturn.serialized
@@ -0,0 +1,112 @@
+do local _={
+ description="",
+ globalvars={
+
+ }
+ --[[table: 0x9fce4c8]],
+ shortdescription="",
+ name="modulename",
+ returns={
+ [1]={
+ types={
+ [1]={
+ typename="modulename",
+ tag="internaltyperef"
+ }
+ --[[table: 0x9fce390]]
+ }
+ --[[table: 0x9fce458]],
+ description="",
+ tag="return"
+ }
+ --[[table: 0x9fce3b8]]
+ }
+ --[[table: 0x9fce4f0]],
+ types={
+ ["__#string=__1"]={
+ shortdescription="Function short description.",
+ description="Function long description",
+ name="__#string=__1",
+ parent=nil --[[ref]],
+ returns={
+ [1]={
+ types={
+ [1]={
+ typename="string",
+ tag="primitivetyperef"
+ }
+ --[[table: 0xa09e590]]
+ }
+ --[[table: 0xa09e568]],
+ description="",
+ tag="return"
+ }
+ --[[table: 0xa09e540]],
+ [2]={
+ types={
+ [1]={
+ typename="table",
+ tag="primitivetyperef"
+ }
+ --[[table: 0xa09e870]]
+ }
+ --[[table: 0xa09e848]],
+ description="",
+ tag="return"
+ }
+ --[[table: 0xa09e7a8]]
+ }
+ --[[table: 0xa09e5e0]],
+ params={
+
+ }
+ --[[table: 0xa09e5b8]],
+ tag="functiontypedef"
+ }
+ --[[table: 0xa09e4f8]],
+ modulename={
+ fields={
+ functionname={
+ type={
+ typename="__#string=__1",
+ tag="internaltyperef"
+ }
+ --[[table: 0xa09e9d0]],
+ description="Function long description",
+ parent=nil --[[ref]],
+ shortdescription="Function short description.",
+ name="functionname",
+ sourcerange={
+ min=25,
+ max=174
+ }
+ --[[table: 0xa09e4d0]],
+ occurrences={
+
+ }
+ --[[table: 0xa09e4a8]],
+ tag="item"
+ }
+ --[[table: 0xa09e398]]
+ }
+ --[[table: 0xa01bb18]],
+ name="modulename",
+ parent=nil --[[ref]],
+ sourcerange={
+ min=1,
+ max=23
+ }
+ --[[table: 0xa01bb40]],
+ tag="recordtypedef"
+ }
+ --[[table: 0xa01ba08]]
+ }
+ --[[table: 0x9fce4a0]],
+ tag="file"
+ }
+ --[[table: 0x9fce368]];
+ _.types["__#string=__1"].parent=_;
+ _.types.modulename.fields.functionname.parent=_.types.modulename;
+ _.types.modulename.parent=_;
+ return _;
+end \ No newline at end of file
diff --git a/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/model/function/doubletypelinkedreturn.serialized b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/model/function/doubletypelinkedreturn.serialized
new file mode 100644
index 0000000..14e42df
--- /dev/null
+++ b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/model/function/doubletypelinkedreturn.serialized
@@ -0,0 +1,114 @@
+do local _={
+ description="",
+ globalvars={
+
+ }
+ --[[table: 0x9ee4b20]],
+ shortdescription="",
+ name="modulename",
+ returns={
+ [1]={
+ types={
+ [1]={
+ typename="modulename",
+ tag="internaltyperef"
+ }
+ --[[table: 0xa02d670]]
+ }
+ --[[table: 0xa04c570]],
+ description="",
+ tag="return"
+ }
+ --[[table: 0x9fa9f08]]
+ }
+ --[[table: 0x9ee4b48]],
+ types={
+ ["__othermodule#atype=__1"]={
+ shortdescription="Function short description.",
+ description="Function long description",
+ name="__othermodule#atype=__1",
+ parent=nil --[[ref]],
+ returns={
+ [1]={
+ types={
+ [1]={
+ typename="atype",
+ modulename="othermodule",
+ tag="externaltyperef"
+ }
+ --[[table: 0x9ef38e8]]
+ }
+ --[[table: 0x9ef38c0]],
+ description="",
+ tag="return"
+ }
+ --[[table: 0x9ef3898]],
+ [2]={
+ types={
+ [1]={
+ typename="secondtype",
+ modulename="othermodule",
+ tag="externaltyperef"
+ }
+ --[[table: 0x9f818b0]]
+ }
+ --[[table: 0x9fa6b70]],
+ description="",
+ tag="return"
+ }
+ --[[table: 0xa079978]]
+ }
+ --[[table: 0x9f32c90]],
+ params={
+
+ }
+ --[[table: 0x9ef3910]],
+ tag="functiontypedef"
+ }
+ --[[table: 0xa00ec08]],
+ modulename={
+ fields={
+ functionname={
+ type={
+ typename="__othermodule#atype=__1",
+ tag="internaltyperef"
+ }
+ --[[table: 0xa012748]],
+ description="Function long description",
+ parent=nil --[[ref]],
+ shortdescription="Function short description.",
+ name="functionname",
+ sourcerange={
+ min=25,
+ max=200
+ }
+ --[[table: 0xa00ebe0]],
+ occurrences={
+
+ }
+ --[[table: 0xa00ebb8]],
+ tag="item"
+ }
+ --[[table: 0xa09f870]]
+ }
+ --[[table: 0x9f40060]],
+ name="modulename",
+ parent=nil --[[ref]],
+ sourcerange={
+ min=1,
+ max=23
+ }
+ --[[table: 0x9f40088]],
+ tag="recordtypedef"
+ }
+ --[[table: 0x9fa9f30]]
+ }
+ --[[table: 0x9ee4af8]],
+ tag="file"
+ }
+ --[[table: 0x9f27590]];
+ _.types["__othermodule#atype=__1"].parent=_;
+ _.types.modulename.fields.functionname.parent=_.types.modulename;
+ _.types.modulename.parent=_;
+ return _;
+end \ No newline at end of file
diff --git a/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/testhtml.lua b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/testhtml.lua
index 8e4b46c..44fd598 100644
--- a/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/testhtml.lua
+++ b/tests/org.eclipse.koneki.ldt.lua.tests/tests/apimodel/testhtml.lua
@@ -9,7 +9,6 @@
-- Sierra Wireless - initial API and implementation
-------------------------------------------------------------------------------
require 'errnode'
-local apimodelbuilder = require 'models.apimodelbuilder'
local domhandler = require 'domhandler'
local tablecompare = require 'tablecompare'
local templateengine = require 'templateengine'