Skip to content
Browse files

Removed tuples from type checker test.

  • Loading branch information...
1 parent bf28ce1 commit ffb67d3a1fe97d38a1e6c5550ecbfdd454990a4c Evgeny Gerashchenko committed Mar 18, 2013
View
2 compiler/testData/type-checker-test.kt
@@ -1,5 +1,7 @@
package testData
+class Pair<out A, out B> (val first: A, val second: B}
+
open class Base_T<T>()
open class Derived_T<T>() : Base_T<T>
open class DDerived_T<T>() : Derived_T<T>
View
45 compiler/tests/org/jetbrains/jet/types/JetTypeCheckerTest.java
@@ -129,17 +129,11 @@ public void testConstants() throws Exception {
assertType("\"d\"", builtIns.getStringType());
assertType("\"\"\"d\"\"\"", builtIns.getStringType());
- assertType("#()", KotlinBuiltIns.getInstance().getUnitType());
+ assertType("Unit.VALUE", KotlinBuiltIns.getInstance().getUnitType());
assertType("null", KotlinBuiltIns.getInstance().getNullableNothingType());
}
- public void testTupleConstants() throws Exception {
- assertType("#()", KotlinBuiltIns.getInstance().getUnitType());
-
- assertType("#(1, 'a')", KotlinBuiltIns.getInstance().getTupleType(builtIns.getIntType(), builtIns.getCharType()));
- }
-
public void testTypeInfo() throws Exception {
// todo: obsolete since removal of typeinfo
// assertType("typeinfo<Int>", "TypeInfo<Int>");
@@ -269,41 +263,6 @@ public void testBasicSubtyping() throws Exception {
assertNotSubtype("Unit", "Int");
}
- public void testTuples() throws Exception {
- assertSubtype("Unit", "#()");
- assertSubtype("#()", "Unit");
- assertSubtype("#()", "#()");
-
- assertSubtype("#(Boolean)", "#(Boolean)");
- assertSubtype("#(Byte)", "#(Byte)");
- assertSubtype("#(Char)", "#(Char)");
- assertSubtype("#(Short)", "#(Short)");
- assertSubtype("#(Int)", "#(Int)");
- assertSubtype("#(Long)", "#(Long)");
- assertSubtype("#(Float)", "#(Float)");
- assertSubtype("#(Double)", "#(Double)");
- assertSubtype("#(Unit)", "#(Unit)");
- assertSubtype("#(Unit, Unit)", "#(Unit, Unit)");
-
- assertSubtype("#(Boolean)", "#(Boolean)");
- assertSubtype("#(Byte)", "#(Byte)");
- assertSubtype("#(Char)", "#(Char)");
- assertSubtype("#(Short)", "#(Short)");
- assertSubtype("#(Int)", "#(Int)");
- assertSubtype("#(Long)", "#(Long)");
- assertSubtype("#(Float)", "#(Float)");
- assertSubtype("#(Double)", "#(Double)");
- assertSubtype("#(Unit)", "#(Unit)");
- assertSubtype("#(Unit, Unit)", "#(Unit, Unit)");
-
- assertNotSubtype("#(Unit)", "#(Int)");
-
- assertSubtype("#(Unit)", "#(Any)");
- assertSubtype("#(Unit, Unit)", "#(Any, Any)");
- assertSubtype("#(Unit, Unit)", "#(Any, Unit)");
- assertSubtype("#(Unit, Unit)", "#(Unit, Any)");
- }
-
public void testProjections() throws Exception {
assertSubtype("Base_T<Int>", "Base_T<Int>");
assertNotSubtype("Base_T<Int>", "Base_T<Any>");
@@ -433,7 +392,7 @@ public void testPropertiesInClasses() throws Exception {
public void testOverloads() throws Exception {
assertType("Functions<String>().f()", "Unit");
assertType("Functions<String>().f(1)", "Int");
- assertType("Functions<Double>().f(#(1, 1))", "Double");
+ assertType("Functions<Double>().f(Pair(1, 1))", "Double");
assertType("Functions<Double>().f(1.0)", "Any");
assertType("Functions<Byte>().f<String>(\"\")", "Byte");

0 comments on commit ffb67d3

Please sign in to comment.
Something went wrong with that request. Please try again.