tests/libjava-mauve/src/gnu/testlet/java/lang/Number/NumberTest.java
branchjk_new_structure
changeset 1541 75c2e24dea9a
parent 1540 92ac284961c1
child 1542 be11db817bcf
equal deleted inserted replaced
1540:92ac284961c1 1541:75c2e24dea9a
     1 /* Copyright (C) 1999 Hewlett-Packard Company
       
     2 
       
     3    This file is part of Mauve.
       
     4 
       
     5    Mauve is free software; you can redistribute it and/or modify
       
     6    it under the terms of the GNU General Public License as published by
       
     7    the Free Software Foundation; either version 2, or (at your option)
       
     8    any later version.
       
     9 
       
    10    Mauve is distributed in the hope that it will be useful,
       
    11    but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    13    GNU General Public License for more details.
       
    14 
       
    15    You should have received a copy of the GNU General Public License
       
    16    along with Mauve; see the file COPYING.  If not, write to
       
    17    the Free Software Foundation, 59 Temple Place - Suite 330,
       
    18    Boston, MA 02111-1307, USA.
       
    19 */
       
    20 
       
    21 // Tags: JDK1.0
       
    22 // Uses: NewNumber
       
    23 
       
    24 package gnu.testlet.java.lang.Number;
       
    25 import gnu.testlet.Testlet;
       
    26 import gnu.testlet.TestHarness;
       
    27 
       
    28 public class NumberTest implements Testlet
       
    29 {
       
    30   protected static TestHarness harness;
       
    31 	public void test_Basics()
       
    32 	{
       
    33 	  NewNumber _newnum = new NewNumber();
       
    34 		NewNumber newnum = new NewNumber(300);
       
    35 		NewNumber newnum1 = new NewNumber(Integer.MAX_VALUE);
       
    36 		if ( newnum.byteValue() != (byte)300)
       
    37 			harness.fail( "Error : test_Basics failed -1 ");
       
    38 		if ( newnum1.shortValue() != (short)Integer.MAX_VALUE)
       
    39 			harness.fail( "Error : test_Basics failed -2 ");
       
    40 	} 
       
    41 	public void testall()
       
    42 	{
       
    43 		test_Basics();
       
    44 	}
       
    45 
       
    46   public void test (TestHarness the_harness)
       
    47   {
       
    48     harness = the_harness;
       
    49     testall ();
       
    50   }
       
    51 
       
    52 }
       
    53