1/* GENERATED SOURCE. DO NOT MODIFY. */
2// © 2016 and later: Unicode, Inc. and others.
3// License & terms of use: http://www.unicode.org/copyright.html#License
4
5package android.icu.text;
6
7import org.junit.Before;
8import org.junit.Test;
9
10import android.icu.dev.test.TestFmwk;
11
12
13public class DigitListTest extends TestFmwk {
14
15    private static DigitList digitList = new DigitList();
16    private static long testdata = 1414213562;
17
18    @Before
19    public void init() {
20        digitList.set(testdata);
21    }
22
23    @Test
24    public void TestToString() {
25        String digitListStr = digitList.toString();
26        assertEquals("DigitList incorrect", "0.1414213562x10^10", digitListStr);
27    }
28    @Test
29    public void TestHashCode() {
30        int dlHashcode = digitList.hashCode();
31        assertEquals("DigitList hash code incorrect", -616183837, dlHashcode);
32    }
33
34    @Test
35    public void TestEquals() {
36        DigitList digitList2 = new DigitList();
37
38	// Test for success
39        digitList2.set(testdata);
40        assertTrue("DigitList objects with same values found unequal", digitList.equals(digitList2));
41	// Test for failure
42	digitList2.set(testdata+1);
43	assertFalse("DigitList objects with different values found equal", digitList.equals(digitList2));
44    }
45}
46