<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jan 27, 2016 at 3:40 PM, Michael Van Canneyt <span dir="ltr"><<a href="mailto:michael@freepascal.org" target="_blank">michael@freepascal.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">On Wed, 27 Jan 2016, silvioprog wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">On Wed, Jan 27, 2016 at 2:41 PM, Graeme Geldenhuys <<br>
<a href="mailto:mailinglists@geldenhuys.co.uk" target="_blank">mailinglists@geldenhuys.co.uk</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
On 2016-01-27 17:28, silvioprog wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Is the `testjsonparser` unit all the tests for FCL JSON, or can I find<br>
</blockquote>
more<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
tests in another place?<br>
</blockquote>
<br>
I have more unit test units in the <fpc>/src/packages/fcl-json/tests/<br>
directory.<br>
</blockquote>
<br>
[...]<br>
<br>
I can't find any test for `TJSONScanner` class.<br>
<br>
In that case, Michael van Canneyt is probably the best person to answer<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
that.<br>
</blockquote>
<br>
[...]<br>
<br>
Let's expect his answer. :-)<br>
</blockquote>
<br>
You can add tests to the TTestParser class in the testjsonparser.pp unit.<br>
<br>
if you want to test purely data related stuff, use classes in testjsondata.pp</blockquote></div><div><br></div><div>Nice! :-)</div><div><br></div><div>I already found two failures, but I don't know if it something in my environment (Lazarus 1.7 rUnknown FPC 3.1.1 i386-win32-win32/win64):</div><div><br></div><div><div>C:\[...]fcl-json\tests>testjson.exe > result.txt<br></div><div>Heap dump by heaptrc unit</div><div>34687 memory blocks allocated : 1332965/1459696</div><div>34687 memory blocks freed     : 1332965/1459696</div><div>0 unfreed memory blocks : 0</div><div>True heap size : 360448 (112 used in System startup)</div><div>True free heap : 360336</div><div><br></div><div><div>Number of run tests: 321</div><div>Number of errors:    0</div><div>Number of failures:  2</div></div><div><br></div><div>See the `result.txt` large content here: <a href="http://pastebin.com/JTC93esY">http://pastebin.com/JTC93esY</a>.</div></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>Silvio Clécio</div></div></div>
</div></div>