~ubuntu-branches/ubuntu/lucid/groovy/lucid

« back to all changes in this revision

Viewing changes to src/test/groovy/NamedParameterTest.groovy

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath, Torsten Werner, Varun Hiremath
  • Date: 2009-04-01 19:24:19 UTC
  • mfrom: (3.2.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090401192419-c5mpylqhcdkv3zuv
Tags: 1.6.0-1
[ Torsten Werner ]
* New upstream release (Closes: #521648)
* Remove Build-Depends: libclassworlds-java.
* Switch to source and target version 1.5.

[ Varun Hiremath ]
* Fix build.xml file
* Add ivy to Build-Depends
* Remove unnecessary Depends -- collections3, mx4j and xpp3 
* Add build.diff patch to fix a build error
* Use quilt to manage patches
* Update manpage (Closes: #507862)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
package groovy
2
 
 
3
 
class NamedParameterTest extends GroovyTestCase {
4
 
 
5
 
    void testPassingNamedParametersToMethod() {
6
 
        someMethod(name:"gromit", eating:"nice cheese", times:2)
7
 
    }
8
 
    
9
 
    protected void someMethod(args) {
10
 
        assert args.name == "gromit"
11
 
        assert args.eating == "nice cheese"
12
 
        assert args.times == 2
13
 
        assert args.size() == 3
14
 
    }
15
 
}
 
1
package groovy
 
2
 
 
3
class NamedParameterTest extends GroovyTestCase {
 
4
 
 
5
    void testPassingNamedParametersToMethod() {
 
6
        someMethod(name:"gromit", eating:"nice cheese", times:2)
 
7
    }
 
8
    
 
9
    protected void someMethod(args) {
 
10
        assert args.name == "gromit"
 
11
        assert args.eating == "nice cheese"
 
12
        assert args.times == 2
 
13
        assert args.size() == 3
 
14
    }
 
15
}