Long_less01.java revision 12651:6ef01bd40ce2
11553Srgrimes/*
21553Srgrimes * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
31553Srgrimes * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
41553Srgrimes *
51553Srgrimes * This code is free software; you can redistribute it and/or modify it
61553Srgrimes * under the terms of the GNU General Public License version 2 only, as
71553Srgrimes * published by the Free Software Foundation.
81553Srgrimes *
91553Srgrimes * This code is distributed in the hope that it will be useful, but WITHOUT
101553Srgrimes * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
111553Srgrimes * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
121553Srgrimes * version 2 for more details (a copy is included in the LICENSE file that
131553Srgrimes * accompanied this code).
141553Srgrimes *
151553Srgrimes * You should have received a copy of the GNU General Public License version
161553Srgrimes * 2 along with this work; if not, write to the Free Software Foundation,
171553Srgrimes * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
181553Srgrimes *
191553Srgrimes * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
201553Srgrimes * or visit www.oracle.com if you need additional information or have any
211553Srgrimes * questions.
221553Srgrimes */
231553Srgrimes/*
241553Srgrimes */
251553Srgrimespackage org.graalvm.compiler.jtt.lang;
261553Srgrimes
271553Srgrimesimport org.junit.Test;
281553Srgrimes
291553Srgrimesimport org.graalvm.compiler.jtt.JTTTest;
301553Srgrimes
311553Srgrimespublic final class Long_less01 extends JTTTest {
321553Srgrimes
331553Srgrimes    public static boolean test(long i) {
341553Srgrimes        if (i < 0L) {
351553Srgrimes            return true;
361553Srgrimes        }
371553Srgrimes        return false;
381553Srgrimes    }
391553Srgrimes
401553Srgrimes    @Test
411553Srgrimes    public void run0() throws Throwable {
421553Srgrimes        runTest("test", -9223372036854775808L);
431553Srgrimes    }
441553Srgrimes
451553Srgrimes    @Test
461553Srgrimes    public void run1() throws Throwable {
471553Srgrimes        runTest("test", -2L);
481553Srgrimes    }
491553Srgrimes
501553Srgrimes    @Test
511553Srgrimes    public void run2() throws Throwable {
521553Srgrimes        runTest("test", -1L);
531553Srgrimes    }
541553Srgrimes
551553Srgrimes    @Test
561553Srgrimes    public void run3() throws Throwable {
571553Srgrimes        runTest("test", 0L);
581553Srgrimes    }
591553Srgrimes
601553Srgrimes    @Test
611553Srgrimes    public void run4() throws Throwable {
621553Srgrimes        runTest("test", 1L);
631553Srgrimes    }
641553Srgrimes
651553Srgrimes    @Test
661553Srgrimes    public void run5() throws Throwable {
671553Srgrimes        runTest("test", 2L);
681553Srgrimes    }
691553Srgrimes
701553Srgrimes    @Test
711553Srgrimes    public void run6() throws Throwable {
721553Srgrimes        runTest("test", 9223372036854775807L);
731553Srgrimes    }
741553Srgrimes
751553Srgrimes}
761553Srgrimes