Re: Fortran code test suite

Dimitri Van Heesch <[email protected]>
Newsgroups gmane.text.doxygen.devel
Message-ID <[email protected]>
Hi Oleg,

I once made a couple of simple bash scripts for testing regression, also based
on doxygen's XML output. I've attached them. The scripts assume a set of test
files, each starting with a letter t. With the update script you can make a
reference, and with the check script compare the actual results against 
the reference. Maybe it is of use.



Regards,
  Dimitri

On Mar 14, 2011, at 19:12 , Oleg Batrashev wrote:

> Hi,
> 
>> I found there is an xml output from Doxygen. Has anyone tried to write
>> regression tests based on it, using XPath or any similar technique?
>> It seems to be good tool to verify parsers.
> I've made a try and quite satisfied by now.
> https://github.com/ogbash/doxygen-tests
> 
> Currently there are only 8 tests, where 5 are taken from bug reports.
> Release-1.7.1 gives 7 failures.
> Release-1.7.3-20110217 gives 3 failures out of 8 tests.
> 
> runTest (tests.blocks.interface_abst_f90) ... ok
> runTest (tests.blocks.interface_gen_f90) ... ok
> runTest (tests.blocks.interface_op_f90) ... ok
> runTest (tests.blocks.interface_spec_f90) ... ok
> runTest (tests.syntax.label_endsub) ... ok
> runTest (tests.linecont.parcomment_f) ... FAIL
> runTest (tests.linecont.parcomment_f90) ... FAIL
> runTest (tests.linecont.varcomment_f90) ... FAIL
> 
> 89e2c4 from https://github.com/ogbash/doxygen-f90 gives no errors.
> 
> Writing tests is not trivial but managable after making yourself
> familiar to XPath syntax.
> For example, testing that 'example' subroutine exists in
> 'parcomment.f' file and its 'val' parameter is documented:
> 
>        file = self.getFile("parcomment.f")
>        example = self.getSubprogram(file, "example")
> 
>        desc = self.getParamDescription(example, "val")
>        self.assertEqual(desc.getContent().strip(), "[in] scalar double input")
> 
> Testing type of the variable 'as' with XPath:
> 
>        var = self.getModuleVariable(varcomment, "as")
>        self.assertEqual(var.xpathEval("type")[0].getContent().strip(),
>                         "integer, dimension(:,:), pointer")
> 
> 
> Any suggestions, comments, or even new tests are welcome,
> Oleg
> 
> ------------------------------------------------------------------------------
> Colocation vs. Managed Hosting
> A question and answer guide to determining the best fit
> for your organization - today and in the future.
> http://p.sf.net/sfu/internap-sfd2d
> _______________________________________________
> Doxygen-develop mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/doxygen-develop

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d

_______________________________________________
Doxygen-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/doxygen-develop
regression.tgz (application/octet-stream, 1 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.