rt/emul/compact/src/test/java/org/apidesign/bck2brwsr/tck/CharacterTest.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Tue, 22 Oct 2013 19:33:09 +0200
changeset 1384 12a395b571c8
parent 1382 rt/emul/compact/src/test/java/org/apidesign/bck2brwsr/tck/CompareStringsTest.java@7f4d603c46dd
child 1480 797da74ddde1
permissions -rw-r--r--
Dolar sign can be the first first character in a Java identifier
jaroslav@296
     1
/**
jaroslav@296
     2
 * Back 2 Browser Bytecode Translator
jaroslav@296
     3
 * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
jaroslav@296
     4
 *
jaroslav@296
     5
 * This program is free software: you can redistribute it and/or modify
jaroslav@296
     6
 * it under the terms of the GNU General Public License as published by
jaroslav@296
     7
 * the Free Software Foundation, version 2 of the License.
jaroslav@296
     8
 *
jaroslav@296
     9
 * This program is distributed in the hope that it will be useful,
jaroslav@296
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
jaroslav@296
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
jaroslav@296
    12
 * GNU General Public License for more details.
jaroslav@296
    13
 *
jaroslav@296
    14
 * You should have received a copy of the GNU General Public License
jaroslav@296
    15
 * along with this program. Look for COPYING file in the top folder.
jaroslav@296
    16
 * If not, see http://opensource.org/licenses/GPL-2.0.
jaroslav@296
    17
 */
jaroslav@346
    18
package org.apidesign.bck2brwsr.tck;
jaroslav@296
    19
jaroslav@346
    20
import org.apidesign.bck2brwsr.vmtest.Compare;
jaroslav@346
    21
import org.apidesign.bck2brwsr.vmtest.VMTest;
jaroslav@296
    22
import org.testng.annotations.Factory;
jaroslav@296
    23
jaroslav@296
    24
/**
jaroslav@296
    25
 *
jaroslav@296
    26
 * @author Jaroslav Tulach <jtulach@netbeans.org>
jaroslav@296
    27
 */
jaroslav@1384
    28
public class CharacterTest {
jaroslav@1384
    29
    @Compare public boolean dolarJavaStart() {
jaroslav@1384
    30
        return Character.isJavaIdentifierStart('$');
jaroslav@1384
    31
    }
jaroslav@1384
    32
jaroslav@1384
    33
    @Compare public boolean dolarJavaPart() {
jaroslav@1384
    34
        return Character.isJavaIdentifierPart('$');
jaroslav@1384
    35
    }
jaroslav@1384
    36
jaroslav@1384
    37
    @Compare public boolean numberJavaStart() {
jaroslav@1384
    38
        return Character.isJavaIdentifierStart('3');
jaroslav@1384
    39
    }
jaroslav@1384
    40
jaroslav@1384
    41
    @Compare public boolean numberJavaPart() {
jaroslav@1384
    42
        return Character.isJavaIdentifierPart('3');
jaroslav@430
    43
    }
jaroslav@430
    44
    
jaroslav@1382
    45
    
jaroslav@296
    46
    @Factory
jaroslav@296
    47
    public static Object[] create() {
jaroslav@1384
    48
        return VMTest.create(CharacterTest.class);
jaroslav@296
    49
    }
jaroslav@328
    50
jaroslav@296
    51
}