vm/src/test/java/org/apidesign/vm4brwsr/tck/CompareHashTest.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Thu, 06 Dec 2012 16:13:03 +0100
changeset 273 59b9f9f5364f
child 335 b8fd5ab83a20
permissions -rw-r--r--
Infrastructure for comparing runs in Hotspot as well as bck2brwsr VMs. Just use @Compare and CompareVMs.create
jaroslav@273
     1
/**
jaroslav@273
     2
 * Back 2 Browser Bytecode Translator
jaroslav@273
     3
 * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
jaroslav@273
     4
 *
jaroslav@273
     5
 * This program is free software: you can redistribute it and/or modify
jaroslav@273
     6
 * it under the terms of the GNU General Public License as published by
jaroslav@273
     7
 * the Free Software Foundation, version 2 of the License.
jaroslav@273
     8
 *
jaroslav@273
     9
 * This program is distributed in the hope that it will be useful,
jaroslav@273
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
jaroslav@273
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
jaroslav@273
    12
 * GNU General Public License for more details.
jaroslav@273
    13
 *
jaroslav@273
    14
 * You should have received a copy of the GNU General Public License
jaroslav@273
    15
 * along with this program. Look for COPYING file in the top folder.
jaroslav@273
    16
 * If not, see http://opensource.org/licenses/GPL-2.0.
jaroslav@273
    17
 */
jaroslav@273
    18
package org.apidesign.vm4brwsr.tck;
jaroslav@273
    19
jaroslav@273
    20
import org.apidesign.vm4brwsr.Compare;
jaroslav@273
    21
import org.apidesign.vm4brwsr.CompareVMs;
jaroslav@273
    22
import org.testng.annotations.Factory;
jaroslav@273
    23
jaroslav@273
    24
/**
jaroslav@273
    25
 *
jaroslav@273
    26
 * @author Jaroslav Tulach <jtulach@netbeans.org>
jaroslav@273
    27
 */
jaroslav@273
    28
public class CompareHashTest {
jaroslav@273
    29
    @Compare public int hashOfString() {
jaroslav@273
    30
        return "Ahoj".hashCode();
jaroslav@273
    31
    }
jaroslav@273
    32
    
jaroslav@273
    33
    @Factory
jaroslav@273
    34
    public static Object[] create() {
jaroslav@273
    35
        return CompareVMs.create(CompareHashTest.class);
jaroslav@273
    36
    }
jaroslav@273
    37
}