]> granicus.if.org Git - icu/commitdiff
ICU-12811 Refactor test-framework to not depend on core
authorMihai Nita <mnita@google.com>
Wed, 15 Feb 2023 22:44:06 +0000 (14:44 -0800)
committerMihai Nita <nmihai_2000@yahoo.com>
Tue, 21 Feb 2023 22:16:19 +0000 (14:16 -0800)
Fixing the maven-build projects

37 files changed:
icu4j/main/shared/build/common-targets.xml
icu4j/main/tests/charset/.classpath
icu4j/main/tests/core/.classpath
icu4j/main/tests/core/src/com/ibm/icu/dev/test/ModuleTest.java [moved from icu4j/main/tests/framework/src/com/ibm/icu/dev/test/ModuleTest.java with 100% similarity]
icu4j/main/tests/core/src/com/ibm/icu/dev/test/ResourceModule.java [moved from icu4j/main/tests/framework/src/com/ibm/icu/dev/test/ResourceModule.java with 100% similarity]
icu4j/main/tests/core/src/com/ibm/icu/dev/test/TestDataModule.java [moved from icu4j/main/tests/framework/src/com/ibm/icu/dev/test/TestDataModule.java with 100% similarity]
icu4j/main/tests/core/src/com/ibm/icu/dev/test/calendar/CalendarRegressionTest.java
icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/DateFormatTest.java
icu4j/main/tests/core/src/com/ibm/icu/dev/test/rbbi/RBBILSTMTest.java
icu4j/main/tests/core/src/com/ibm/icu/dev/test/rbbi/RBBITest.java
icu4j/main/tests/core/src/com/ibm/icu/dev/test/rbbi/RBBITestExtended.java
icu4j/main/tests/core/src/com/ibm/icu/dev/test/rbbi/RBBITstUtils.java [new file with mode: 0644]
icu4j/main/tests/core/src/com/ibm/icu/dev/test/serializable/SerializableWriter.java
icu4j/main/tests/core/src/com/ibm/icu/dev/test/timezone/TimeZoneBoundaryTest.java
icu4j/main/tests/core/src/com/ibm/icu/dev/test/timezone/TimeZoneRegressionTest.java
icu4j/main/tests/core/src/com/ibm/icu/dev/test/timezone/TimeZoneTest.java
icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/TrieMapTest.java
icu4j/main/tests/core/src/com/ibm/icu/dev/tool/locale/LikelySubtagsBuilder.java [moved from icu4j/tools/misc/src/com/ibm/icu/dev/tool/locale/LikelySubtagsBuilder.java with 100% similarity]
icu4j/main/tests/core/src/com/ibm/icu/dev/tool/locale/LocaleDistanceBuilder.java [moved from icu4j/tools/misc/src/com/ibm/icu/dev/tool/locale/LocaleDistanceBuilder.java with 100% similarity]
icu4j/main/tests/framework/.classpath
icu4j/main/tests/framework/src/com/ibm/icu/dev/test/AbstractTestLog.java
icu4j/main/tests/framework/src/com/ibm/icu/dev/test/TestFmwk.java
icu4j/main/tests/framework/src/com/ibm/icu/dev/test/TestUtil.java
icu4j/main/tests/framework/src/com/ibm/icu/dev/util/CollectionUtilities.java
icu4j/main/tests/framework/src/com/ibm/icu/dev/util/ElapsedTimer.java [deleted file]
icu4j/main/tests/framework/src/com/ibm/icu/dev/util/Timer.java
icu4j/main/tests/translit/.classpath
icu4j/main/tests/translit/src/com/ibm/icu/dev/test/TestBoilerplate.java [moved from icu4j/main/tests/framework/src/com/ibm/icu/dev/test/TestBoilerplate.java with 100% similarity]
icu4j/main/tests/translit/src/com/ibm/icu/dev/test/translit/StringBoilerplateTest.java [deleted file]
icu4j/main/tests/translit/src/com/ibm/icu/dev/test/translit/TransliteratorTest.java
icu4j/main/tests/translit/src/com/ibm/icu/dev/util/ImmutableEntry.java [moved from icu4j/main/tests/framework/src/com/ibm/icu/dev/util/ImmutableEntry.java with 100% similarity]
icu4j/main/tests/translit/src/com/ibm/icu/dev/util/UnicodeMap.java [moved from icu4j/main/tests/framework/src/com/ibm/icu/dev/util/UnicodeMap.java with 100% similarity]
icu4j/main/tests/translit/src/com/ibm/icu/dev/util/UnicodeMapIterator.java [moved from icu4j/main/tests/framework/src/com/ibm/icu/dev/util/UnicodeMapIterator.java with 100% similarity]
icu4j/maven-build/maven-icu4j-charset/pom.xml
icu4j/maven-build/maven-icu4j/pom.xml
icu4j/perf-tests/.classpath
icu4j/perf-tests/.settings/org.eclipse.jdt.core.prefs

index 3134360d9b9115c16b3cd286e45faab5347bc48a..69be17381e66430aaeea40a7ff4d8e0f0cfcd3d1 100644 (file)
         <pathelement location="${icu4j.tools.jar}"/>
     </path>
 
-    <target name="_all.core-tests" depends="_all.core, _all.test-framework, _all.tools">
+    <target name="_all.core-tests" depends="_all.core, _all.test-framework">
         <ant dir="${icu4j.core-tests.dir}" inheritAll="false"/>
     </target>
 
     <!-- charset-tests -->
     <path id="javac.classpathref.charset-tests">
         <pathelement location="${icu4j.core.jar}"/>
