Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8159879

Some typo and minor test bugs in ava/lang/module/ModuleReferenceTest.java and ConfigurationTest.java

XMLWordPrintable

      Some minor test bugs and typo in ava/lang/module/ModuleReferenceTest.java and ConfigurationTest.java

      diff -r 7ff61c55b5c6 test/java/lang/module/ConfigurationTest.java
      --- a/test/java/lang/module/ConfigurationTest.java Sat Jun 18 16:50:19 2016 -0700
      +++ b/test/java/lang/module/ConfigurationTest.java Mon Jun 20 02:18:29 2016 -0700
      @@ -157,7 +157,7 @@
            *
            * The test consists of three configurations:
            * - Configuration cf1: m1, m2 requires public m1
      - * - Configuration cf2: m3 requires m1
      + * - Configuration cf2: m3 requires m2
            */
           public void testRequiresPublic2() {
       
      @@ -219,7 +219,7 @@
            *
            * The test consists of three configurations:
            * - Configuration cf1: m1
      - * - Configuration cf2: m2 requires public m3, m3 requires m2
      + * - Configuration cf2: m2 requires public m1, m3 requires m2
            */
           public void testRequiresPublic3() {
       
      @@ -283,7 +283,7 @@
            * The test consists of three configurations:
            * - Configuration cf1: m1
            * - Configuration cf2: m2 requires public m1
      - * - Configuraiton cf3: m3 requires m3
      + * - Configuraiton cf3: m3 requires m2
            */
           public void testRequiresPublic4() {
       
      @@ -657,8 +657,7 @@
            * Basic test of binding services with configurations.
            *
            * Configuration cf1: p@1.0 provides p.S
      - * Test configuration cf2: m1 uses p.S
      - * Test configuration cf2: m1 uses p.S, p@2.0 uses p.S
      + * Test configuration cf2: m1 uses p.S, p@2.0 provides p.S
            */
           public void testServiceBindingWithConfigurations3() {
       
      @@ -896,7 +895,7 @@
       
               Configuration cf2 = resolveRequires(cf1, finder, "m1");
               assertTrue(cf2.modules().size() == 1);
      - assertTrue(cf1.findModule("m1").isPresent());
      + assertTrue(cf2.findModule("m1").isPresent());
           }
       
       
      @@ -1305,7 +1304,7 @@
       
       
           /**
      - * Test "provides p.S" where p is not local
      + * Test "provides p.S with q.T" where q.T is not local
            */
           @Test(expectedExceptions = { ResolutionException.class })
           public void testProviderPackageNotLocal() {
      diff -r 7ff61c55b5c6 test/java/lang/module/ModuleReferenceTest.java
      --- a/test/java/lang/module/ModuleReferenceTest.java Sat Jun 18 16:50:19 2016 -0700
      +++ b/test/java/lang/module/ModuleReferenceTest.java Mon Jun 20 02:18:29 2016 -0700
      @@ -1,5 +1,5 @@
       /*
      - * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
      + * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
        * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
        *
        * This code is free software; you can redistribute it and/or modify it
      @@ -110,7 +110,7 @@
               ModuleReference mref3 = new ModuleReference(descriptor1, null, supplier);
       
               assertTrue(mref1.equals(mref1));
      - assertTrue(mref1.equals(mref1));
      + assertTrue(mref1.equals(mref2));
               assertTrue(mref2.equals(mref1));
               assertTrue(mref1.hashCode() == mref2.hashCode());

            mli Hamlin Li
            mli Hamlin Li
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: