Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-9010

MissingMethodException during ASTTest annotation assert execution

    XMLWordPrintableJSON

Details

    Description

      When i try to run following groovy script:

      groovy test_fail.groovy
       

      i get following syntax error:

      Caught: groovy.lang.MissingMethodException: No signature of method: Script1.ssert() is applicable for argument types: (Boolean) values: [true]
      Possible solutions: every(), grep(), split(groovy.lang.Closure), sleep(long), every(groovy.lang.Closure), use([Ljava.lang.Object;)
      groovy.lang.MissingMethodException: No signature of method: Script1.ssert() is applicable for argument types: (Boolean) values: [true]
      Possible solutions: every(), grep(), split(groovy.lang.Closure), sleep(long), every(groovy.lang.Closure), use([Ljava.lang.Object;)
              at Script1.run(Script1.groovy:1)
              at Main.main(test_fail.groovy:6)
      

      adding an empty space between "{" and "assert" keyword helps (see test_success.groovy)

      Looks like groovy "assert" token is fetched wrongly and "ssert" part is read only

      Attachments

        1. test_fail.groovy
          0.2 kB
          hwasin
        2. test_success.groovy
          0.2 kB
          hwasin

        Activity

          People

            paulk Paul King
            hwasin hwasin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: