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

Test Plan for JEP 326 Raw String Literals

    Details

    • Type: JEP Task
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Fix Version/s: None
    • Component/s: tools
    • Labels:
      None

      Description

      Testing scopes

      Raw String Literals feature leads to changes in two major areas: Javac and library support in the String class. Testing scopes are described in the following sections. Testing is done by functional tests using Jtreg test harness. Generally String test suites should be extended to duplicate existing tests replacing traditional string literals with raw string literals.

      Compiler

      Parser testing

      • Special characters parsing that includes Unicode and escape sequences.
      • Handling java comments /**... */ and // ... inside raw string literals and raw string literals inside comments.
      • Multiline comments. CR and LF symbols handling.
      • Real examples with embedded markdown, javascript, regular expressions, java code strings.
      • Various combination of backtikcs for raw string literals.
      • Usage of raw string literals in different scopes like lambda, method, class, comments, javadoc comment.
      • Backticks in keywords and identifiers, standard string literals.

      Diagnostic testing

      Diagnostic testing is more about negative testing. Javac should properly diagnose errors with raw string literals instead of a crash or an exception. Here we should cover:

      • Unbalanced backtick
      • EOF after backticks
      • Empty raw string literals.

      Library

      • Testing margin management methods (align, indent)

      • Testing strip methods (strip, stripLeading, stripTrailing)

      • Line splitting (lines)

        • Testing detab/entab

        • Testing transform (may be renamed to map)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                anazarov Andrey Nazarov
                Reporter:
                anazarov Andrey Nazarov
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: