import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp;
import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange;
assertEquals("endTime", ts2, range.getEndTime());
}
- @Test
- public void testBadConstructor() {
- try {
- new TmfTimeRange(TmfTimestamp.BIG_BANG, null);
- fail("TmfTimeRange: bad end time");
- } catch (final IllegalArgumentException e) {
- // Success
- }
-
- try {
- new TmfTimeRange(null, TmfTimestamp.BIG_CRUNCH);
- fail("TmfTimeRange: bad start time");
- } catch (final IllegalArgumentException e) {
- // Success
- }
- }
-
@Test
public void testOpenRange1() {
final ITmfTimestamp ts2 = new TmfTimestamp(12350);
assertEquals("endTime", TmfTimestamp.BIG_CRUNCH, range3.getEndTime());
}
- @Test
- public void testCopyConstructor2() {
- try {
- new TmfTimeRange(null);
- fail("TmfTimeRange: null argument");
- } catch (final IllegalArgumentException e) {
- // Success
- }
- }
-
// ------------------------------------------------------------------------
// hashCode
// ------------------------------------------------------------------------