commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [1/2] commons-rdf git commit: Ensure we don't create @en-gb first with the factory (in case it caches)
Date Mon, 23 Jan 2017 11:50:57 GMT
Repository: commons-rdf
Updated Branches:
  refs/heads/COMMONSRDF-51-langtag-lcase 50dc8861f -> c729469ae


Ensure we don't create @en-gb first with the factory (in case it caches)


Project: http://git-wip-us.apache.org/repos/asf/commons-rdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-rdf/commit/448c20b1
Tree: http://git-wip-us.apache.org/repos/asf/commons-rdf/tree/448c20b1
Diff: http://git-wip-us.apache.org/repos/asf/commons-rdf/diff/448c20b1

Branch: refs/heads/COMMONSRDF-51-langtag-lcase
Commit: 448c20b1fe9241ffcd3955c235db0c35d24bb940
Parents: 50dc886
Author: Stian Soiland-Reyes <stain@apache.org>
Authored: Mon Jan 23 11:50:05 2017 +0000
Committer: Stian Soiland-Reyes <stain@apache.org>
Committed: Mon Jan 23 11:50:05 2017 +0000

----------------------------------------------------------------------
 .../org/apache/commons/rdf/api/AbstractRDFTest.java     | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/448c20b1/api/src/test/java/org/apache/commons/rdf/api/AbstractRDFTest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/AbstractRDFTest.java b/api/src/test/java/org/apache/commons/rdf/api/AbstractRDFTest.java
index 0032659..bb4dc5b 100644
--- a/api/src/test/java/org/apache/commons/rdf/api/AbstractRDFTest.java
+++ b/api/src/test/java/org/apache/commons/rdf/api/AbstractRDFTest.java
@@ -209,8 +209,8 @@ public abstract class AbstractRDFTest {
          * COMPARED (aka .equals and .hashCode()) in lowercase as the language
          * space is lower case.
          */
-        final Literal lower = factory.createLiteral("Hello", "en-gb");
         final Literal upper = factory.createLiteral("Hello", "EN-GB");
+        final Literal lower = factory.createLiteral("Hello", "en-gb");
         final Literal mixed = factory.createLiteral("Hello", "en-GB");
 
         /*
@@ -251,14 +251,14 @@ public abstract class AbstractRDFTest {
         // COMMONSRDF-51: Ensure the Literal is using case insensitive
         // comparison against any literal implementation
         // which may not have done .toLowerString() in their constructor
-        final Literal lower = factory.createLiteral("Hello", "en-gb");
         final Literal upper = factory.createLiteral("Hello", "EN-GB");
+        final Literal lower = factory.createLiteral("Hello", "en-gb");
         final Literal mixed = factory.createLiteral("Hello", "en-GB");
 
         Literal otherLiteral = new Literal() {
             @Override
             public String ntriplesString() {
-                return "Hello@en-GB";
+                return "Hello@eN-Gb";
             }
             @Override
             public String getLexicalForm() {
@@ -266,7 +266,7 @@ public abstract class AbstractRDFTest {
             }
             @Override
             public Optional<String> getLanguageTag() {
-                return Optional.of("en-GB");
+                return Optional.of("eN-Gb");
             }
             @Override
             public IRI getDatatype() {
@@ -294,9 +294,9 @@ public abstract class AbstractRDFTest {
         Locale defaultLocale = Locale.getDefault();
         try {
             Locale.setDefault(Locale.ROOT);
+            final Literal mixedROOT = factory.createLiteral("moi", "fI");
             final Literal lowerROOT = factory.createLiteral("moi", "fi");
             final Literal upperROOT = factory.createLiteral("moi", "FI");
-            final Literal mixedROOT = factory.createLiteral("moi", "fI");
 
             Locale turkish = Locale.forLanguageTag("TR");
             Locale.setDefault(turkish);
@@ -305,9 +305,9 @@ public abstract class AbstractRDFTest {
             // we want to test.
             Assume.assumeFalse("FI".toLowerCase().equals("fi"));
 
+            final Literal mixed = factory.createLiteral("moi", "fI");
             final Literal lower = factory.createLiteral("moi", "fi");
             final Literal upper = factory.createLiteral("moi", "FI");
-            final Literal mixed = factory.createLiteral("moi", "fI");
 
             assertEquals(lower, lower);
             assertEqualsBothWays(lower, upper);


Mime
View raw message