On 02/05/2010 06:41 PM, Jan Moringen wrote:
> On Thu, 2010-02-04 at 20:24 -0500, Eric M. Ludlam wrote:
>> On 02/04/2010 07:50 PM, Jan Moringen wrote:
>>>> I also know that there is very poor testing of python parsing in
>> cedet
>>>> still. (ie - only very basic parsing.) If you happen to be using
>> the
>>>> python parser with smart completion, srecode, cogre, or any other
>>>> features, adding tests there would be a huge win while developing
>>>> changes as the one you propose below.
>>>
>>> I will to commit the changes together with proper tests. Thanks for
>> the
>>> suggestion.
>>
>> There are a lot of test harnesses around for different things. I
>> don't know what bits of the python parser are working for you, so if you
>> need a suggestion of which harness to use, let me know.
>
> Apart from minor problems (which I have partly fixed in my CEDET copy),
> the parser works quite well.
>
> Since the enhancements are on the grammar level, I would like to do unit
> tests on the tag level. Is there a framework for that?
Hi Jan,
The semantic-utest.el file has the basics to a python parsing unit test.
As you can see, that, and many others, are all very basic.
For C++, must of the parsing is tested as part of the smart completion
tests, where those can't pass unless the parser works well. At the same
time, the C test also is a bit more advanced, in that it has some minor
edits testing the incremental parser, though it didn't go very far.
Anyway, there is basic infrastructure there to extend for Python for the
parsing of constructs, even though the entirety of the test should be
expanded.
Thanks!
Eric
|