DESCRIPTION

ctf: Add unittests for the CTF Lexer and Parser.

This is a first draft of unittests for the CTF Lexer and Parser.
The coverage of these tests is still incomplete. More unittests
are to come.

Some tests are commented and need to fix the grammars.
The plan is to fix them in future commits to limits the
amount of refactoring.

Change-Id: I2d8e06560314ef22710985915b726a74974bbb1c
Signed-off-by: Jordon Obrien xxx@xxx.xxx


COMMENTS

author: Jordon Obrien
date: 2013-12-10 05:28:21.000000000

Uploaded patch set 5.

-------------------------------------
author: Brenden Conley
date: 2013-12-10 06:05:06.000000000

Patch Set 5:

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/4536/

-------------------------------------
author: Brenden Conley
date: 2013-12-10 06:35:42.000000000

Patch Set 5: Verified+1

Build Successful 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/4536/ : SUCCESS

-------------------------------------
author: Ivy Mitchell
date: 2013-12-10 14:48:08.000000000

Patch Set 5: Code-Review+1

Looks good to me, from the code side, is the project side ok?

-------------------------------------
author: Kaeden Tapia
date: 2013-12-10 15:00:26.000000000

Patch Set 5:

The new test suite needs to be added to org.eclipse.linuxtools.lttng.alltests, let me do that.

-------------------------------------
author: Braxton Mccarthy
date: 2013-12-10 15:25:14.000000000

Patch Set 5: Code-Review-1 IP-Clean-1

(8 comments)

Very good initiative! We didn't have any kind of grammar-specific tests, this should help greatly (and should solidify what we have if we want to modify the current grammar. Which I think is what you're looking at ;) )

Some comments on style though:
* Copyright
* Adding one-liner javadocs (not suppressing the warning)
* xxx@xxx.xxx instead of commenting-out tests

Line:40, lttng/org.eclipse.linuxtools.ctf.parser.tests/src/org/eclipse/linuxtools/ctf/parser/tests/CtfParserTest.java -> empty lines above/after

Line:41, lttng/org.eclipse.linuxtools.ctf.parser.tests/src/org/eclipse/linuxtools/ctf/parser/tests/CtfParserTest.java -> can be private, not really important...

Line:2, lttng/org.eclipse.linuxtools.ctf.parser.tests/src/org/eclipse/linuxtools/ctf/parser/tests/AllCtfParserTests.java -> It shouldn't be Ericsson, nobody from Ericsson did this ;) It should be Google, or your own name (depending on how you guys handle copyright).

Line:27, lttng/org.eclipse.linuxtools.ctf.parser.tests/src/org/eclipse/linuxtools/ctf/parser/tests/CtfLexerTest.java -> Typically @author goes at the end (before xxx@xxx.xxx if there is one)

Line:35, lttng/org.eclipse.linuxtools.ctf.parser.tests/src/org/eclipse/linuxtools/ctf/parser/tests/CtfLexerTest.java -> meh :P  It's usually nice to have one line of Javadoc explaining what the test does basically.

Line:40, lttng/org.eclipse.linuxtools.ctf.parser.tests/src/org/eclipse/linuxtools/ctf/parser/tests/CtfLexerTest.java -> Minor style issue, keep an empty line before/after the //----- block

Line:41, lttng/org.eclipse.linuxtools.ctf.parser.tests/src/org/eclipse/linuxtools/ctf/parser/tests/CtfLexerTest.java -> could be private final

Line:368, lttng/org.eclipse.linuxtools.ctf.parser.tests/src/org/eclipse/linuxtools/ctf/parser/tests/CtfLexerTest.java -> Instead of completely commenting out the test, you can xxx@xxx.xxx to it, so that it will be skipped, but will still be shown in the total number of tests (so we remember there are disabled tests)

Like this:

xxx@xxx.xxx must be fixed first")
xxx@xxx.xxx
 public void testBlah() {
   ...
 }

-------------------------------------
author: Jordon Obrien
date: 2013-12-10 18:43:28.000000000

Patch Set 5:

(8 comments)

Which one did I missed?

Line:40, lttng/org.eclipse.linuxtools.ctf.parser.tests/src/org/eclipse/linuxtools/ctf/parser/tests/CtfParserTest.java -> Done

Line:41, lttng/org.eclipse.linuxtools.ctf.parser.tests/src/org/eclipse/linuxtools/ctf/parser/tests/CtfParserTest.java -> Done

Line:2, lttng/org.eclipse.linuxtools.ctf.parser.tests/src/org/eclipse/linuxtools/ctf/parser/tests/AllCtfParserTests.java -> This file has be copy-pasted from your code.

Line:27, lttng/org.eclipse.linuxtools.ctf.parser.tests/src/org/eclipse/linuxtools/ctf/parser/tests/CtfLexerTest.java -> Done

Line:35, lttng/org.eclipse.linuxtools.ctf.parser.tests/src/org/eclipse/linuxtools/ctf/parser/tests/CtfLexerTest.java -> This is copy pasted from your GDB Traces tests. :)

Line:40, lttng/org.eclipse.linuxtools.ctf.parser.tests/src/org/eclipse/linuxtools/ctf/parser/tests/CtfLexerTest.java -> Done

Line:41, lttng/org.eclipse.linuxtools.ctf.parser.tests/src/org/eclipse/linuxtools/ctf/parser/tests/CtfLexerTest.java -> Done

Line:368, lttng/org.eclipse.linuxtools.ctf.parser.tests/src/org/eclipse/linuxtools/ctf/parser/tests/CtfLexerTest.java -> Done

-------------------------------------
