home | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Groovy example source code file (Groovy965_Bug.groovy)

This example Groovy source code file (Groovy965_Bug.groovy) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Groovy tags/keywords

groovy965_bug, groovy965_bug, groovytestcase, groovytestcase

The Groovy Groovy965_Bug.groovy source code

package groovy.bugs

 *  A test case to ensure that Groovy can compile class names and variable names with non-ASCII
 *  characters and that non-ASCII characters in Strings do the right thing.
 *  <p>Unfortunately, we cannot actually have this test in the Subversion store since it
 *  requires having an encoding.  Java internally uses UTF-16.  Most Linux/UNIX/Mac OS X users
 *  use UTF-8 (or if they haven't caught up yet ISO-8859-{1..15], in Europe anyway).  Windows
 *  internally is UTF-16 LE but it appears that the Europe region defaults to ISO-8859-1 which
 *  is very silly.  All in all we cannot gurantee an ecoding so we cannot have the tests.</p>
 *  <p>If anyone spots any errors in the rationale or finds a way to fix things please update at
 *  will.</p>
 *  @suthor Russel Winder
 *  @version $LastChangedRevision: 4996 $ $LastChangedDate: 2007-02-01 17:21:57 +0100 (Do, 01. Feb 2007) $
class Groovy965_Bug extends GroovyTestCase {
  /* void test to avoid assertion failure because of the lack of test method in the class */
  void testVoid() {}
  void testUnicodeVariableNamesAndStrings ( ) {
    def âøñè = 'âøñè'
    assertEquals ( 'âøñè' , âøñè )
  void testUnicodeMëthødName ( ) { }
  void testUnicodeClassName ( ) {
    def object = new Bläh ( ) 
    assert true

class Bläh { }

Other Groovy examples (source code examples)

Here is a short list of links related to this Groovy Groovy965_Bug.groovy source code file:

my book on functional programming


new blog posts


Copyright 1998-2019 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.