ctf: Disable NLS warnings in test plugin
[deliverable/tracecompass.git] / org.eclipse.linuxtools.ctf.core.tests / src / org / eclipse / linuxtools / ctf / core / tests / trace / CTFTraceCallsitePerformanceTest.java
index a641be03dc0505d4f48418dc668a63a21bc60b56..c361ec26481ee7c80085d175d5efd0d61979f056 100644 (file)
@@ -1,13 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Ericsson
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Matthew Khouzam - Initial API and implementation
+ *******************************************************************************/
+
 package org.eclipse.linuxtools.ctf.core.tests.trace;
 
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeTrue;
 
 import java.util.List;
 import java.util.Random;
 
 import org.eclipse.linuxtools.ctf.core.event.CTFCallsite;
-import org.eclipse.linuxtools.ctf.core.tests.TestParams;
+import org.eclipse.linuxtools.ctf.core.tests.shared.CtfTestTraces;
 import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
 import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
 import org.junit.Before;
@@ -15,21 +27,19 @@ import org.junit.Test;
 
 /**
  * Test the performance of the callsite storage in the CTF trace.
- * @author Matthew Khouzam
  *
+ * @author Matthew Khouzam
  */
 public class CTFTraceCallsitePerformanceTest {
 
     private static final int NUMBER_OF_SEEKS = 100000;
 
-    @SuppressWarnings("nls")
     private final String[] callsites = { "Alligator", "Bunny", "Cat",
             "Dolphin", "Echidna", "Gazelle", "Heron", "Ibex", "Jackalope",
             "Koala", "Lynx", "Meerkat", "Narwhal", "Ocelot", "Pangolin",
             "Quetzal", "Ringtail", "Sandpiper", "Tiger", "Urchin", "Vulture",
             "Walrus", "X-Ray Tetra", "Zonkey" };
 
-    @SuppressWarnings("nls")
     private final String[] functions = { "sentence", "together", "children",
             "mountain", "chipmunk", "crashing", "drinking", "insisted",
             "insulted", "invented", "squinted", "standing", "swishing",
@@ -38,7 +48,6 @@ public class CTFTraceCallsitePerformanceTest {
             "birthday", "bluebird", "cheerful", "colorful", "daylight",
             "doghouse", "driveway", "everyone" };
 
-    @SuppressWarnings("nls")
     private final String[] files = { "Adult.java", "Aeroplane.java",
             "Air.java", "Airforce.java", "Airport.java", "Album.java",
             "Alphabet.java", "Apple.java", "Arm.java", "Army.java", "Babby.java" };
@@ -64,7 +73,8 @@ public class CTFTraceCallsitePerformanceTest {
     @Before
     public void setup() throws CTFReaderException, SecurityException,
             IllegalArgumentException {
-        fTrace = new CTFTrace(TestParams.getTraceFile().getParentFile());
+        assumeTrue(CtfTestTraces.tracesExist());
+        fTrace = new CTFTrace(CtfTestTraces.getTraceFile().getParentFile());
     }
 
     private void addCallsites(int numCallsites) {
@@ -106,7 +116,7 @@ public class CTFTraceCallsitePerformanceTest {
     private void test(int callsiteSize) {
         addCallsites(callsiteSize);
         long ns = testMain();
-        System.out.println( "perf ( " + callsiteSize + ", " + ns + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+        System.out.println( "perf ( " + callsiteSize + ", " + ns + ")");
     }
 
     private void perfTest() {
@@ -186,5 +196,5 @@ public class CTFTraceCallsitePerformanceTest {
     public void test2MCallsites() {
         test(2000000);
     }
-
 }
+
This page took 0.025327 seconds and 5 git commands to generate.