groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject groovy git commit: add doco about optional exception declaration within methods (oops, forgot an import)
Date Tue, 19 Jul 2016 11:47:21 GMT
Repository: groovy
Updated Branches:
  refs/heads/master d9f7f6ee5 -> 9f94ce36a


add doco about optional exception declaration within methods (oops, forgot an import)


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/9f94ce36
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/9f94ce36
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/9f94ce36

Branch: refs/heads/master
Commit: 9f94ce36ad69901c53c9c013e8b82f3982374bd3
Parents: d9f7f6e
Author: paulk <paulk@asert.com.au>
Authored: Tue Jul 19 21:47:10 2016 +1000
Committer: paulk <paulk@asert.com.au>
Committed: Tue Jul 19 21:47:10 2016 +1000

----------------------------------------------------------------------
 src/spec/test/objectorientation/MethodsTest.groovy | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/9f94ce36/src/spec/test/objectorientation/MethodsTest.groovy
----------------------------------------------------------------------
diff --git a/src/spec/test/objectorientation/MethodsTest.groovy b/src/spec/test/objectorientation/MethodsTest.groovy
index 1dacf57..df0fda7 100644
--- a/src/spec/test/objectorientation/MethodsTest.groovy
+++ b/src/spec/test/objectorientation/MethodsTest.groovy
@@ -104,6 +104,7 @@ class MethodsTest extends GroovyTestCase {
 
     void testIdiomaticMethodDeclaration() {
         assertScript '''
+            import static groovy.test.GroovyAssert.shouldFail
             // tag::idiomatic_method_declaration[]
             def badRead() {
                 new File('doesNotExist.txt').text
@@ -118,6 +119,7 @@ class MethodsTest extends GroovyTestCase {
 
     void testMethodDeclarationWithCheckedException() {
         assertScript '''
+            import static groovy.test.GroovyAssert.shouldFail
             // tag::checked_method_declaration[]
             def badRead() throws FileNotFoundException {
                 new File('doesNotExist.txt').text


Mime
View raw message