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

PageFormat/SmallPaperPrinting.java needs three sets of @test tags

XMLWordPrintable

    • 2d
    • b12
    • 9

      According to the instructions printed by the test/jdk/java/awt/print/PageFormat/SmallPaperPrinting.java, there should be three sets of @test tags to test the three cases.

      ----------------- Instructions --------------------
      Arguments: (none) - paper width=1, height=.0001
                    1 - paper width=.0001, height=1
                    2 - paper width=-1, height=1
      A passing test should catch a PrinterException
      and should display "Print error: (exception msg)".
      ---------------------------------------------------

      The test catches PrinterException but it doesn't verify the message; for example, when there's no printer, the test passes, which is unexpected.

      In the third case, when 2 is passed, the test doesn't fail for me. Is it expected?

      The issue found during code review for JDK-8320608:
      https://github.com/openjdk/jdk/pull/16785#discussion_r1403283083

            rmahajan Rajat Mahajan
            aivanov Alexey Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: