[03/50] [abbrv] groovy git commit: formatting and general tidy up of some tests
formatting and general tidy up of some tests Project: http://git-wip-us.apache.org/repos/asf/groovy/repo Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/94137c91 Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/94137c91 Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/94137c91 Branch: refs/heads/parrot Commit: 94137c91379b8152afe7e76e59c6537dc5a12ef3 Parents: 55c186f Author: paulk Authored: Tue Oct 4 10:59:04 2016 +1000 Committer: paulk Committed: Tue Oct 4 10:59:32 2016 +1000 -- gradle/pomconfigurer.gradle | 3 +++ src/tck/test/gls/ch03/s01/Unicode1.groovy | 11 +++- src/tck/test/gls/ch03/s01/Unicode2.groovy | 18 + .../gls/ch03/s02/LexicalTranslation1.groovy | 4 +-- src/tck/test/gls/ch03/s02/Longest1.groovy | 2 -- .../test/gls/ch03/s03/UnicodeEscapes1.groovy| 5 +--- .../test/gls/ch03/s03/UnicodeEscapes2.groovy| 27 ++-- 7 files changed, 30 insertions(+), 40 deletions(-) -- http://git-wip-us.apache.org/repos/asf/groovy/blob/94137c91/gradle/pomconfigurer.gradle -- diff --git a/gradle/pomconfigurer.gradle b/gradle/pomconfigurer.gradle index 3f08f4a..2877e8a 100644 --- a/gradle/pomconfigurer.gradle +++ b/gradle/pomconfigurer.gradle @@ -576,6 +576,9 @@ project.ext.pomConfigureClosureWithoutTweaks = { contributor { name 'Santhosh Kumar T' } +contributor { +name 'Alan Green' +} } mailingLists { mailingList { http://git-wip-us.apache.org/repos/asf/groovy/blob/94137c91/src/tck/test/gls/ch03/s01/Unicode1.groovy -- diff --git a/src/tck/test/gls/ch03/s01/Unicode1.groovy b/src/tck/test/gls/ch03/s01/Unicode1.groovy index 45ab780..92984ab 100644 --- a/src/tck/test/gls/ch03/s01/Unicode1.groovy +++ b/src/tck/test/gls/ch03/s01/Unicode1.groovy @@ -17,17 +17,14 @@ * under the License. */ package gls.ch03.s01; + /** * Except for comments, identifiers and the contents of ... string * literals, all input elements are formed from ASCII characters. * * TODO: Find a better way to test these things * Note that this is a little hard to test since the input file is ASCII. - * - * @author Alan Green - * @author Jeremy Rayner */ - class Unicode1 extends GroovyTestCase { //TODO: find some way to assert that Unicode3.0 + is available @@ -35,7 +32,7 @@ class Unicode1 extends GroovyTestCase { * This doc comment checks that Unicode is allowed in javadoc. * e.g. \u05D0\u2136\u05d3\u05d7 */ -public void testComments() { +void testComments() { // Unicode is allowed in comments // This is a comment \u0410\u0406\u0414\u0419 /* Another comment \u05D0\u2136\u05d3\u05d7 */ @@ -44,12 +41,12 @@ class Unicode1 extends GroovyTestCase { /***/ // Also valid } -public void testStringLiterals() { +void testStringLiterals() { assert 1 == "\u0040".length() assert "A" == "\u0041" } -public void testCharNotAvailableAsLiteral() { +void testCharNotAvailableAsLiteral() { char a = 'x' char b = "x" def c = "x".charAt(0) http://git-wip-us.apache.org/repos/asf/groovy/blob/94137c91/src/tck/test/gls/ch03/s01/Unicode2.groovy -- diff --git a/src/tck/test/gls/ch03/s01/Unicode2.groovy b/src/tck/test/gls/ch03/s01/Unicode2.groovy index be60ff6..35fbf72 100644 --- a/src/tck/test/gls/ch03/s01/Unicode2.groovy +++ b/src/tck/test/gls/ch03/s01/Unicode2.groovy @@ -17,24 +17,20 @@ * under the License. */ package gls.ch03.s01; + /** * Except for comments, identifiers and the contents of ... string * literals, all input elements are formed from ASCII characters. - * - * TODO: Find a better way to test these things - * Note that this is a little hard to test since the input file is ASCII. - * - * @author Jeremy Rayner */ - class Unicode2 extends GroovyTestCase { -//todo - this doesn't seem to work in raw Java5.0 either -//public void testUTF16SupplementaryCharacters() { -//assert 1 == "\uD840\uDC00".length() -//} +void testUTF16SupplementaryCharacters() { +def s = "\uD840\uDC00" +assert 2 == s.length() // number of Unicode code units +assert 1 == s.codePointCount(0, s.length()) // number of Unicode code points +} -public void testIdentifiers() { +void testIdentifiers() { def foo\u0044 = 12 assert 20 == foo\u0044 + 8 } http://git-wip-us.apache.org/repos/asf/groovy/blob/94137c91/src/tck/test/gls/ch03/s02/LexicalTranslation1.groovy ---
groovy git commit: formatting and general tidy up of some tests
Repository: groovy Updated Branches: refs/heads/GROOVY_2_4_X 13d1abe80 -> 331a2c524 formatting and general tidy up of some tests Project: http://git-wip-us.apache.org/repos/asf/groovy/repo Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/331a2c52 Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/331a2c52 Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/331a2c52 Branch: refs/heads/GROOVY_2_4_X Commit: 331a2c52479b44ffd931e0f4d623bf1327324f14 Parents: 13d1abe Author: paulk Authored: Tue Oct 4 10:59:04 2016 +1000 Committer: paulk Committed: Tue Oct 4 11:01:55 2016 +1000 -- gradle/pomconfigurer.gradle | 12 + src/tck/test/gls/ch03/s01/Unicode1.groovy | 11 +++- src/tck/test/gls/ch03/s01/Unicode2.groovy | 18 + .../gls/ch03/s02/LexicalTranslation1.groovy | 4 +-- src/tck/test/gls/ch03/s02/Longest1.groovy | 2 -- .../test/gls/ch03/s03/UnicodeEscapes1.groovy| 5 +--- .../test/gls/ch03/s03/UnicodeEscapes2.groovy| 27 ++-- 7 files changed, 39 insertions(+), 40 deletions(-) -- http://git-wip-us.apache.org/repos/asf/groovy/blob/331a2c52/gradle/pomconfigurer.gradle -- diff --git a/gradle/pomconfigurer.gradle b/gradle/pomconfigurer.gradle index c105f15..2877e8a 100644 --- a/gradle/pomconfigurer.gradle +++ b/gradle/pomconfigurer.gradle @@ -567,6 +567,18 @@ project.ext.pomConfigureClosureWithoutTweaks = { contributor { name 'Marcin Grzejszczak' } +contributor { +name 'Pap LÅrinc' +} +contributor { +name 'Guillaume Balaine' +} +contributor { +name 'Santhosh Kumar T' +} +contributor { +name 'Alan Green' +} } mailingLists { mailingList { http://git-wip-us.apache.org/repos/asf/groovy/blob/331a2c52/src/tck/test/gls/ch03/s01/Unicode1.groovy -- diff --git a/src/tck/test/gls/ch03/s01/Unicode1.groovy b/src/tck/test/gls/ch03/s01/Unicode1.groovy index 45ab780..92984ab 100644 --- a/src/tck/test/gls/ch03/s01/Unicode1.groovy +++ b/src/tck/test/gls/ch03/s01/Unicode1.groovy @@ -17,17 +17,14 @@ * under the License. */ package gls.ch03.s01; + /** * Except for comments, identifiers and the contents of ... string * literals, all input elements are formed from ASCII characters. * * TODO: Find a better way to test these things * Note that this is a little hard to test since the input file is ASCII. - * - * @author Alan Green - * @author Jeremy Rayner */ - class Unicode1 extends GroovyTestCase { //TODO: find some way to assert that Unicode3.0 + is available @@ -35,7 +32,7 @@ class Unicode1 extends GroovyTestCase { * This doc comment checks that Unicode is allowed in javadoc. * e.g. \u05D0\u2136\u05d3\u05d7 */ -public void testComments() { +void testComments() { // Unicode is allowed in comments // This is a comment \u0410\u0406\u0414\u0419 /* Another comment \u05D0\u2136\u05d3\u05d7 */ @@ -44,12 +41,12 @@ class Unicode1 extends GroovyTestCase { /***/ // Also valid } -public void testStringLiterals() { +void testStringLiterals() { assert 1 == "\u0040".length() assert "A" == "\u0041" } -public void testCharNotAvailableAsLiteral() { +void testCharNotAvailableAsLiteral() { char a = 'x' char b = "x" def c = "x".charAt(0) http://git-wip-us.apache.org/repos/asf/groovy/blob/331a2c52/src/tck/test/gls/ch03/s01/Unicode2.groovy -- diff --git a/src/tck/test/gls/ch03/s01/Unicode2.groovy b/src/tck/test/gls/ch03/s01/Unicode2.groovy index be60ff6..35fbf72 100644 --- a/src/tck/test/gls/ch03/s01/Unicode2.groovy +++ b/src/tck/test/gls/ch03/s01/Unicode2.groovy @@ -17,24 +17,20 @@ * under the License. */ package gls.ch03.s01; + /** * Except for comments, identifiers and the contents of ... string * literals, all input elements are formed from ASCII characters. - * - * TODO: Find a better way to test these things - * Note that this is a little hard to test since the input file is ASCII. - * - * @author Jeremy Rayner */ - class Unicode2 extends GroovyTestCase { -//todo - this doesn't seem to work in raw Java5.0 either -//public void testUTF16SupplementaryCharacters() { -//assert 1 == "\uD840\uDC00".length() -//} +void testUTF16SupplementaryCharacters() { +def s = "\uD840\uDC00" +assert 2 == s.length() // number of Unicode code units +assert 1 =
groovy git commit: formatting and general tidy up of some tests
Repository: groovy Updated Branches: refs/heads/master 55c186f42 -> 94137c913 formatting and general tidy up of some tests Project: http://git-wip-us.apache.org/repos/asf/groovy/repo Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/94137c91 Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/94137c91 Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/94137c91 Branch: refs/heads/master Commit: 94137c91379b8152afe7e76e59c6537dc5a12ef3 Parents: 55c186f Author: paulk Authored: Tue Oct 4 10:59:04 2016 +1000 Committer: paulk Committed: Tue Oct 4 10:59:32 2016 +1000 -- gradle/pomconfigurer.gradle | 3 +++ src/tck/test/gls/ch03/s01/Unicode1.groovy | 11 +++- src/tck/test/gls/ch03/s01/Unicode2.groovy | 18 + .../gls/ch03/s02/LexicalTranslation1.groovy | 4 +-- src/tck/test/gls/ch03/s02/Longest1.groovy | 2 -- .../test/gls/ch03/s03/UnicodeEscapes1.groovy| 5 +--- .../test/gls/ch03/s03/UnicodeEscapes2.groovy| 27 ++-- 7 files changed, 30 insertions(+), 40 deletions(-) -- http://git-wip-us.apache.org/repos/asf/groovy/blob/94137c91/gradle/pomconfigurer.gradle -- diff --git a/gradle/pomconfigurer.gradle b/gradle/pomconfigurer.gradle index 3f08f4a..2877e8a 100644 --- a/gradle/pomconfigurer.gradle +++ b/gradle/pomconfigurer.gradle @@ -576,6 +576,9 @@ project.ext.pomConfigureClosureWithoutTweaks = { contributor { name 'Santhosh Kumar T' } +contributor { +name 'Alan Green' +} } mailingLists { mailingList { http://git-wip-us.apache.org/repos/asf/groovy/blob/94137c91/src/tck/test/gls/ch03/s01/Unicode1.groovy -- diff --git a/src/tck/test/gls/ch03/s01/Unicode1.groovy b/src/tck/test/gls/ch03/s01/Unicode1.groovy index 45ab780..92984ab 100644 --- a/src/tck/test/gls/ch03/s01/Unicode1.groovy +++ b/src/tck/test/gls/ch03/s01/Unicode1.groovy @@ -17,17 +17,14 @@ * under the License. */ package gls.ch03.s01; + /** * Except for comments, identifiers and the contents of ... string * literals, all input elements are formed from ASCII characters. * * TODO: Find a better way to test these things * Note that this is a little hard to test since the input file is ASCII. - * - * @author Alan Green - * @author Jeremy Rayner */ - class Unicode1 extends GroovyTestCase { //TODO: find some way to assert that Unicode3.0 + is available @@ -35,7 +32,7 @@ class Unicode1 extends GroovyTestCase { * This doc comment checks that Unicode is allowed in javadoc. * e.g. \u05D0\u2136\u05d3\u05d7 */ -public void testComments() { +void testComments() { // Unicode is allowed in comments // This is a comment \u0410\u0406\u0414\u0419 /* Another comment \u05D0\u2136\u05d3\u05d7 */ @@ -44,12 +41,12 @@ class Unicode1 extends GroovyTestCase { /***/ // Also valid } -public void testStringLiterals() { +void testStringLiterals() { assert 1 == "\u0040".length() assert "A" == "\u0041" } -public void testCharNotAvailableAsLiteral() { +void testCharNotAvailableAsLiteral() { char a = 'x' char b = "x" def c = "x".charAt(0) http://git-wip-us.apache.org/repos/asf/groovy/blob/94137c91/src/tck/test/gls/ch03/s01/Unicode2.groovy -- diff --git a/src/tck/test/gls/ch03/s01/Unicode2.groovy b/src/tck/test/gls/ch03/s01/Unicode2.groovy index be60ff6..35fbf72 100644 --- a/src/tck/test/gls/ch03/s01/Unicode2.groovy +++ b/src/tck/test/gls/ch03/s01/Unicode2.groovy @@ -17,24 +17,20 @@ * under the License. */ package gls.ch03.s01; + /** * Except for comments, identifiers and the contents of ... string * literals, all input elements are formed from ASCII characters. - * - * TODO: Find a better way to test these things - * Note that this is a little hard to test since the input file is ASCII. - * - * @author Jeremy Rayner */ - class Unicode2 extends GroovyTestCase { -//todo - this doesn't seem to work in raw Java5.0 either -//public void testUTF16SupplementaryCharacters() { -//assert 1 == "\uD840\uDC00".length() -//} +void testUTF16SupplementaryCharacters() { +def s = "\uD840\uDC00" +assert 2 == s.length() // number of Unicode code units +assert 1 == s.codePointCount(0, s.length()) // number of Unicode code points +} -public void testIdentifiers() { +void testIdentifiers() { def foo\u0044 = 12 assert 20 == foo\u0044 + 8 } http://git-wip-us.apache.org/repos/asf/groovy/blob