use of org.eclipse.ceylon.compiler.java.runtime.model.TypeDescriptor in project ceylon by eclipse.
the class TypeDescriptorTest method testTupleTypeString.
@Test
public void testTupleTypeString() {
TypeDescriptor tuple2 = TypeDescriptor.tuple(false, false, -1, Integer.$TypeDescriptor$, String.$TypeDescriptor$);
Assert.assertEquals("[ceylon.language.Integer,ceylon.language.String]", tuple2.toString());
TypeDescriptor tuple2Star = TypeDescriptor.tuple(true, false, -1, Integer.$TypeDescriptor$, String.$TypeDescriptor$);
Assert.assertEquals("[ceylon.language.Integer,ceylon.language.String*]", tuple2Star.toString());
TypeDescriptor tuple2Plus = TypeDescriptor.tuple(true, true, -1, Integer.$TypeDescriptor$, String.$TypeDescriptor$);
Assert.assertEquals("[ceylon.language.Integer,ceylon.language.String+]", tuple2Plus.toString());
TypeDescriptor tuple1Or2 = TypeDescriptor.tuple(false, false, 1, Integer.$TypeDescriptor$, String.$TypeDescriptor$);
Assert.assertEquals("[ceylon.language.Integer,ceylon.language.String=]", tuple1Or2.toString());
TypeDescriptor tuple0OrN = TypeDescriptor.tuple(true, false, 0, Integer.$TypeDescriptor$, String.$TypeDescriptor$);
Assert.assertEquals("[ceylon.language.Integer=,ceylon.language.String*]", tuple0OrN.toString());
}
Aggregations