emul/compact/src/test/java/org/apidesign/bck2brwsr/compact/tck/JFXIssuesTest.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Thu, 14 Feb 2013 13:17:19 +0100
changeset 733 25eba32a96cd
child 752 cc3871bdd83c
permissions -rw-r--r--
Fixing problems with Class.isAssignableFrom reported by David
jaroslav@733
     1
/**
jaroslav@733
     2
 * Back 2 Browser Bytecode Translator
jaroslav@733
     3
 * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
jaroslav@733
     4
 *
jaroslav@733
     5
 * This program is free software: you can redistribute it and/or modify
jaroslav@733
     6
 * it under the terms of the GNU General Public License as published by
jaroslav@733
     7
 * the Free Software Foundation, version 2 of the License.
jaroslav@733
     8
 *
jaroslav@733
     9
 * This program is distributed in the hope that it will be useful,
jaroslav@733
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
jaroslav@733
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
jaroslav@733
    12
 * GNU General Public License for more details.
jaroslav@733
    13
 *
jaroslav@733
    14
 * You should have received a copy of the GNU General Public License
jaroslav@733
    15
 * along with this program. Look for COPYING file in the top folder.
jaroslav@733
    16
 * If not, see http://opensource.org/licenses/GPL-2.0.
jaroslav@733
    17
 */
jaroslav@733
    18
package org.apidesign.bck2brwsr.compact.tck;
jaroslav@733
    19
jaroslav@733
    20
import org.apidesign.bck2brwsr.vmtest.Compare;
jaroslav@733
    21
import org.apidesign.bck2brwsr.vmtest.VMTest;
jaroslav@733
    22
import org.testng.annotations.Factory;
jaroslav@733
    23
jaroslav@733
    24
jaroslav@733
    25
public class JFXIssuesTest {
jaroslav@733
    26
    private abstract class Application {
jaroslav@733
    27
        public abstract int getID();
jaroslav@733
    28
    }
jaroslav@733
    29
    
jaroslav@733
    30
    private class MyApplication extends Application {
jaroslav@733
    31
jaroslav@733
    32
        @Override
jaroslav@733
    33
        public int getID() {
jaroslav@733
    34
            return 1;
jaroslav@733
    35
        }
jaroslav@733
    36
        
jaroslav@733
    37
    } 
jaroslav@733
    38
    
jaroslav@733
    39
    @Compare public boolean isClassAssignable() {
jaroslav@733
    40
        return Application.class.isAssignableFrom(MyApplication.class);
jaroslav@733
    41
    }
jaroslav@733
    42
    
jaroslav@733
    43
    @Factory public static Object[] create() {
jaroslav@733
    44
        return VMTest.create(JFXIssuesTest.class);
jaroslav@733
    45
    }
jaroslav@733
    46
}