generate constraint system tests

more tests added
This commit is contained in:
Svetlana Isakova
2014-01-24 21:09:51 +04:00
parent 791fa22abb
commit 9832676701
27 changed files with 593 additions and 27 deletions
@@ -0,0 +1,18 @@
VARIABLES T
SUBTYPE T Int
SUPERTYPE T String
type parameter bounds:
T <: jet.Int(SPECIAL), >: jet.String(SPECIAL)
status:
-hasConflictingConstraints: true
-hasContradiction: true
-hasErrorInConstrainingTypes: false
-hasTypeConstructorMismatch: false
-hasUnknownParameters: false
-hasViolatedUpperBound: false
-isSuccessful: false
result:
T=???
@@ -1,10 +1,10 @@
VARIABLES T
SUBTYPE T Int
SUPERTYPE T Int !
SUPERTYPE T Int
type parameter bounds:
T >: Int(SPECIAL), <: Int(SPECIAL)
T <: jet.Int(SPECIAL), >: jet.Int(SPECIAL)
status:
-hasConflictingConstraints: false
-hasContradiction: false
@@ -15,4 +15,4 @@ status:
-isSuccessful: true
result:
T=Int
T=jet.Int
@@ -0,0 +1,17 @@
VARIABLES T
SUBTYPE List<T> Int
type parameter bounds:
T
status:
-hasConflictingConstraints: false
-hasContradiction: true
-hasErrorInConstrainingTypes: false
-hasTypeConstructorMismatch: true
-hasUnknownParameters: true
-hasViolatedUpperBound: false
-isSuccessful: false
result:
T=???
@@ -0,0 +1,17 @@
VARIABLES T
SUBTYPE Any Any
type parameter bounds:
T
status:
-hasConflictingConstraints: false
-hasContradiction: false
-hasErrorInConstrainingTypes: false
-hasTypeConstructorMismatch: false
-hasUnknownParameters: true
-hasViolatedUpperBound: false
-isSuccessful: false
result:
T=???
@@ -0,0 +1,18 @@
VARIABLES T
SUBTYPE T Int
SUBTYPE T String !
type parameter bounds:
T <: jet.Int(SPECIAL), <: jet.String(TYPE_BOUND_POSITION(0))
status:
-hasConflictingConstraints: true
-hasContradiction: true
-hasErrorInConstrainingTypes: false
-hasTypeConstructorMismatch: false
-hasUnknownParameters: false
-hasViolatedUpperBound: true
-isSuccessful: false
result:
T=???
@@ -0,0 +1,18 @@
VARIABLES T
SUBTYPE T B
SUPERTYPE T A
type parameter bounds:
T <: B(SPECIAL), >: A(SPECIAL)
status:
-hasConflictingConstraints: true
-hasContradiction: true
-hasErrorInConstrainingTypes: false
-hasTypeConstructorMismatch: false
-hasUnknownParameters: false
-hasViolatedUpperBound: false
-isSuccessful: false
result:
T=???
@@ -0,0 +1,18 @@
VARIABLES T
SUBTYPE T A
SUBTYPE T B
type parameter bounds:
T <: A(SPECIAL), <: B(SPECIAL)
status:
-hasConflictingConstraints: false
-hasContradiction: false
-hasErrorInConstrainingTypes: false
-hasTypeConstructorMismatch: false
-hasUnknownParameters: false
-hasViolatedUpperBound: false
-isSuccessful: true
result:
T=B
@@ -0,0 +1,18 @@
VARIABLES T
SUBTYPE T A
SUPERTYPE T C
type parameter bounds:
T <: A(SPECIAL), >: C(SPECIAL)
status:
-hasConflictingConstraints: false
-hasContradiction: false
-hasErrorInConstrainingTypes: false
-hasTypeConstructorMismatch: false
-hasUnknownParameters: false
-hasViolatedUpperBound: false
-isSuccessful: true
result:
T=C
@@ -0,0 +1,19 @@
VARIABLES T
SUBTYPE T A
SUPERTYPE T B
SUPERTYPE T C
type parameter bounds:
T <: A(SPECIAL), >: B(SPECIAL), >: C(SPECIAL)
status:
-hasConflictingConstraints: false
-hasContradiction: false
-hasErrorInConstrainingTypes: false
-hasTypeConstructorMismatch: false
-hasUnknownParameters: false
-hasViolatedUpperBound: false
-isSuccessful: true
result:
T=B
@@ -1,4 +1,4 @@
fun foo<T, P, Q, R, S>() = 42
fun foo<T, P: T>() = 42
trait A
trait B : A
@@ -0,0 +1,18 @@
VARIABLES T
SUPERTYPE T IntegerValueType(1000)
SUBTYPE T Byte
type parameter bounds:
T >: IntegerValueType(1000)(SPECIAL), <: jet.Byte(SPECIAL)
status:
-hasConflictingConstraints: true
-hasContradiction: true
-hasErrorInConstrainingTypes: false
-hasTypeConstructorMismatch: false
-hasUnknownParameters: false
-hasViolatedUpperBound: false
-isSuccessful: false
result:
T=???
@@ -0,0 +1,17 @@
VARIABLES T
SUPERTYPE T IntegerValueType(10000000000)
type parameter bounds:
T >: IntegerValueType(10000000000)(SPECIAL)
status:
-hasConflictingConstraints: false
-hasContradiction: false
-hasErrorInConstrainingTypes: false
-hasTypeConstructorMismatch: false
-hasUnknownParameters: false
-hasViolatedUpperBound: false
-isSuccessful: true
result:
T=jet.Long
@@ -0,0 +1,18 @@
VARIABLES T
SUPERTYPE T IntegerValueType(1)
SUBTYPE T Any
type parameter bounds:
T >: IntegerValueType(1)(SPECIAL), <: jet.Any(SPECIAL)
status:
-hasConflictingConstraints: false
-hasContradiction: false
-hasErrorInConstrainingTypes: false
-hasTypeConstructorMismatch: false
-hasUnknownParameters: false
-hasViolatedUpperBound: false
-isSuccessful: true
result:
T=jet.Int
@@ -0,0 +1,18 @@
VARIABLES T
SUPERTYPE T IntegerValueType(1)
SUPERTYPE T String
type parameter bounds:
T >: IntegerValueType(1)(SPECIAL), >: jet.String(SPECIAL)
status:
-hasConflictingConstraints: false
-hasContradiction: false
-hasErrorInConstrainingTypes: false
-hasTypeConstructorMismatch: false
-hasUnknownParameters: false
-hasViolatedUpperBound: false
-isSuccessful: true
result:
T=jet.Comparable<out jet.Any?>
@@ -0,0 +1,18 @@
VARIABLES T
SUPERTYPE T IntegerValueType(1)
SUPERTYPE T IntegerValueType(1000)
type parameter bounds:
T >: IntegerValueType(1)(SPECIAL), >: IntegerValueType(1000)(SPECIAL)
status:
-hasConflictingConstraints: false
-hasContradiction: false
-hasErrorInConstrainingTypes: false
-hasTypeConstructorMismatch: false
-hasUnknownParameters: false
-hasViolatedUpperBound: false
-isSuccessful: true
result:
T=jet.Int
@@ -0,0 +1,18 @@
VARIABLES T
SUPERTYPE T IntegerValueType(1)
SUBTYPE T Byte
type parameter bounds:
T >: IntegerValueType(1)(SPECIAL), <: jet.Byte(SPECIAL)
status:
-hasConflictingConstraints: false
-hasContradiction: false
-hasErrorInConstrainingTypes: false
-hasTypeConstructorMismatch: false
-hasUnknownParameters: false
-hasViolatedUpperBound: false
-isSuccessful: true
result:
T=jet.Byte
@@ -0,0 +1,17 @@
VARIABLES T
SUPERTYPE T IntegerValueType(1)
type parameter bounds:
T >: IntegerValueType(1)(SPECIAL)
status:
-hasConflictingConstraints: false
-hasContradiction: false
-hasErrorInConstrainingTypes: false
-hasTypeConstructorMismatch: false
-hasUnknownParameters: false
-hasViolatedUpperBound: false
-isSuccessful: true
result:
T=jet.Int
@@ -0,0 +1,18 @@
VARIABLES T
SUPERTYPE T IntegerValueType(1)
SUBTYPE T Short
type parameter bounds:
T >: IntegerValueType(1)(SPECIAL), <: jet.Short(SPECIAL)
status:
-hasConflictingConstraints: false
-hasContradiction: false
-hasErrorInConstrainingTypes: false
-hasTypeConstructorMismatch: false
-hasUnknownParameters: false
-hasViolatedUpperBound: false
-isSuccessful: true
result:
T=jet.Short
@@ -0,0 +1,20 @@
VARIABLES T P
SUBTYPE T Int
type parameter bounds:
T <: jet.Int(SPECIAL)
P <: ???(TYPE_BOUND_POSITION(1)), <: jet.Int(COMPOUND_CONSTRAINT_POSITION)
status:
-hasConflictingConstraints: false
-hasContradiction: false
-hasErrorInConstrainingTypes: false
-hasTypeConstructorMismatch: false
-hasUnknownParameters: false
-hasViolatedUpperBound: false
-isSuccessful: true
result:
T=jet.Int
P=jet.Int
@@ -0,0 +1,17 @@
VARIABLES T
SUBTYPE Consumer<A> Consumer<T>
type parameter bounds:
T <: A(SPECIAL)
status:
-hasConflictingConstraints: false
-hasContradiction: false
-hasErrorInConstrainingTypes: false
-hasTypeConstructorMismatch: false
-hasUnknownParameters: false
-hasViolatedUpperBound: false
-isSuccessful: true
result:
T=A
@@ -0,0 +1,17 @@
VARIABLES T
SUBTYPE My<T> My<A>
type parameter bounds:
T := A(SPECIAL)
status:
-hasConflictingConstraints: false
-hasContradiction: false
-hasErrorInConstrainingTypes: false
-hasTypeConstructorMismatch: false
-hasUnknownParameters: false
-hasViolatedUpperBound: false
-isSuccessful: true
result:
T=A
@@ -0,0 +1,17 @@
VARIABLES T
SUBTYPE Producer<A> Producer<T>
type parameter bounds:
T >: A(SPECIAL)
status:
-hasConflictingConstraints: false
-hasContradiction: false
-hasErrorInConstrainingTypes: false
-hasTypeConstructorMismatch: false
-hasUnknownParameters: false
-hasViolatedUpperBound: false
-isSuccessful: true
result:
T=A