Search in sources :

Example 6 with ListType

use of com.google.template.soy.types.ListType in project closure-templates by google.

the class TofuTypeChecksTest method testListTypeIsInstance.

@Test
public void testListTypeIsInstance() {
    ListType listOfString = ListType.of(StringType.getInstance());
    assertIsInstance(listOfString, LIST_DATA);
    assertIsNotInstance(listOfString, NULL_DATA, BOOLEAN_DATA, STRING_DATA, INTEGER_DATA, FLOAT_DATA, HTML_DATA, ATTRIBUTES_DATA, CSS_DATA, URI_DATA, TRUSTED_RESOURCE_URI_DATA, JS_DATA, MAP_DATA, DICT_DATA);
}
Also used : ListType(com.google.template.soy.types.ListType) Test(org.junit.Test)

Aggregations

ListType (com.google.template.soy.types.ListType)6 SoyType (com.google.template.soy.types.SoyType)4 Test (org.junit.Test)3 LegacyObjectMapType (com.google.template.soy.types.LegacyObjectMapType)2 MapType (com.google.template.soy.types.MapType)2 RecordType (com.google.template.soy.types.RecordType)2 SoyProtoEnumType (com.google.template.soy.types.SoyProtoEnumType)2 Optional (com.google.common.base.Optional)1 ImmutableMap (com.google.common.collect.ImmutableMap)1 ImmutableSet (com.google.common.collect.ImmutableSet)1 ImmutableSortedSet (com.google.common.collect.ImmutableSortedSet)1 FieldDescriptor (com.google.protobuf.Descriptors.FieldDescriptor)1 SoyBackendKind (com.google.template.soy.base.SoyBackendKind)1 SanitizedContentKind (com.google.template.soy.base.internal.SanitizedContentKind)1 ExprNode (com.google.template.soy.exprtree.ExprNode)1 SoyExpression.forList (com.google.template.soy.jbcsrc.restricted.SoyExpression.forList)1 CodeChunk (com.google.template.soy.jssrc.dsl.CodeChunk)1 Generator (com.google.template.soy.jssrc.dsl.CodeChunk.Generator)1 SoyProtoType (com.google.template.soy.types.SoyProtoType)1 Kind (com.google.template.soy.types.SoyType.Kind)1