author | vromero |
Wed, 16 Dec 2015 14:23:08 -0800 | |
changeset 34756 | d31f11c4cc75 |
parent 30730 | d3ce7619db2c |
child 39363 | ebaee646b121 |
permissions | -rw-r--r-- |
7640
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
1 |
/* |
30730
d3ce7619db2c
8076543: Add @modules as needed to the langtools tests
akulyakh
parents:
7640
diff
changeset
|
2 |
* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. |
7640
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
4 |
* |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
8 |
* |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
13 |
* accompanied this code). |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
14 |
* |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
18 |
* |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
21 |
* questions. |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
22 |
*/ |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
23 |
|
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
24 |
/* |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
25 |
* @test |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
26 |
* @bug 7006109 |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
27 |
* @summary Add test library to simplify the task of writing automated type-system tests |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
28 |
* @author mcimadamore |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
29 |
* @library . |
30730
d3ce7619db2c
8076543: Add @modules as needed to the langtools tests
akulyakh
parents:
7640
diff
changeset
|
30 |
* @modules jdk.compiler/com.sun.tools.javac.code |
d3ce7619db2c
8076543: Add @modules as needed to the langtools tests
akulyakh
parents:
7640
diff
changeset
|
31 |
* jdk.compiler/com.sun.tools.javac.comp |
d3ce7619db2c
8076543: Add @modules as needed to the langtools tests
akulyakh
parents:
7640
diff
changeset
|
32 |
* jdk.compiler/com.sun.tools.javac.file |
d3ce7619db2c
8076543: Add @modules as needed to the langtools tests
akulyakh
parents:
7640
diff
changeset
|
33 |
* jdk.compiler/com.sun.tools.javac.util |
7640
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
34 |
* @run main PrimitiveConversionTest |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
35 |
*/ |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
36 |
|
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
37 |
import com.sun.tools.javac.code.Type; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
38 |
import com.sun.tools.javac.code.Type.*; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
39 |
import com.sun.tools.javac.code.Symbol.*; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
40 |
import java.lang.reflect.Array; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
41 |
import java.util.EnumSet; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
42 |
|
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
43 |
/** |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
44 |
* Check invariants in assignment/method conversion involving primitive types and arrays |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
45 |
*/ |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
46 |
public class PrimitiveConversionTest extends TypeHarness { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
47 |
|
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
48 |
Type[] types1; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
49 |
Type[] types2; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
50 |
Type[] types3; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
51 |
|
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
52 |
enum Result { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
53 |
OK_BOTH(true), |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
54 |
FAIL_BOTH(false), |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
55 |
OK_ASSIGN_ONLY(true); |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
56 |
|
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
57 |
boolean value; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
58 |
|
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
59 |
Result(boolean value) { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
60 |
this.value = value; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
61 |
} |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
62 |
} |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
63 |
|
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
64 |
enum ConversionKind { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
65 |
ASSIGNMENT_CONVERSION(EnumSet.of(Result.OK_BOTH, Result.OK_ASSIGN_ONLY)) { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
66 |
@Override |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
67 |
void check(TypeHarness harness, Type from, Type to, Result expected) { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
68 |
harness.assertAssignable(from, to, resSet.contains(expected)); |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
69 |
} |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
70 |
}, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
71 |
METHOD_CONVERSION(EnumSet.of(Result.OK_BOTH)) { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
72 |
@Override |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
73 |
void check(TypeHarness harness, Type from, Type to, Result expected) { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
74 |
harness.assertConvertible(from, to, resSet.contains(expected)); |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
75 |
} |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
76 |
}; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
77 |
|
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
78 |
EnumSet<Result> resSet; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
79 |
|
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
80 |
private ConversionKind(EnumSet<Result> resSet) { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
81 |
this.resSet = resSet; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
82 |
} |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
83 |
|
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
84 |
abstract void check(TypeHarness harness, Type from, Type to, Result expected); |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
85 |
} |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
86 |
|
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
87 |
enum TestKind { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
88 |
SIMPLE { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
89 |
@Override |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
90 |
Type[] getFromTypes(PrimitiveConversionTest harness) { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
91 |
return harness.types1; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
92 |
} |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
93 |
@Override |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
94 |
Type[] getToTypes(PrimitiveConversionTest harness) { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
95 |
return harness.types1; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
96 |
} |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
97 |
@Override |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
98 |
Result[][] getResults(PrimitiveConversionTest harness) { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
99 |
return harness.results1; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
100 |
} |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
101 |
}, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
102 |
CONSTANT_TYPES { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
103 |
@Override |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
104 |
Type[] getFromTypes(PrimitiveConversionTest harness) { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
105 |
return harness.types2; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
106 |
} |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
107 |
@Override |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
108 |
Type[] getToTypes(PrimitiveConversionTest harness) { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
109 |
return harness.types3; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
110 |
} |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
111 |
@Override |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
112 |
Result[][] getResults(PrimitiveConversionTest harness) { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
113 |
return harness.results2; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
114 |
} |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
115 |
}; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
116 |
|
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
117 |
abstract Type[] getFromTypes(PrimitiveConversionTest harness); |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
118 |
abstract Type[] getToTypes(PrimitiveConversionTest harness); |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
119 |
abstract Result[][] getResults(PrimitiveConversionTest harness); |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
120 |
} |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
121 |
|
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
122 |
static final Result T = Result.OK_BOTH; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
123 |
static final Result F = Result.FAIL_BOTH; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
124 |
static final Result A = Result.OK_ASSIGN_ONLY; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
125 |
|
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
126 |
Result[][] results1 = { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
127 |
//byte, short, int, long, float, double, char, bool, C1, C2, C3, T , byte[], short[], int[], long[], float[], double[], char[], bool[], C1[], C2[], C3[], T[] |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
128 |
/*byte*/ { T , T , T , T , T , T , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
129 |
/*short*/ { F , T , T , T , T , T , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
130 |
/*int*/ { F , F , T , T , T , T , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
131 |
/*long*/ { F , F , F , T , T , T , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
132 |
/*float*/ { F , F , F , F , T , T , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
133 |
/*double*/ { F , F , F , F , F , T , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
134 |
/*char*/ { F , F , T , T , T , T , T , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
135 |
/*bool*/ { F , F , F , F , F , F , F , T , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
136 |
/*C1*/ { F , F , F , F , F , F , F , F , T , F , T , F , F , F , F , F , F , F , F , F , F , F , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
137 |
/*C2*/ { F , F , F , F , F , F , F , F , T , T , T , F , F , F , F , F , F , F , F , F , F , F , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
138 |
/*C3*/ { F , F , F , F , F , F , F , F , T , F , T , F , F , F , F , F , F , F , F , F , F , F , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
139 |
/*T*/ { F , F , F , F , F , F , F , F , F , F , F , T , F , F , F , F , F , F , F , F , F , F , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
140 |
/*byte[]*/ { F , F , F , F , F , F , F , F , F , F , F , F , T , F , F , F , F , F , F , F , F , F , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
141 |
/*short[]*/ { F , F , F , F , F , F , F , F , F , F , F , F , F , T , F , F , F , F , F , F , F , F , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
142 |
/*int[]*/ { F , F , F , F , F , F , F , F , F , F , F , F , F , F , T , F , F , F , F , F , F , F , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
143 |
/*long[]*/ { F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , T , F , F , F , F , F , F , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
144 |
/*float[]*/ { F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , T , F , F , F , F , F , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
145 |
/*double[]*/{ F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , T , F , F , F , F , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
146 |
/*char[]*/ { F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , T , F , F , F , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
147 |
/*bool[]*/ { F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , T , F , F , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
148 |
/*C1[]*/ { F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , T , F , T , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
149 |
/*C2[]*/ { F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , T , T , T , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
150 |
/*C3[]*/ { F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , T , F , T , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
151 |
/*T[]*/ { F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , F , T }}; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
152 |
|
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
153 |
Result[][] results2 = { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
154 |
//byte, short, int, long, float, double, char, bool |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
155 |
/*byte*/ { T , T , T , T , T , T , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
156 |
/*short*/ { F , T , T , T , T , T , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
157 |
/*short1*/ { A , T , T , T , T , T , A , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
158 |
/*short2*/ { F , T , T , T , T , T , A , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
159 |
/*int*/ { F , F , T , T , T , T , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
160 |
/*int1*/ { A , A , T , T , T , T , A , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
161 |
/*int2*/ { F , A , T , T , T , T , A , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
162 |
/*int4*/ { F , F , T , T , T , T , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
163 |
/*long*/ { F , F , F , T , T , T , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
164 |
/*long1*/ { F , F , F , T , T , T , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
165 |
/*long2*/ { F , F , F , T , T , T , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
166 |
/*long4*/ { F , F , F , T , T , T , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
167 |
/*long8*/ { F , F , F , T , T , T , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
168 |
/*float*/ { F , F , F , F , T , T , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
169 |
/*float1*/ { F , F , F , F , T , T , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
170 |
/*float2*/ { F , F , F , F , T , T , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
171 |
/*float4*/ { F , F , F , F , T , T , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
172 |
/*double*/ { F , F , F , F , F , T , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
173 |
/*double1*/ { F , F , F , F , F , T , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
174 |
/*double2*/ { F , F , F , F , F , T , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
175 |
/*double4*/ { F , F , F , F , F , T , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
176 |
/*double8*/ { F , F , F , F , F , T , F , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
177 |
/*char*/ { F , F , T , T , T , T , T , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
178 |
/*char1*/ { A , A , T , T , T , T , T , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
179 |
/*char2*/ { F , A , T , T , T , T , T , F }, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
180 |
/*bool*/ { F , F , F , F , F , F , F , T }}; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
181 |
|
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
182 |
PrimitiveConversionTest() { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
183 |
Type[] primitiveTypes = new Type[] { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
184 |
predef.byteType, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
185 |
predef.shortType, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
186 |
predef.intType, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
187 |
predef.longType, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
188 |
predef.floatType, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
189 |
predef.doubleType, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
190 |
predef.charType, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
191 |
predef.booleanType }; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
192 |
|
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
193 |
ClassType c1 = fac.Class(fac.TypeVariable()); |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
194 |
ClassType c2 = fac.Class(); |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
195 |
c2.supertype_field = subst(c1, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
196 |
Mapping(c1.getTypeArguments().head, predef.stringType)); |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
197 |
Type c3 = erasure(c1); |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
198 |
|
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
199 |
Type[] referenceTypes = { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
200 |
subst(c1, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
201 |
Mapping(c1.getTypeArguments().head, predef.stringType)), |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
202 |
c2, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
203 |
c3, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
204 |
fac.TypeVariable() }; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
205 |
|
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
206 |
Type[] arrayTypes = new Type[primitiveTypes.length + referenceTypes.length]; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
207 |
int idx = 0; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
208 |
for (Type t : join(Type.class, primitiveTypes, referenceTypes)) { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
209 |
arrayTypes[idx++] = fac.Array(t); |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
210 |
} |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
211 |
|
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
212 |
types1 = join(Type.class, primitiveTypes, referenceTypes, arrayTypes); |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
213 |
|
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
214 |
types2 = new Type[] { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
215 |
predef.byteType, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
216 |
predef.shortType, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
217 |
fac.Constant((short)0x0001), |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
218 |
fac.Constant((short)0x0100), |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
219 |
predef.intType, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
220 |
fac.Constant((int)0x0000_0001), |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
221 |
fac.Constant((int)0x0000_0100), |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
222 |
fac.Constant((int)0x0001_0000), |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
223 |
predef.longType, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
224 |
fac.Constant((long)0x0000_0000_0000_0001L), |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
225 |
fac.Constant((long)0x0000_0000_0000_0100L), |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
226 |
fac.Constant((long)0x0000_0000_0001_0000L), |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
227 |
fac.Constant((long)0x0001_0000_0000_0000L), |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
228 |
predef.floatType, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
229 |
fac.Constant((float)0x0000_0001), |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
230 |
fac.Constant((float)0x0000_0100), |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
231 |
fac.Constant((float)0x0001_0000), |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
232 |
predef.doubleType, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
233 |
fac.Constant((double)0x0000_0000_0000_0001L), |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
234 |
fac.Constant((double)0x0000_0000_0000_0100L), |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
235 |
fac.Constant((double)0x0000_0000_0001_0000L), |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
236 |
fac.Constant((double)0x0001_0000_0000_0000L), |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
237 |
predef.charType, |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
238 |
fac.Constant((char)0x0001), |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
239 |
fac.Constant((char)0x0100), |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
240 |
predef.booleanType |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
241 |
}; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
242 |
|
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
243 |
types3 = primitiveTypes; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
244 |
} |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
245 |
|
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
246 |
void testConversion(ConversionKind convKind, TestKind testKind) { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
247 |
Type[] rows = testKind.getFromTypes(this); |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
248 |
Type[] cols = testKind.getToTypes(this); |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
249 |
for (int i = 0; i < rows.length ; i++) { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
250 |
for (int j = 0; j < cols.length ; j++) { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
251 |
convKind.check(this, rows[i], cols[j], testKind.getResults(this)[i][j]); |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
252 |
} |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
253 |
} |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
254 |
} |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
255 |
|
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
256 |
@SuppressWarnings("unchecked") |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
257 |
<T> T[] join(Class<T> type, T[]... args) { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
258 |
int totalLength = 0; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
259 |
for (T[] arr : args) { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
260 |
totalLength += arr.length; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
261 |
} |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
262 |
T[] new_arr = (T[])Array.newInstance(type, totalLength); |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
263 |
int idx = 0; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
264 |
for (T[] arr : args) { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
265 |
System.arraycopy(arr, 0, new_arr, idx, arr.length); |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
266 |
idx += arr.length; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
267 |
} |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
268 |
return new_arr; |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
269 |
} |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
270 |
|
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
271 |
public static void main(String[] args) { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
272 |
PrimitiveConversionTest harness = new PrimitiveConversionTest(); |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
273 |
for (ConversionKind convKind : ConversionKind.values()) { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
274 |
for (TestKind testKind : TestKind.values()) { |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
275 |
harness.testConversion(convKind, testKind); |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
276 |
} |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
277 |
} |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
278 |
} |
5d199da591db
7006109: Add test library to simplify the task of writing automated type-system tests
mcimadamore
parents:
diff
changeset
|
279 |
} |