01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package org.apache.harmony.sql.tests.java.sql;
19:
20: import junit.framework.TestCase;
21: import static java.sql.Types.*;
22:
23: public class TypesTest extends TestCase {
24:
25: /*
26: * Public statics test
27: */
28: public void testPublicStatics() {
29: assertEquals(ARRAY, 2003);
30: assertEquals(BIGINT, -5);
31: assertEquals(BINARY, -2);
32: assertEquals(BIT, -7);
33: assertEquals(BLOB, 2004);
34: assertEquals(BOOLEAN, 16);
35: assertEquals(CHAR, 1);
36: assertEquals(CLOB, 2005);
37: assertEquals(DATALINK, 70);
38: assertEquals(DATE, 91);
39: assertEquals(DECIMAL, 3);
40: assertEquals(DISTINCT, 2001);
41: assertEquals(DOUBLE, 8);
42: assertEquals(FLOAT, 6);
43: assertEquals(INTEGER, 4);
44: assertEquals(JAVA_OBJECT, 2000);
45: assertEquals(LONGVARBINARY, -4);
46: assertEquals(LONGVARCHAR, -1);
47: assertEquals(NULL, 0);
48: assertEquals(NUMERIC, 2);
49: assertEquals(OTHER, 1111);
50: assertEquals(REAL, 7);
51: assertEquals(REF, 2006);
52: assertEquals(SMALLINT, 5);
53: assertEquals(STRUCT, 2002);
54: assertEquals(TIME, 92);
55: assertEquals(TIMESTAMP, 93);
56: assertEquals(TINYINT, -6);
57: assertEquals(VARBINARY, -3);
58: assertEquals(VARCHAR, 12);
59: }
60: }
|