+        <pathelement location="${icu4j.core-tests.jar}"/>
         <pathelement location="${icu4j.charset.jar}"/>
         <pathelement location="${icu4j.test-framework.jar}"/>
     </path>
     <!-- translit-tests -->
     <path id="javac.classpathref.translit-tests">
         <pathelement location="${icu4j.core.jar}"/>
+        <pathelement location="${icu4j.core-tests.jar}"/>
         <pathelement location="${icu4j.translit.jar}"/>
         <pathelement location="${icu4j.test-framework.jar}"/>
     </path>
     <!-- perf -->
     <path id="javac.classpathref.perf-tests">
         <pathelement location="${icu4j.core.jar}"/>
+        <pathelement location="${icu4j.core-tests.jar}"/>
         <pathelement location="${icu4j.charset.jar}"/>
         <pathelement location="${icu4j.collate.jar}"/>
         <pathelement location="${icu4j.tools.jar}"/>
index f18976940e5a7981dfdba70131c41c4f5d6956b9..6489a0de43670aa2a8dd984b9918f8b3077be21e 100644 (file)
@@ -1,7 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
        <classpathentry excluding="**/.svn/" kind="src" path="src"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
+               <attributes>
+                       <attribute name="module" value="true"/>
+               </attributes>
+       </classpathentry>
        <classpathentry combineaccessrules="false" kind="src" path="/icu4j-charset"/>
        <classpathentry combineaccessrules="false" kind="src" path="/icu4j-core"/>
        <classpathentry combineaccessrules="false" kind="src" path="/icu4j-test-framework"/>
@@ -16,5 +20,6 @@
                        <attribute name="javadoc_location" value="jar:platform:/resource/external-libraries/JUnitParams-1.0.5-javadoc.jar!/"/>
                </attributes>
        </classpathentry>
+       <classpathentry combineaccessrules="false" kind="src" path="/icu4j-core-tests"/>
        <classpathentry kind="output" path="out/bin"/>
 </classpath>
index 373b88f64b5402173993df2df717a83fec551bad..dce1f13899ddffd9ba4fb22e3ec3951f20ff613a 100644 (file)
@@ -1,7 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
        <classpathentry excluding="**/.svn/" kind="src" path="src"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
+               <attributes>
+                       <attribute name="module" value="true"/>
+               </attributes>
+       </classpathentry>
        <classpathentry combineaccessrules="false" kind="src" path="/icu4j-core"/>
        <classpathentry combineaccessrules="false" kind="src" path="/icu4j-test-framework"/>
        <classpathentry combineaccessrules="false" kind="src" path="/icu4j-langdata"/>
@@ -18,6 +22,5 @@
                        <attribute name="javadoc_location" value="jar:platform:/resource/external-libraries/JUnitParams-1.0.5-javadoc.jar!/"/>
                </attributes>
        </classpathentry>
-       <classpathentry kind="src" path="/icu4j-tools"/>
        <classpathentry kind="output" path="out/bin"/>
 </classpath>
