Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b10
    • Verification:
      Verified

      Description

      The javadoc tests use a custom test framework in a fairly formulaic way,

      For historical reasons, and not necessarily good ones, the code is written in a style that in clumsy and not as easy to read as it could be.

      In particular, the tests make excessive use of string constants FS and NL to abstract over platform differences (i.e. Windows vs. not-Windows.) This used to be necessary, because javadoc used to generate both "\n" and platform-newline sequences and this was reflected in the tests. That has been fixed, and javadoc now always generates platform newlines. The net result is that the string constants in these tests cabe be rewritten to use platform neutral characters, like "/" and "\n" and then the framework can convert them to platform specific characters as needed.

      Along the way, it would be nice to reformat the strings in the test code so that in general, "\n" characters are the last character in a string on a physical line -- i.e. the string constants should be line wrapped after "\n" characters, and not just at 80 characters width in the containing file.

        Activity

        Hide
        ntoda Neil Toda added a comment -
        Additional cleanup is required to remove the machine independent PS [ path-separator] and LS [ line-separator] .
        Also to be removed are the declarations of FS, NL, PS and LS.
        Show
        ntoda Neil Toda added a comment - Additional cleanup is required to remove the machine independent PS [ path-separator] and LS [ line-separator] . Also to be removed are the declarations of FS, NL, PS and LS.
        Hide
        ntoda Neil Toda added a comment -
        This work is the culmination of work started a year ago. The only place in javadoc tests where NL still exists is in JavadocTester.
        Tests all pass for linux, but the tests must now be done for windows to make sure that JavadocTester is still functioning correctly.
        It is expected that it is not WRT exactNewlineMatch.
        Show
        ntoda Neil Toda added a comment - This work is the culmination of work started a year ago. The only place in javadoc tests where NL still exists is in JavadocTester. Tests all pass for linux, but the tests must now be done for windows to make sure that JavadocTester is still functioning correctly. It is expected that it is not WRT exactNewlineMatch.
        Hide
        ntoda Neil Toda added a comment -
        Tasks:
        1) remove FS and NL
        2) remove PS and LS
        3) remove all declarations for FS, NL, PS, LS where possible
            Any tests that extend JavadocTester have been cleared of these.
        4) remove from JavadocTester ( and other occurances ) "exactNewlineMatch".
            There are 6 tests that don't extend JavadocTester and have their own private findString() members.
              For these NL is still required.

        All 140 ./langtools/test/com/sun/javadoc test pass on both linux and windows.
        Show
        ntoda Neil Toda added a comment - Tasks: 1) remove FS and NL 2) remove PS and LS 3) remove all declarations for FS, NL, PS, LS where possible     Any tests that extend JavadocTester have been cleared of these. 4) remove from JavadocTester ( and other occurances ) "exactNewlineMatch".     There are 6 tests that don't extend JavadocTester and have their own private findString() members.       For these NL is still required. All 140 ./langtools/test/com/sun/javadoc test pass on both linux and windows.
        Hide
        ntoda Neil Toda added a comment -
        Misc:
        1) cleanup some indentation
        2) break excessively long lines associated with BUG_ID string.
        Show
        ntoda Neil Toda added a comment - Misc: 1) cleanup some indentation 2) break excessively long lines associated with BUG_ID string.
        Hide
        hgupdate HG Updates added a comment -
        URL: http://hg.openjdk.java.net/jdk9/dev/langtools/rev/6207608205b8
        User: jjg
        Date: 2014-04-16 23:17:29 +0000
        Show
        hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/dev/langtools/rev/6207608205b8 User: jjg Date: 2014-04-16 23:17:29 +0000
        Hide
        hgupdate HG Updates added a comment -
        URL: http://hg.openjdk.java.net/jdk9/jdk9/langtools/rev/6207608205b8
        User: lana
        Date: 2014-04-23 16:11:22 +0000
        Show
        hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/langtools/rev/6207608205b8 User: lana Date: 2014-04-23 16:11:22 +0000
        Hide
        jjg Jonathan Gibbons added a comment - - edited
        wrong label, should be noreg-self; noreg-sqe is for tests in SQE test suites (which we no longer use for langtools)
        Show
        jjg Jonathan Gibbons added a comment - - edited wrong label, should be noreg-self; noreg-sqe is for tests in SQE test suites (which we no longer use for langtools)

          People

          • Assignee:
            ntoda Neil Toda
            Reporter:
            jjg Jonathan Gibbons
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: