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

MissingMethodException during ASTTest annotation assert execution

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment