DESCRIPTION

Add or fix CTF types toString

* struct: add field names
* variant: print the current field
* enum: print value and container value

Change-Id: I45d9a2fd900a29cd2ef99f15d2d58d4d01151ee1


COMMENTS

author: Kason Bridges
date: 2013-02-20 04:39:15.000000000

Uploaded patch set 5.

-------------------------------------
author: Brenden Conley
date: 2013-02-20 04:39:21.000000000

Patch Set 5:

Build Started https://hudson.eclipse.org/sandbox/job/linuxtools/1426/ 

-------------------------------------
author: Brenden Conley
date: 2013-02-20 04:51:19.000000000

Patch Set 5: Verified

Build Successful 

https://hudson.eclipse.org/sandbox/job/linuxtools/1426/ : SUCCESS

-------------------------------------
author: Braxton Mccarthy
date: 2013-02-20 14:04:29.000000000

Patch Set 5: I would prefer that you didn't submit this

(2 inline comments)

Small comments.
Now with 100% more tests!

Line:274, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/types/VariantDefinition.java -> The last } should be on its own line

Line:123, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/types/EnumDefinitionTest.java -> The test fails here, telling me the actual value it gets is
  { value = 16, container = 16 }

-------------------------------------
author: Kason Bridges
date: 2013-02-20 15:41:44.000000000

Patch Set 5: (2 inline comments)



Line:274, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/types/VariantDefinition.java -> Done

Line:123, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/types/EnumDefinitionTest.java -> Oops, I forgot to mention this. As I said on IRC, the getValue() method (used in toString()) does not respect its contract, so this test should pass. The implementation should be fixed or the semantic of the method should be changed.

I guess this calls for a better unit test for getValue :)

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