index 9eabd4182f04613128d210f51564be45a7fea3a0..7ec63c5c37a3374cdd7490e726773901ae07cfb2 100644 (file)
@@ -1215,35 +1215,41 @@ public class CalendarRegressionTest extends com.ibm.icu.dev.test.TestFmwk {
      */
     @Test
     public void Test4162587() {
-        TimeZone tz = TimeZone.getTimeZone("PST");
-        TimeZone.setDefault(tz);
-        GregorianCalendar cal = new GregorianCalendar(tz);
-        Date d;
+        TimeZone saveZone = TimeZone.getDefault();
 
-        for (int i=0; i<5; ++i) {
-            if (i>0) logln("---");
+        try {
+            TimeZone tz = TimeZone.getTimeZone("PST");
+            TimeZone.setDefault(tz);
+            GregorianCalendar cal = new GregorianCalendar(tz);
+            Date d;
 
-            cal.clear();
-            cal.set(1998, Calendar.APRIL, 5, i, 0);
-            d = cal.getTime();
-            String s0 = d.toString();
-            logln("0 " + i + ": " + s0);
+            for (int i=0; i<5; ++i) {
+                if (i>0) logln("---");
 
-            cal.clear();
-            cal.set(1998, Calendar.APRIL, 4, i+24, 0);
-            d = cal.getTime();
-            String sPlus = d.toString();
-            logln("+ " + i + ": " + sPlus);
+                cal.clear();
+                cal.set(1998, Calendar.APRIL, 5, i, 0);
+                d = cal.getTime();
+                String s0 = d.toString();
+                logln("0 " + i + ": " + s0);
 
-            cal.clear();
-            cal.set(1998, Calendar.APRIL, 6, i-24, 0);
-            d = cal.getTime();
-            String sMinus = d.toString();
-            logln("- " + i + ": " + sMinus);
+                cal.clear();
+                cal.set(1998, Calendar.APRIL, 4, i+24, 0);
+                d = cal.getTime();
+                String sPlus = d.toString();
+                logln("+ " + i + ": " + sPlus);
+
+                cal.clear();
+                cal.set(1998, Calendar.APRIL, 6, i-24, 0);
+                d = cal.getTime();
+                String sMinus = d.toString();
+                logln("- " + i + ": " + sMinus);
 
-            if (!s0.equals(sPlus) || !s0.equals(sMinus)) {
-                errln("Fail: All three lines must match");
+                if (!s0.equals(sPlus) || !s0.equals(sMinus)) {
+                    errln("Fail: All three lines must match");
+                }
             }
+        } finally {
+            TimeZone.setDefault(saveZone);
         }
     }
 
index 627aedf65e1a775931def486089af581e6471e1b..da0f83a882e2dfdaf664244a8cbb2bc55a92be45 100644 (file)
@@ -75,6 +75,7 @@ public class DateFormatTest extends TestFmwk {
      */
     @Test
     public void TestPatterns() {
+
         final String[][] EXPECTED = {
                 {DateFormat.YEAR, "y","en","y"},
 
@@ -2767,10 +2768,10 @@ public class DateFormatTest extends TestFmwk {
                 logln("time zone ex3 ok");
             }
             catch (Exception e) {
-                // hmmm... this shouldn't happen.  don't want to exit this
-                // fn with timezone improperly set, so just in case
-                TimeZone.setDefault(oldtz);
+                // hmmm... this shouldn't happen.
                 throw new IllegalStateException(e.getMessage());
+            } finally {
+                TimeZone.setDefault(oldtz);
             }
         }
 
index 3c9545d26acc3bde1137bb9faf4b781a76f3ec21..92d8e8261560ee933ce00d450dddd5bbc00df18e 100644 (file)
@@ -13,7 +13,6 @@ import org.junit.runner.RunWith;
 import org.junit.runners.JUnit4;
 
 import com.ibm.icu.dev.test.TestFmwk;
-import com.ibm.icu.dev.test.TestUtil;
 import com.ibm.icu.impl.breakiter.LSTMBreakEngine;
 import com.ibm.icu.lang.UScript;
 import com.ibm.icu.text.BreakIterator;
@@ -43,7 +42,7 @@ public class RBBILSTMTest extends TestFmwk {
     private void runTestFromFile(String filename, int script) {
         // The expectation in this test depends on LSTM, skip the test if the
         // configuration is not build with LSTM data.
-        org.junit.Assume.assumeTrue(!TestUtil.skipLSTMTest());
+        org.junit.Assume.assumeTrue(!RBBITstUtils.skipLSTMTest());
 
         BreakIterator bi = BreakIterator.getWordInstance();
         String testString;
index 64aba243a938e8e08ea9c08c45c6353b7cb155ae..14a7659455ff9222b41a24c29e96679c436a32c9 100644 (file)
@@ -26,7 +26,6 @@ import org.junit.runner.RunWith;
 import org.junit.runners.JUnit4;
 
 import com.ibm.icu.dev.test.TestFmwk;
-import com.ibm.icu.dev.test.TestUtil;
 import com.ibm.icu.impl.RBBIDataWrapper;
 import com.ibm.icu.text.BreakIterator;
 import com.ibm.icu.text.RuleBasedBreakIterator;
@@ -45,7 +44,7 @@ public class RBBITest extends TestFmwk {
    public void TestThaiDictionaryBreakIterator() {
        // The expectations in this test heavily depends on the Thai dictionary.
        // Therefore, we skip this test under the LSTM configuration.
-       org.junit.Assume.assumeTrue(!TestUtil.skipDictionaryTest());
+       org.junit.Assume.assumeTrue(!RBBITstUtils.skipDictionaryTest());
        int position;
        int index;
        int result[] = { 1, 2, 5, 10, 11, 12, 11, 10, 5, 2, 1, 0 };
index 427955bfab7dc9a08d237c237271099aa1efe774..183e24a3feccd66c18ff27a6a7c5d38a850d9006 100644 (file)
@@ -19,7 +19,6 @@ import org.junit.runner.RunWith;
 import org.junit.runners.JUnit4;
 
 import com.ibm.icu.dev.test.TestFmwk;
-import com.ibm.icu.dev.test.TestUtil;
 import com.ibm.icu.impl.ICUConfig;
 import com.ibm.icu.impl.Utility;
 import com.ibm.icu.lang.UCharacter;
@@ -56,7 +55,7 @@ static class TestParams {
 public void TestExtended() {
     // The expectations in this test heavily depends on the Thai dictionary.
     // Therefore, we skip this test under the LSTM configuration.
-    org.junit.Assume.assumeTrue(!TestUtil.skipDictionaryTest());
+    org.junit.Assume.assumeTrue(!RBBITstUtils.skipDictionaryTest());
     TestParams     tp = new TestParams();
 
 
diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/rbbi/RBBITstUtils.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/rbbi/RBBITstUtils.java
new file mode 100644 (file)
index 0000000..079f1c6
--- /dev/null
@@ -0,0 +1,40 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+/*
+ *******************************************************************************
+ * Copyright (C) 1996-2012, International Business Machines Corporation and    *
+ * others. All Rights Reserved.                                                *
+ *******************************************************************************
+ */
+package com.ibm.icu.dev.test.rbbi;
+
+import java.util.MissingResourceException;
+
+import com.ibm.icu.impl.breakiter.LSTMBreakEngine;
+import com.ibm.icu.lang.UScript;
+
+public class RBBITstUtils {
+    static boolean lstmDataIsBuilt() {
+        try {
+            LSTMBreakEngine.createData(UScript.THAI);
+            return true;
+        } catch (MissingResourceException e) {
+            // do nothing
+        }
+        try {
+            LSTMBreakEngine.createData(UScript.MYANMAR);
+            return true;
+        } catch (MissingResourceException e) {
+            // do nothing
+        }
+        return false;
+    }
+
+    static boolean skipLSTMTest() {
+        return ! lstmDataIsBuilt();
+    }
+
+    public static boolean skipDictionaryTest() {
+        return lstmDataIsBuilt();
+    }
+}
index fd620fccdd81b0f26d6387a9e03bef0dff026545..f64021af82ec117297c31278da1e52f14dfe3620 100644 (file)
@@ -71,11 +71,16 @@ public class SerializableWriter
 
         // Override default TimeZone, so serialized data always use
         // the consistent zone if not specified.
-        TimeZone.setDefault(TimeZone.getTimeZone("America/Los_Angeles"));
+        TimeZone savedZone = TimeZone.getDefault();
+        try {
+            TimeZone.setDefault(TimeZone.getTimeZone("America/Los_Angeles"));
 
-        SerializableWriter writer = new SerializableWriter(outDir);
+            SerializableWriter writer = new SerializableWriter(outDir);
 
-        writer.serialize();
+            writer.serialize();
+        } finally {
+            TimeZone.setDefault(savedZone);
+        }
     }
 
     public void serialize() throws IOException {
index 9f29c25dcec75b9da4348c8144e47f4723885b2e..8b8271cc5ccee4a890ea19656ac5007a4a19b9fd 100644 (file)
@@ -444,15 +444,19 @@ public class TimeZoneBoundaryTest extends TestFmwk
         // support historic transitions, therefore, the test below
         // will fail on such environment (with the latest TimeZone
         // patch for US 2007+ rule).
-        if (TestUtil.getJavaVendor() == JavaVendor.Android || TestUtil.getJavaVersion() > 3) {
-            // This only works in PST/PDT
-            TimeZone.setDefault(safeGetTimeZone("PST"));
-            logln("========================================");
-            tempcal.set(1997, 0, 1);
-            findDaylightBoundaryUsingDate(tempcal.getTime(), "PST", PST_1997_BEG);
-            logln("========================================");
-            tempcal.set(1997, 6, 1);
-            findDaylightBoundaryUsingDate(tempcal.getTime(), "PDT", PST_1997_END);
+        try {
+            if (TestUtil.getJavaVendor() == JavaVendor.Android || TestUtil.getJavaVersion() > 3) {
+                // This only works in PST/PDT
+                TimeZone.setDefault(safeGetTimeZone("PST"));
+                logln("========================================");
+                tempcal.set(1997, 0, 1);
+                findDaylightBoundaryUsingDate(tempcal.getTime(), "PST", PST_1997_BEG);
+                logln("========================================");
+                tempcal.set(1997, 6, 1);
+                findDaylightBoundaryUsingDate(tempcal.getTime(), "PDT", PST_1997_END);
+            }
+        } finally {
+            TimeZone.setDefault(save);
         }
 
         //  if (true)
@@ -856,4 +860,16 @@ public class TimeZoneBoundaryTest extends TestFmwk
         findBoundariesStepwise(1997, ONE_DAY, safeGetTimeZone("America/Phoenix"), 0); // Added 3Jan01
         findBoundariesStepwise(1997, ONE_DAY, safeGetTimeZone(AUSTRALIA), 2);
     }
+
+    private static TimeZone safeGetTimeZone(String id) {
+        TimeZone tz = TimeZone.getTimeZone(id);
+        if (tz == null) {
+            // should never happen
+            errln("FAIL: TimeZone.getTimeZone(" + id + ") => null");
+        }
+        if (!tz.getID().equals(id)) {
+            warnln("FAIL: TimeZone.getTimeZone(" + id + ") => " + tz.getID());
+        }
+        return tz;
+    }
 }
index be774fa9f18dc040a2386b2aeb707b9c1e981af0..bf10b1f68480f683bca671f7465983999ac7442a 100644 (file)
@@ -312,7 +312,7 @@ public class TimeZoneRegressionTest extends TestFmwk {
     TimeZone initialZone = TimeZone.getDefault();
         Calendar cal = Calendar.getInstance();
         TimeZone tz = TimeZone.getTimeZone("PST");
-    TimeZone.setDefault(tz);
+        TimeZone.setDefault(tz);
         cal.setTimeZone(tz);
 
         java.util.Calendar tempcal = java.util.Calendar.getInstance();
index 606f492c0e1b0d76a2a0bbf60b051f65ea4caa0f..8b583a3b08668984ad531c65acba4f0750bed97a 100644 (file)
@@ -1377,19 +1377,24 @@ public class TimeZoneTest extends TestFmwk
     @Test
     public void TestZoneMeta() {
         java.util.TimeZone save = java.util.TimeZone.getDefault();
-        java.util.TimeZone newZone = java.util.TimeZone.getTimeZone("GMT-08:00");
-        com.ibm.icu.util.TimeZone.setDefault(null);
-        java.util.TimeZone.setDefault(newZone);
-        SimpleTimeZone zone = new SimpleTimeZone(0, "GMT");
-        com.ibm.icu.util.TimeZone defaultZone = com.ibm.icu.util.TimeZone.getDefault();
-        if(defaultZone==null){
-            errln("TimeZone.getDefault() failed for GMT-08:00");
-        }
-        if(zone==null){
-            errln("SimpleTimeZone(0, GMT-08:00) failed for GMT-08:00");
-        }
-        //reset
-        java.util.TimeZone.setDefault(save);
+        com.ibm.icu.util.TimeZone icuTzSave = com.ibm.icu.util.TimeZone.getDefault();
+        try {
+            java.util.TimeZone newZone = java.util.TimeZone.getTimeZone("GMT-08:00");
+            com.ibm.icu.util.TimeZone.setDefault(null);
+            java.util.TimeZone.setDefault(newZone);
+            SimpleTimeZone zone = new SimpleTimeZone(0, "GMT");
+            com.ibm.icu.util.TimeZone defaultZone = com.ibm.icu.util.TimeZone.getDefault();
+            if(defaultZone==null){
+                errln("TimeZone.getDefault() failed for GMT-08:00");
+            }
+            if(zone==null){
+                errln("SimpleTimeZone(0, GMT-08:00) failed for GMT-08:00");
+            }
+        } finally {
+            // reset timezones
+            java.util.TimeZone.setDefault(save);
+            com.ibm.icu.util.TimeZone.setDefault(icuTzSave);
+        }
     }
 
     // Copied from the protected constant in TimeZone.
@@ -1720,6 +1725,7 @@ public class TimeZoneTest extends TestFmwk
     @Test
     public void TestSetDefault() {
         java.util.TimeZone save = java.util.TimeZone.getDefault();
+        TimeZone icuSave = TimeZone.getDefault();
 
         /*
          * America/Caracs (Venezuela) changed the base offset from -4:00 to
@@ -1772,6 +1778,7 @@ public class TimeZoneTest extends TestFmwk
         }
 
         // Restore the original JDK time zone
+        TimeZone.setDefault(icuSave);
         java.util.TimeZone.setDefault(save);
     }
 
index 166c11ef40e0f103996aa17522fa882324218f40..cb5d58f84a8457f516415a364efc793b51e779f1 100644 (file)
@@ -8,6 +8,7 @@
  */
 package com.ibm.icu.dev.test.util;
 
+import java.text.DecimalFormat;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
@@ -32,7 +33,6 @@ import com.ibm.icu.impl.Row.R3;
 import com.ibm.icu.impl.Utility;
 import com.ibm.icu.lang.UCharacter;
 import com.ibm.icu.lang.UScript;
-import com.ibm.icu.text.DecimalFormat;
 import com.ibm.icu.text.UnicodeSet;
 import com.ibm.icu.util.StringTrieBuilder.Option;
 import com.ibm.icu.util.ULocale;
index 4f8f76d62b1bd1071359acf5517442d7eac43e3c..ce5860d65195071679811938bdbb8ca7eb631dbe 100644 (file)
@@ -1,8 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
        <classpathentry excluding="**/.svn/" kind="src" path="src"/>
-       <classpathentry combineaccessrules="false" kind="src" path="/icu4j-core"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
+               <attributes>
+                       <attribute name="module" value="true"/>
+               </attributes>
+       </classpathentry>
        <classpathentry kind="lib" path="/external-libraries/hamcrest-core-1.3.jar"/>
        <classpathentry kind="lib" path="/external-libraries/junit-4.12.jar" sourcepath="/external-libraries/junit-4.12-sources.jar">
                <attributes>
index e6dc664c1f968720b2c631d98c50dab2aa8ecad8..02169cbf8b2262414b7575becd691f2098030247 100644 (file)
@@ -14,37 +14,7 @@ import java.util.GregorianCalendar;
 
 import org.junit.Assert;
 
-import com.ibm.icu.util.VersionInfo;
-
 public abstract class AbstractTestLog implements TestLog {
-    /**
-     * Returns true if ICU_Version < major.minor.
-     */
-    static public boolean isICUVersionBefore(int major, int minor) {
-        return isICUVersionBefore(major, minor, 0);
-    }
-
-    /**
-     * Returns true if ICU_Version < major.minor.milli.
-     */
-    static public boolean isICUVersionBefore(int major, int minor, int milli) {
-        return VersionInfo.ICU_VERSION.compareTo(VersionInfo.getInstance(major, minor, milli)) < 0;
-    }
-
-    /**
-     * Returns true if ICU_Version >= major.minor.
-     */
-    static public boolean isICUVersionAtLeast(int major, int minor) {
-        return isICUVersionAtLeast(major, minor, 0);
-    }
-
-    /**
-     * Returns true if ICU_Version >= major.minor.milli.
-     */
-    static public boolean isICUVersionAtLeast(int major, int minor, int milli) {
-        return !isICUVersionBefore(major, minor, milli);
-    }
-
     /**
      * Add a message.
      */
index 349578bfa5da8e5b1b162acf09fb7f55884ac07f..f6bf8e3c0be56f6fb930df0f72f7516968cce9bc 100644 (file)
@@ -16,15 +16,13 @@ import java.util.Arrays;
 import java.util.Locale;
 import java.util.Properties;
 import java.util.Random;
+import java.util.TimeZone;
 
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.Before;
 
-import com.ibm.icu.util.TimeZone;
-import com.ibm.icu.util.ULocale;
-
 /**
  * TestFmwk is a base class for tests that can be run conveniently from the
  * command line as well as under the Java test harness.
@@ -222,19 +220,6 @@ abstract public class TestFmwk extends AbstractTestLog {
         return getParams().getIntProperty(key, defVal, maxVal);
     }
 
-    protected static TimeZone safeGetTimeZone(String id) {
-        TimeZone tz = TimeZone.getTimeZone(id);
-        if (tz == null) {
-            // should never happen
-            errln("FAIL: TimeZone.getTimeZone(" + id + ") => null");
-        }
-        if (!tz.getID().equals(id)) {
-            warnln("FAIL: TimeZone.getTimeZone(" + id + ") => " + tz.getID());
-        }
-        return tz;
-    }
-
-
     // Utility Methods
 
     protected static String hex(char[] s){
@@ -482,6 +467,9 @@ abstract public class TestFmwk extends AbstractTestLog {
      * Check the given array to see that all the locales in the expected array
      * are present.
      *
+     * @param <T>
+     *            the type of the objects to check, must have a toString method,
+     *            so anything will do
      * @param msg
      *            string message, for log output
      * @param array
@@ -490,27 +478,7 @@ abstract public class TestFmwk extends AbstractTestLog {
      *            array of locales names we expect to see, or null
      * @return the length of 'array'
      */
-    protected static int checkArray(String msg, Locale array[], String expected[]) {
-        String strs[] = new String[array.length];
-        for (int i = 0; i < array.length; ++i) {
-            strs[i] = array[i].toString();
-        }
-        return checkArray(msg, strs, expected);
-    }
-
-    /**
-     * Check the given array to see that all the locales in the expected array
-     * are present.
-     *
-     * @param msg
-     *            string message, for log output
-     * @param array
-     *            array of locales to check
-     * @param expected
-     *            array of locales names we expect to see, or null
-     * @return the length of 'array'
-     */
-    protected static int checkArray(String msg, ULocale array[], String expected[]) {
+    protected static <T> int checkArray(String msg, T array[], String expected[]) {
         String strs[] = new String[array.length];
         for (int i = 0; i < array.length; ++i) {
             strs[i] = array[i].toString();
@@ -767,5 +735,4 @@ abstract public class TestFmwk extends AbstractTestLog {
 //            System.out.println();
 //        }
     }
-
 }
index 59e4dcbe7d7ea8326bab8ca9fc850fa0272c2403..5980747f4bbcc34421feadd3d9d1db74f107e733 100644 (file)
@@ -15,10 +15,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.util.Locale;
-import java.util.MissingResourceException;
-
-import com.ibm.icu.impl.breakiter.LSTMBreakEngine;
-import com.ibm.icu.lang.UScript;
 
 public final class TestUtil {
     /**
@@ -283,28 +279,4 @@ public final class TestUtil {
         }
         return ver;
     }
-
-    private static boolean lstmDataIsBuilt() {
-        try {
-            LSTMBreakEngine.createData(UScript.THAI);
-            return true;
-        } catch (MissingResourceException e) {
-            // do nothing
-        }
-        try {
-            LSTMBreakEngine.createData(UScript.MYANMAR);
-            return true;
-        } catch (MissingResourceException e) {
-            // do nothing
-        }
-        return false;
-    }
-
-    public static boolean skipLSTMTest() {
-        return ! lstmDataIsBuilt();
-    }
-
-    public static boolean skipDictionaryTest() {
-        return lstmDataIsBuilt();
-    }
 }
index 7a6c15dd7a21c4255d040081351a05d82ce83134..7dbb943c32426dfe2377bb042ae143eeee8c5031 100644 (file)
@@ -19,10 +19,6 @@ import java.util.SortedSet;
 import java.util.TreeSet;
 import java.util.regex.Matcher;
 
-import com.ibm.icu.text.UTF16;
-import com.ibm.icu.text.UnicodeSet;
-import com.ibm.icu.text.UnicodeSetIterator;
-
 /**
  * Utilities that ought to be on collections, but aren't
  *
@@ -410,16 +406,6 @@ public final class CollectionUtilities {
         return result;
     }
 
-    public static String remove(String source, UnicodeSet removals) {
-        StringBuffer result = new StringBuffer();
-        int cp;
-        for (int i = 0; i < source.length(); i += UTF16.getCharCount(cp)) {
-            cp = UTF16.charAt(source, i);
-            if (!removals.contains(cp)) UTF16.append(result, cp);
-        }
-        return result.toString();
-    }
-
     /**
      * Does one string contain another, starting at a specific offset?
      * @param text
@@ -439,57 +425,6 @@ public final class CollectionUtilities {
         return i;
     }
 
-    /**
-     * Returns the ending offset found by matching characters with testSet, until a position is found that doen't match
-     * @param string
-     * @param offset
-     * @param testSet
-     * @return
-     */
-    public int span(CharSequence string, int offset, UnicodeSet testSet) {
-        while (true) {
-            int newOffset = testSet.matchesAt(string, offset);
-            if (newOffset < 0) return offset;
-        }
-    }
-
-    /**
-     * Returns the ending offset found by matching characters with testSet, until a position is found that does match
-     * @param string
-     * @param offset
-     * @param testSet
-     * @return
-     */
-    public int spanNot(CharSequence string, int offset, UnicodeSet testSet) {
-        while (true) {
-            int newOffset = testSet.matchesAt(string, offset);
-            if (newOffset >= 0) return offset;
-            ++offset; // try next character position
-            // we don't have to worry about surrogates for this.
-        }
-    }
-
-    /**
-     * Modifies Unicode set to flatten the strings. Eg [abc{da}] => [abcd]
-     * Returns the set for chaining.
-     * @param exemplar1
-     * @return
-     */
-    public static UnicodeSet flatten(UnicodeSet exemplar1) {
-        UnicodeSet result = new UnicodeSet();
-        boolean gotString = false;
-        for (UnicodeSetIterator it = new UnicodeSetIterator(exemplar1); it.nextRange();) {
-            if (it.codepoint == UnicodeSetIterator.IS_STRING) {
-                result.addAll(it.string);
-                gotString = true;
-            } else {
-                result.add(it.codepoint, it.codepointEnd);
-            }
-        }
-        if (gotString) exemplar1.set(result);
-        return exemplar1;
-    }
-
     /**
      * For producing filtered iterators
      */
diff --git a/icu4j/main/tests/framework/src/com/ibm/icu/dev/util/ElapsedTimer.java b/icu4j/main/tests/framework/src/com/ibm/icu/dev/util/ElapsedTimer.java
deleted file mode 100644 (file)
index 855d798..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-// © 2016 and later: Unicode, Inc. and others.
-// License & terms of use: http://www.unicode.org/copyright.html
-//
-//  ElapsedTimer.java
-//
-//  Created by Steven R. Loomis on 11/11/2005.
-//  Copyright 2005-2012 IBM. All rights reserved.
-//
-
-package com.ibm.icu.dev.util;
-
-import java.util.Locale;
-
-import com.ibm.icu.text.MessageFormat;
-import com.ibm.icu.text.NumberFormat;
-import com.ibm.icu.text.RuleBasedNumberFormat;
-
-
-/**
- * Simple stopwatch timer.
- * Usage:   { ElapsedTimer et = new ElapsedTimer(); 
- *            do_some_stuff;  
- *            System.out.println("It took " + et + " to do stuff."); }
- *
- * Advanced:   { ElapsedTimer et = new ElapsedTimer("Thing2's time: {0}");  // messageformat pattern
- *            do_thing_2();  
- *            System.out.println(et.toString()); }
- *
- * More advanced:  NumberFormat and/or MessageFormat can be provided in the constructor
- *
- * @internal CLDR
- */
-public final class ElapsedTimer {
-
-    /**
-     * Convenience method to print the elasped time (in milliseconds) 
-     */
-    public static String elapsedTime(long start, long end) {
-        return diffTime(getFormat(), start, end);
-    }
-
-    public static String elapsedTime(long start) {
-        return diffTime(getFormat(), start, System.currentTimeMillis());
-    }
-    
-    // class
-
-    private long startTime = System.currentTimeMillis();
-    private NumberFormat myDurationFormat = null;
-    private MessageFormat myMsgFormat = null;
-
-    public ElapsedTimer() {            
-    }
-    
-    public ElapsedTimer(MessageFormat aMsgFmt) {
-        myMsgFormat = aMsgFmt;
-    }
-
-    public ElapsedTimer(NumberFormat aNumFmt) {
-        myDurationFormat = aNumFmt;
-    }
-    
-    public ElapsedTimer(MessageFormat aMsgFmt, NumberFormat aNumFmt) {
-        myMsgFormat = aMsgFmt;
-        myDurationFormat = aNumFmt;
-    }
-
-    public ElapsedTimer(String pattern) {
-        myMsgFormat = new MessageFormat(pattern);
-    }
-
-    public ElapsedTimer(String pattern, NumberFormat aNumFmt) {
-        myMsgFormat = new MessageFormat(pattern);
-        myDurationFormat = aNumFmt;
-    }
-
-    /**
-     * @return elapsed time in seconds since object creation
-     */
-    public final String toString() { 
-        long endTime = System.currentTimeMillis();
-        String duration = diffTime(myDurationFormat, startTime, endTime);
-        if(myMsgFormat == null) {
-            return duration;
-        } else {
-            return myMsgFormat.format(new Object[] {duration});
-        }
-    }
-
-    private static NumberFormat gFormat = null;
-    
-    private static NumberFormat getFormat() {
-        if(gFormat == null) {
-            gFormat = new RuleBasedNumberFormat(Locale.US,
-                        RuleBasedNumberFormat.DURATION);
-        }
-        return gFormat; 
-    }
-    
-    private static String diffTime(NumberFormat fmt, long start, long end) {
-        if(fmt==null) {
-            fmt = getFormat();
-        }
-        synchronized(fmt) {
-            long age = end - start;
-            long diff = age/1000; // millis per second. Workaround ticket:7936 by using whole number seconds.
-            return fmt.format(diff);
-        }
-    }    
-}
index 11f7ebeb24b14a9e39b6ffc86f117ea60d69cdd9..14803e75b6651e9370f8d98c1b473e443b336fc6 100644 (file)
@@ -8,9 +8,9 @@
  */
 package com.ibm.icu.dev.util;
 
-import com.ibm.icu.text.DecimalFormat;
-import com.ibm.icu.text.NumberFormat;
-import com.ibm.icu.util.ULocale;
+import java.text.DecimalFormat;
+import java.text.NumberFormat;
+import java.util.Locale;
 
 public final class Timer {
     public static final long SECONDS = 100000000;
@@ -78,8 +78,8 @@ public final class Timer {
         return nf.format(getDuration()/iterations) + "\tns\t" + pf.format((double)getDuration()/other - 1D) + "";
     }
 
-    private DecimalFormat nf = (DecimalFormat) NumberFormat.getNumberInstance(ULocale.ENGLISH);
-    private DecimalFormat pf = (DecimalFormat) NumberFormat.getPercentInstance(ULocale.ENGLISH);
+    private DecimalFormat nf = (DecimalFormat) NumberFormat.getNumberInstance(Locale.ENGLISH);
+    private DecimalFormat pf = (DecimalFormat) NumberFormat.getPercentInstance(Locale.ENGLISH);
     
     {
         pf.setMaximumFractionDigits(1);
index 9f94964f1124445140817c42f3dc1c139d84f005..f0cbb84ec68567fc75d59d479b7d92aabfa2953f 100644 (file)
@@ -4,7 +4,11 @@
        <classpathentry combineaccessrules="false" kind="src" path="/icu4j-translit"/>
        <classpathentry combineaccessrules="false" kind="src" path="/icu4j-core"/>
        <classpathentry combineaccessrules="false" kind="src" path="/icu4j-test-framework"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
+               <attributes>
+                       <attribute name="module" value="true"/>
+               </attributes>
+       </classpathentry>
        <classpathentry combineaccessrules="false" kind="src" path="/icu4j-langdata"/>
        <classpathentry kind="lib" path="/external-libraries/hamcrest-core-1.3.jar"/>
        <classpathentry kind="lib" path="/external-libraries/junit-4.12.jar" sourcepath="/external-libraries/junit-4.12-sources.jar">
@@ -17,5 +21,6 @@
                        <attribute name="javadoc_location" value="jar:platform:/resource/external-libraries/JUnitParams-1.0.5-javadoc.jar!/"/>
                </attributes>
        </classpathentry>
+       <classpathentry combineaccessrules="false" kind="src" path="/icu4j-core-tests"/>
        <classpathentry kind="output" path="out/bin"/>
 </classpath>
diff --git a/icu4j/main/tests/translit/src/com/ibm/icu/dev/test/translit/StringBoilerplateTest.java b/icu4j/main/tests/translit/src/com/ibm/icu/dev/test/translit/StringBoilerplateTest.java
deleted file mode 100644 (file)
index f697bdb..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-// © 2016 and later: Unicode, Inc. and others.
-// License & terms of use: http://www.unicode.org/copyright.html
-/*
- *******************************************************************************
- * Copyright (C) 2016, International Business Machines Corporation and         *
- * others. All Rights Reserved.                                                *
- *******************************************************************************
- */
-package com.ibm.icu.dev.test.translit;
-
-import java.util.List;
-
-import org.junit.Test;
-
-import com.ibm.icu.dev.test.TestBoilerplate;
-
-/**
- * Moved from UnicodeMapTest
- */
-public class StringBoilerplateTest extends TestBoilerplate<String> {
-    public void TestStringBoilerplate() throws Exception {
-    }
-
-    @Test
-    public void test() throws Exception {
-        _test();
-    }
-    
-    /* (non-Javadoc)
-     * @see com.ibm.icu.dev.test.TestBoilerplate#_hasSameBehavior(java.lang.Object, java.lang.Object)
-     */
-    @Override
-    protected boolean _hasSameBehavior(String a, String b) {
-        // we are pretty confident in the equals method, so won't bother with this right now.
-        return true;
-    }
-
-    /* (non-Javadoc)
-     * @see com.ibm.icu.dev.test.TestBoilerplate#_addTestObject(java.util.List)
-     */
-    @Override
-    protected boolean _addTestObject(List<String> list) {
-        if (list.size() > 31) return false;
-        StringBuilder result = new StringBuilder();
-        for (int i = 0; i < 10; ++i) {
-            result.append((char)random.nextInt(0xFF));
-        }
-        list.add(result.toString());
-        return true;
-    }
-}
index e73f9379efd9a0a774b4a774d79a15568e672824..acab8ad134b785f469013c1f9e68eca1adf26ac9 100644 (file)
@@ -37,6 +37,7 @@ import com.ibm.icu.text.UnicodeSet;
 import com.ibm.icu.text.UnicodeSetIterator;
 import com.ibm.icu.util.CaseInsensitiveString;
 import com.ibm.icu.util.ULocale;
+import com.ibm.icu.dev.test.rbbi.RBBITstUtils;
 
 /***********************************************************************
 
@@ -3608,7 +3609,7 @@ the ::BEGIN/::END stuff)
     public void TestThai() {
         // The expectations in this test heavily depends on the Thai dictionary.
         // Therefore, we skip this test under the LSTM configuration.
-        org.junit.Assume.assumeTrue(!TestUtil.skipDictionaryTest());
+        org.junit.Assume.assumeTrue(!RBBITstUtils.skipDictionaryTest());
         Transliterator tr = Transliterator.getInstance("Any-Latin", Transliterator.FORWARD);
         String thaiText =
             "\u0e42\u0e14\u0e22\u0e1e\u0e37\u0e49\u0e19\u0e10\u0e32\u0e19\u0e41\u0e25\u0e49\u0e27, \u0e04\u0e2d" +
index bc9ff1419b13366bc7df6c82f1e64a6e54f37e12..534756f0792282f207285ac222628708e6dc8b75 100644 (file)
       <scope>provided</scope>
     </dependency>
 
+    <dependency>
+      <groupId>com.ibm.icu</groupId>
+      <artifactId>icu4j</artifactId>
+      <version>${project.version}</version>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+
     <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
index 658db5a045b1f9ee5c69143023b17d4f660308d0..1076d96ccfef30dec41adfb92f300cc4f8867657 100644 (file)
             </manifestEntries>
           </archive>
         </configuration>
+        <executions>
+          <execution>
+            <goals>
+              <goal>test-jar</goal>
+            </goals>
+          </execution>
+        </executions>
       </plugin>
 
     </plugins>
index c6d8649e154eae15c6a3dacd1aae32191703b63a..0c639d30ad284aca155cff4956974d31a997f5a9 100644 (file)
@@ -7,7 +7,8 @@
        <classpathentry combineaccessrules="false" kind="src" path="/icu4j-currdata"/>
        <classpathentry combineaccessrules="false" kind="src" path="/icu4j-langdata"/>
        <classpathentry combineaccessrules="false" kind="src" path="/icu4j-regiondata"/>
+       <classpathentry combineaccessrules="false" kind="src" path="/icu4j-core-tests"/>
        <classpathentry combineaccessrules="false" kind="src" path="/icu4j-tools"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
        <classpathentry kind="output" path="out/bin"/>
 </classpath>
index fee21e5e6e02b0d8fce4ac029b2e55c49d7d06e4..67bfee0ba2416955736ff658bafcf4dfa56d1332 100644 (file)
@@ -1,8 +1,8 @@
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -70,23 +70,28 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
 org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=1.8
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16
 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16
 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
@@ -162,11 +167,12 @@ org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
 org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
 org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
 org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert
 org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
 org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
 org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
 org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert
 org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
 org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
 org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
@@ -196,6 +202,8 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=inser
 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
 org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
 org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
 org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
 org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
@@ -219,12 +227,16 @@ org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
 org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
 org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
 org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert
 org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
 org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
 org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
 org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
 org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert
 org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
@@ -270,6 +282,8 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do n
 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
@@ -305,8 +319,11 @@ org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not inser
 org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
 org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert
 org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert
 org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
 org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
 org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
@@ -329,4 +346,8 @@ org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
 org.eclipse.jdt.core.formatter.tabulation.char=space
 org.eclipse.jdt.core.formatter.tabulation.size=4
 org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true