I'm starting to write my grammar so am setting up the build/tests.  I'm 
fetching gunit-3.4 via Apache Ivy, and am using the tools ability to 
generate JUnit classes so that our reporting tools can run over the results.

My grammar consists of:

grammar CoreConfiguration;

SCOPE_BEGIN: '{';
SCOPE_END: '}';

WS: ( ' ' | '\t' | '\r' | '\n') {$channel=HIDDEN;};

configuration
   : SCOPE_BEGIN SCOPE_END;

My Gunit test case is:

gunit CoreConfiguration;

//------------------- configuration
configuration:

"{ }" OK

"{ ]" FAIL

I translate the gunit file to JUnit using the -o switch of the 
org.antlr.gunit.Interp class and compile the code.  Upon running the 
test I get the following output:

     [junit] testing rule configuration expected:<OK> but was:<FAIL, >
     [junit] junit.framework.AssertionFailedError: testing rule 
configuration expected:<OK> but was:<FAIL, >

Looking through the gunit source, I've tracked the problem to the 
gUnitBaseTest::examineExecResult() method on line 467.  It's checking 
whether the member variable 'stderr' is null and if not returns the 
concatenation of "FAIL" and the contents ie:

return "FAIL, "+this.stderr;

However it appears that this.stderr is being set to empty on line 242, 
so my test(s) will always fail.  This is a bug.

Cheers,

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to