~ubuntu-branches/ubuntu/trusty/eclipse-linuxtools/trusty

« back to all changes in this revision

Viewing changes to lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/event/CTFEventFieldTest.java

  • Committer: Package Import Robot
  • Author(s): tony mancill
  • Date: 2013-05-13 21:43:22 UTC
  • mfrom: (1.2.1) (2.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20130513214322-6frgd9du1n0w2uo7
Tags: 1.2.1-1
* Team upload.
* New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
     * @throws CTFReaderException
97
97
     */
98
98
    @Test
99
 
    public void testParseField_simple() throws CTFReaderException {
100
 
        Definition fieldDef = new SequenceDefinition(new SequenceDeclaration(
101
 
                "", new StringDeclaration()), null, fieldName); //$NON-NLS-1$
 
99
    public void testParseField_simple() {
 
100
        final StringDeclaration elemType = new StringDeclaration();
 
101
        Definition fieldDef = elemType.createDefinition(null, fieldName);
102
102
 
103
103
        assertNotNull(fieldDef);
104
104
    }
125
125
                new StringDeclaration(), null, fieldName);
126
126
        fieldDef.setString(new StringBuilder("Hello World")); //$NON-NLS-1$
127
127
 
128
 
        String other = fieldName + "=Hello World"; //$NON-NLS-1$
 
128
        String other = "\"Hello World\""; //$NON-NLS-1$
129
129
        assertNotNull(fieldDef);
130
130
        assertEquals(fieldDef.toString(), other);
131
131
    }
176
176
        ((IntegerDefinition) ((ArrayDefinition) fieldDef).getDefinitions()[11]).setValue(0);
177
177
 
178
178
        assertNotNull(fieldDef);
179
 
        String other = fieldName
180
 
                + "={ 72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 0}"; //$NON-NLS-1$
 
179
        String other = "[ 72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 0 ]"; //$NON-NLS-1$
181
180
        assertEquals(other, fieldDef.toString());
182
181
    }
183
182
}
 
 
b'\\ No newline at end of file'