analysis: Move plugins to their own sub-directory
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.core.tests / src / org / eclipse / tracecompass / tmf / core / tests / event / TmfNanoTimestampTest.java
index 6f2964d8224dddfd6d1d87361a601d7cb17bf8b4..77fb2bb35d8185a932b17ad6a7497c3947d0c027 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2013 Ericsson
+ * Copyright (c) 2013, 2014 Ericsson
  *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
@@ -49,14 +49,12 @@ public class TmfNanoTimestampTest {
     public void testDefaultConstructor() {
         assertEquals("getValue", 0, ts0.getValue());
         assertEquals("getscale", -9, ts0.getScale());
-        assertEquals("getPrecision", 0, ts0.getPrecision());
     }
 
     @Test
     public void testFullConstructor() {
         assertEquals("getValue", 12345, ts1.getValue());
         assertEquals("getscale", -9, ts1.getScale());
-        assertEquals("getPrecision", 0, ts1.getPrecision());
     }
 
     @Test
@@ -65,11 +63,9 @@ public class TmfNanoTimestampTest {
 
         assertEquals("getValue", ts1.getValue(), copy.getValue());
         assertEquals("getscale", ts1.getScale(), copy.getScale());
-        assertEquals("getPrecision", ts1.getPrecision(), copy.getPrecision());
 
         assertEquals("getValue", 12345, copy.getValue());
         assertEquals("getscale", -9, copy.getScale());
-        assertEquals("getPrecision", 0, copy.getPrecision());
     }
 
     @Test
@@ -180,22 +176,18 @@ public class TmfNanoTimestampTest {
         ITmfTimestamp ts = ts0.normalize(0, 0);
         assertEquals("getValue", 0, ts.getValue());
         assertEquals("getscale", 0, ts.getScale());
-        assertEquals("getPrecision", 0, ts.getPrecision());
 
         ts = ts0.normalize(12345, 0);
         assertEquals("getValue", 12345, ts.getValue());
         assertEquals("getscale", 0, ts.getScale());
-        assertEquals("getPrecision", 0, ts.getPrecision());
 
         ts = ts0.normalize(10, 0);
         assertEquals("getValue", 10, ts.getValue());
         assertEquals("getscale", 0, ts.getScale());
-        assertEquals("getPrecision", 0, ts.getPrecision());
 
         ts = ts0.normalize(-10, 0);
         assertEquals("getValue", -10, ts.getValue());
         assertEquals("getscale", 0, ts.getScale());
-        assertEquals("getPrecision", 0, ts.getPrecision());
     }
 
     @Test
@@ -203,22 +195,18 @@ public class TmfNanoTimestampTest {
         ITmfTimestamp ts = ts0.normalize(0, 1);
         assertEquals("getValue", 0, ts.getValue());
         assertEquals("getscale", 1, ts.getScale());
-        assertEquals("getPrecision", 0, ts.getPrecision());
 
         ts = ts0.normalize(12345, 1);
         assertEquals("getValue", 12345, ts.getValue());
         assertEquals("getscale", 1, ts.getScale());
-        assertEquals("getPrecision", 0, ts.getPrecision());
 
         ts = ts0.normalize(10, 1);
         assertEquals("getValue", 10, ts.getValue());
         assertEquals("getscale", 1, ts.getScale());
-        assertEquals("getPrecision", 0, ts.getPrecision());
 
         ts = ts0.normalize(-10, 1);
         assertEquals("getValue", -10, ts.getValue());
         assertEquals("getscale", 1, ts.getScale());
-        assertEquals("getPrecision", 0, ts.getPrecision());
     }
 
     // ------------------------------------------------------------------------
@@ -245,7 +233,7 @@ public class TmfNanoTimestampTest {
 
     @Test
     public void testCompareTo() {
-        final ITmfTimestamp ts0a = new TmfTimestamp(0, 2, 0);
+        final ITmfTimestamp ts0a = new TmfTimestamp(0, 2);
         final ITmfTimestamp ts1a = new TmfTimestamp(123450, -10);
         final ITmfTimestamp ts2a = new TmfTimestamp(-12340, -10);
 
@@ -268,7 +256,7 @@ public class TmfNanoTimestampTest {
         TmfTimestamp expectd = new TmfNanoTimestamp(5);
 
         ITmfTimestamp delta = tstamp0.getDelta(tstamp1);
-        assertEquals("getDelta", 0, delta.compareTo(expectd, false));
+        assertEquals("getDelta", 0, delta.compareTo(expectd));
 
         // Delta for same scale and precision (delta < 0)
         tstamp0 = new TmfTimestamp(5);
@@ -276,7 +264,7 @@ public class TmfNanoTimestampTest {
         expectd = new TmfTimestamp(-5);
 
         delta = tstamp0.getDelta(tstamp1);
-        assertEquals("getDelta", 0, delta.compareTo(expectd, false));
+        assertEquals("getDelta", 0, delta.compareTo(expectd));
     }
 
     @Test
@@ -287,7 +275,7 @@ public class TmfNanoTimestampTest {
         final TmfTimestamp expectd = new TmfTimestamp(0, 0);
 
         final ITmfTimestamp delta = tstamp0.getDelta(tstamp1);
-        assertEquals("getDelta", 0, delta.compareTo(expectd, false));
+        assertEquals("getDelta", 0, delta.compareTo(expectd));
     }
 
 }
This page took 0.025821 seconds and 5 git commands to generate.