use of org.eclipse.tracecompass.internal.provisional.analysis.lami.core.aspect.LamiTableEntryAspect in project tracecompass by tracecompass.
the class LamiAspectTest method lamiEmptyAspectTest.
/**
* Test the empty aspect
*
* @throws JSONException
* won't happen
*/
@Test
public void lamiEmptyAspectTest() throws JSONException {
LamiTableEntryAspect aspect = LamiEmptyAspect.INSTANCE;
LamiTableEntry entry1 = createLamiData(1);
LamiTableEntry entry2 = createLamiData(2);
assertEquals("", aspect.getLabel());
assertEquals("", aspect.getName());
assertEquals(0, aspect.getComparator().compare(entry1, entry2));
assertNull(aspect.resolveString(entry1));
assertNull(aspect.resolveNumber(entry1));
}
use of org.eclipse.tracecompass.internal.provisional.analysis.lami.core.aspect.LamiTableEntryAspect in project tracecompass by tracecompass.
the class LamiAspectTest method lamiProcessNameAspectTest.
/**
* Test the process name aspect
*
* @throws JSONException
* won't happen
*/
@Test
public void lamiProcessNameAspectTest() throws JSONException {
LamiTableEntryAspect aspect = new LamiProcessNameAspect(ASPECT_NAME, 0);
LamiTableEntry entry1 = createLamiData(1);
LamiTableEntry entry2 = createLamiData(2);
assertEquals(ASPECT_NAME + " (name)", aspect.getLabel());
assertEquals(ASPECT_NAME + " (name)", aspect.getName());
assertEquals(0, aspect.getComparator().compare(entry1, entry2));
assertNull(aspect.resolveString(entry1));
assertNull(aspect.resolveNumber(entry1));
}
use of org.eclipse.tracecompass.internal.provisional.analysis.lami.core.aspect.LamiTableEntryAspect in project tracecompass by tracecompass.
the class LamiAspectTest method lamiTimestampAspectTest.
/**
* Test the timestamp aspect
*
* @throws JSONException
* won't happen
*/
@Test
public void lamiTimestampAspectTest() throws JSONException {
LamiTableEntryAspect aspect = new LamiTimestampAspect(ASPECT_NAME, 0);
LamiTableEntry entry1 = createLamiData(1);
LamiTableEntry entry2 = createLamiData(2);
assertEquals(ASPECT_NAME, aspect.getLabel());
assertEquals(ASPECT_NAME, aspect.getName());
assertEquals(0, aspect.getComparator().compare(entry1, entry2));
assertNull(aspect.resolveString(entry1));
assertNull(aspect.resolveNumber(entry1));
}
use of org.eclipse.tracecompass.internal.provisional.analysis.lami.core.aspect.LamiTableEntryAspect in project tracecompass by tracecompass.
the class LamiAspectTest method lamiTimeRangeBeginAspectTest.
/**
* Test the time range begin aspect
*
* @throws JSONException
* won't happen
*/
@Test
public void lamiTimeRangeBeginAspectTest() throws JSONException {
LamiTableEntryAspect aspect = new LamiTimeRangeBeginAspect(ASPECT_NAME, 5);
LamiTableEntry entry1 = createLamiData(1);
LamiTableEntry entry2 = createLamiData(2);
assertEquals(ASPECT_NAME + " (begin)", aspect.getLabel());
assertEquals(ASPECT_NAME + " (begin)", aspect.getName());
assertEquals(-1, aspect.getComparator().compare(entry1, entry2));
String timeRangeString = aspect.resolveString(entry1);
assertNotNull(timeRangeString);
timeRangeString = timeRangeString.substring(timeRangeString.indexOf(".") + 1, timeRangeString.length());
assertEquals("000 000 001", timeRangeString);
assertEquals(1L, aspect.resolveNumber(entry1));
}
use of org.eclipse.tracecompass.internal.provisional.analysis.lami.core.aspect.LamiTableEntryAspect in project tracecompass by tracecompass.
the class LamiAspectTest method lamiTimeRangeEndAspectTest.
/**
* Test the time range end aspect
*
* @throws JSONException
* won't happen
*/
@Test
public void lamiTimeRangeEndAspectTest() throws JSONException {
LamiTableEntryAspect aspect = new LamiTimeRangeEndAspect(ASPECT_NAME, 5);
LamiTableEntry entry1 = createLamiData(1);
LamiTableEntry entry2 = createLamiData(2);
assertEquals(ASPECT_NAME + " (end)", aspect.getLabel());
assertEquals(ASPECT_NAME + " (end)", aspect.getName());
assertEquals(-1, aspect.getComparator().compare(entry1, entry2));
String timeRangeString = aspect.resolveString(entry1);
assertNotNull(timeRangeString);
timeRangeString = timeRangeString.substring(timeRangeString.indexOf(".") + 1, timeRangeString.length());
assertEquals("000 000 012", timeRangeString);
assertEquals(12L, aspect.resolveNumber(entry1));
}
Aggregations