Home | News | Wiki | About StringTemplate | Feedback | Support | Bugs


Latest version is 3.2.
Download now! »

Download
» Home
» Download
» News
»Using StringTemplate
» Documentation
» Wiki
» Articles
» File Sharing
» Code API
» Tech Support
»About StringTemplate
» What is it?
» Showcase
» Testimonials
» Software License
» Changes
»Feedback
»Credits
»Contact


Support StringTemplate, ANTLR Project by making a donation! Terence often pays for things like the antlr.org server, conference travel, and this site design (that alone cost US$1000). Buy him a beer and pizza remotely ;)

Search



TestStringTemplate


org.antlr.stringtemplate.test
Class TestStringTemplate

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.antlr.stringtemplate.test.TestStringTemplate
All Implemented Interfaces:
junit.framework.Test

public class TestStringTemplate
extends junit.framework.TestCase


Nested Class Summary
 class TestStringTemplate.Connector
           
 class TestStringTemplate.Connector2
           
 class TestStringTemplate.Connector3
           
 class TestStringTemplate.DateRenderer
           
 class TestStringTemplate.DateRenderer2
           
 class TestStringTemplate.DateRenderer3
           
static class TestStringTemplate.Decl
           
(package private) static class TestStringTemplate.Duh
           
(package private) static class TestStringTemplate.ErrorBuffer
           
static class TestStringTemplate.NonPublicProperty
           
 class TestStringTemplate.StringRenderer
           
static class TestStringTemplate.Tree
           
 
Field Summary
(package private) static java.lang.String newline
           
 
Constructor Summary
TestStringTemplate()
           
 
Method Summary
 void test16BitUnicodeChar()
           
 void test3LevelSuperRef()
           
 void test8BitEuroChars()
          FIXME: Dannish does not work if typed directly in with default file encoding on windows.
 void testAlternatingTemplateApplication()
           
 void testAlternativeWriter()
           
 void testAngleBracketsNoGroup()
           
 void testAngleBracketsWithGroupFile()
           
 void testAnonTemplateArgs()
           
 void testAnonTemplateArgs2()
           
 void testAnonTemplateOnLeftOfApply()
           
 void testAnonTemplateWithArgHasNoITArg()
           
 void testAnonymousTemplateAccessToEnclosingAttributes()
           
 void testApplyAnonymousTemplateToAggregateAttribute()
           
 void testApplyAnonymousTemplateToArrayAndMapProperty()
           
 void testApplyAnonymousTemplateToMapAndSet()
           
 void testApplyAnonymousTemplateToMultiValuedAttribute()
           
 void testApplyAnonymousTemplateToSingleValuedAttribute()
           
 void testApplyingTemplateFromDiskWithPrecompiledIF()
           
 void testApplyRepeatedAnonymousTemplateWithForeignTemplateRefToMultiValuedAttribute()
           
 void testApplySuperTemplateRef()
           
 void testApplyTemplateNameExpression()
           
 void testApplyTemplateNameTemplateEval()
           
 void testApplyTemplateToSingleValuedAttribute()
           
 void testApplyTemplateToSingleValuedAttributeWithDefaultAttribute()
           
 void testApplyTemplateWithNoFormalArgs()
           
 void testApplyTemplateWithSingleFormalArgs()
           
 void testArgEvaluationContext()
           
 void testArgumentContext()
           
 void testArgumentsAsTemplates()
           
 void testArgumentsAsTemplatesDefaultDelimiters()
           
 void testAttributeRefButtedUpAgainstEndifAndWhitespace()
           
 void testCannotFindInterfaceFile()
           
 void testCat2Attributes()
           
 void testCat2AttributesWithApply()
           
 void testCat3Attributes()
           
 void testCatListAndEmptyAttributes()
           
 void testCatListAndSingleAttribute()
           
 void testChangingAttrValueRepeatedTemplateApplicationToVector()
           
 void testChangingAttrValueTemplateApplicationToVector()
           
 void testCharLiterals()
           
 void testCollectionAttributes()
           
 void testCombinedOp()
           
 void testComplicatedIndirectTemplateApplication()
           
 void testComplicatedInheritance()
           
 void testComplicatedSeparatorExpr()
           
 void testComputedPropertyName()
           
 void testDefaultArgsWhenNotInvoked()
           
 void testDefaultArgument()
           
 void testDefaultArgument2()
           
 void testDefaultArgumentAsTemplate()
           
 void testDefaultArgumentAsTemplate2()
           
 void testDeliberateRecursiveTemplateApplication()
           
 void testDoNotInheritAttributesThroughFormalArgs()
           
 void testDoNotUseDefaultArgument()
           
 void testDumpMapAndSet()
           
 void testElseClause()
           
 void testElseIfClause()
           
 void testElseIfClause2()
           
 void testElseIfClauseAndElse()
           
 void testElseIfClauseAngleBrackets()
           
 void testEmbeddedComments()
           
 void testEmbeddedCommentsAngleBracketed()
           
 void testEmbeddedMultiLineIF()
           
 void testEmbeddedRegionRedefError()
           
 void testEmbeddedRegionRef()
           
 void testEmbeddedRegionRefAngleBrackets()
           
 void testEmbeddedRegionRefWithNewlinesAngleBrackets()
           
 void testEmbeddedRendererSeesEnclosing()
           
 void testEmptyExprAsFirstLineGetsNoOutput()
           
 void testEmptyGroupTemplate()
           
 void testEmptyIteratedConditionalValueGetsSeparator()
           
 void testEmptyIteratedConditionalWithElseValueGetsSeparator()
           
 void testEmptyIteratedValueGetsSeparator()
           
 void testEmptyListGetsNoOutput()
           
 void testEmptyListNoIteratorGetsNoOutput()
           
 void testEmptyStringAndEmptyAnonTemplateAsParameterUsingAngleBracketLexer()
           
 void testEmptyStringAndEmptyAnonTemplateAsParameterUsingDollarLexer()
           
 void testEscapedTemplateDelimiters()
           
 void testEscapeEscape()
           
 void testEscapeEscapeNestedAngle()
           
 void testEscapes()
           
 void testEscapesOutsideExpressions()
           
 void testExpressionAsRHSOfAssignment()
           
 void testExprInParens()
           
 void testFindTemplateInCLASSPATH()
           
 void testFirstOp()
           
 void testFirstWithCatAttribute()
           
 void testFirstWithListOfMaps()
           
 void testFirstWithOneAttributeOp()
           
 void testFormalArgumentAssignment()
           
 void testFormalArgumentAssignmentInApply()
           
 void testFortranLineWrap()
           
 void testGroupExtendsSuperGroup()
           
 void testGroupExtendsSuperGroupWithAngleBrackets()
           
 void testGroupFileFormat()
           
 void testGroupSatisfiesSingleInterface()
           
 void testHashMapPropertyFetch()
           
 void testHashMapPropertyFetchEmbeddedStringTemplate()
           
 void testIFBoolean()
          As of 2.0, you can test a boolean value
 void testIFCondWithParensDollarDelimsTemplate()
           
 void testIFCondWithParensTemplate()
           
 void testIFTemplate()
           
 void testImmediateTemplateAsAttributeLoop()
           
 void testImplicitOverriddenRegionRedefError()
           
 void testImplicitRegionRedefError()
           
 void testIncomingArraysAreOk()
           
 void testIncomingLists()
          FIXME: BUG! Iterator is not reset from first to second $x$ Either reset the iterator or pass an attribute that knows to get the iterator each time.
 void testIncomingListsAreNotModified()
           
 void testIncomingListsAreNotModified2()
           
 void testIndentBetweenLeftJustifiedLiterals()
           
 void testIndentBeyondLineWidth()
           
 void testIndentedExpr()
           
 void testIndentOfMultilineAttributes()
           
 void testIndentOfMultipleBlankLines()
           
 void testIndex0Var()
           
 void testIndex0VarWithMultipleExprs()
           
 void testIndexVar()
           
 void testIndexVarWithMultipleExprs()
           
 void testIndirectTemplateApplication()
           
 void testIndirectTemplateWithArgsApplication()
           
 void testInheritArgumentFromRecursiveTemplateApplication()
           
 void testInterfaceFileFormat()
           
 void testInvokeIndirectTemplateWithSingleFormalArgs()
           
 void testJustCat()
           
 void testLastOp()
           
 void testLastWithLengthOneListAttributeOp()
           
 void testLastWithOneAttributeOp()
           
 void testLazyEvalOfSuperInApplySuperTemplateRef()
           
 void testLengthOp()
           
 void testLengthOpNull()
           
 void testLengthOpOfListWithNulls()
           
 void testLengthOpOfStrippedListWithNulls()
           
 void testLengthOpOfStrippedListWithNullsFrontAndBack()
           
 void testLengthOpPrimitive()
           
 void testLengthOpSingleValue()
           
 void testLengthOpWithMap()
           
 void testLengthOpWithSet()
           
 void testLineDoesNotWrapDueToLiteral()
           
 void testLineWrap()
           
 void testLineWrapAnchored()
           
 void testLineWrapCharAfterWrapIsNewline()
           
 void testLineWrapEdgeCase()
           
 void testLineWrapForAnonTemplate()
           
 void testLineWrapForAnonTemplateAnchored()
           
 void testLineWrapForAnonTemplateComplicatedWrap()
           
 void testLineWrapInNestedExpr()
           
 void testLineWrapLastCharIsNewline()
           
 void testLineWrapWithDiffAnchor()
           
 void testLineWrapWithNormalizedNewlines()
           
 void testListAsTemplateArgument()
           
 void testListLiteralWithEmptyElements()
          Added feature for ST-21
 void testListOfEmbeddedTemplateSeesEnclosingAttributes()
           
 void testListOfIntArrays()
           
 void testMap()
           
 void testMapDefaultIsDefaultString()
          Test that a map can return a string with the word: default.
 void testMapDefaultStringAsKey()
          Test that a map can have only the default entry.
 void testMapDefaultValue()
           
 void testMapDefaultValueIsKey()
           
 void testMapEmptyDefaultValue()
           
 void testMapEmptyValueAndAngleBracketStrings()
           
 void testMapHiddenByFormalArg()
           
 void testMapKeyLookupViaTemplate()
           
 void testMapKeys()
           
 void testMapKeysWithIntegerType()
           
 void testMapMissingDefaultValueIsEmpty()
           
 void testMapValues()
           
 void testMapValuesAreTemplates()
           
 void testMapViaEnclosingTemplates()
           
 void testMapViaEnclosingTemplates2()
           
 void testMismatchedInterfaceTemplate()
           
 void testMissingEndDelimiter()
           
 void testMissingEndRegionError()
           
 void testMissingEndRegionErrorAngleBrackets()
           
 void testMissingInheritedAttribute()
           
 void testMissingInterfaceTemplate()
           
 void testMissingOptionalInterfaceTemplate()
           
 void testMultiDirGroupLoading()
           
 void testMultiLevelInheritance()
           
 void testMultipleAdditions()
           
 void testMultipleRefsToListAttribute()
           
 void testMultiValuedAttributeWithAnonymousTemplateUsingIndexVariableI()
           
 void testMultiValuedAttributeWithSeparator()
           
 void testNestedAnonymousTemplates()
           
 void testNestedAnonymousTemplatesAgain()
           
 void testNestedIF()
           
 void testNestedIFTemplate()
           
 void testNestedIndent()
           
 void testNestedIndentedExpr()
           
 void testNestedOp()
           
 void testNestedWithIndentAndTrackStartOfExpr()
           
 void testNewlineNormalizationInAttribute()
           
 void testNewlineNormalizationInTemplateString()
           
 void testNewlineNormalizationInTemplateStringPC()
           
 void testNoDotsInAttributeNames()
           
 void testNoDotsInTemplateNames()
           
 void testNoGroupLoader()
           
 void testNonNullButEmptyIteratorTestsFalse()
           
 void testNonPublicPropertyAccess()
           
 void testNullIndirectTemplate()
           
 void testNullIndirectTemplateApplication()
           
 void testNullListGetsNoOutput()
           
 void testNullOptionHasEmptyNullValue()
           
 void testNullOptionSingleNullValue()
           
 void testNullOptionSingleNullValueInList()
           
 void testNullSingleValueInListWithTemplateApply()
           
 void testNullSingleValueWithTemplateApply()
           
 void testNullTemplateApplication()
           
 void testNullTemplateToMultiValuedApplication()
           
 void testNullValueInList()
           
 void testNullValueInListNoNullOption()
           
 void testNullValueInListWithTemplateApply()
           
 void testNullValueInListWithTemplateApplyNullFirstValue()
           
 void testObjectPropertyReference()
           
 void testOverriddenRenderer()
           
 void testOverrideInheritance()
           
 void testOverrideThroughConditional()
           
 void testParallelAttributeIteration()
           
 void testParallelAttributeIterationHasI()
           
 void testParallelAttributeIterationWithDifferentSizes()
           
 void testParallelAttributeIterationWithDifferentSizesTemplateRefInsideToo()
           
 void testParallelAttributeIterationWithMismatchArgListSizes()
           
 void testParallelAttributeIterationWithMissingArgs()
           
 void testParallelAttributeIterationWithNullValue()
           
 void testParallelAttributeIterationWithSingletons()
           
 void testParameterAndAttributeScoping()
           
 void testParenthesizedExpression()
           
 void testPassThroughAttributes()
           
 void testPassThroughAttributes2()
           
 void testRecursion()
           
 void testRegionOverride()
           
 void testRegionOverrideRefSuperImplicitRegion()
           
 void testRegionOverrideRefSuperRegion()
           
 void testRegionOverrideRefSuperRegion3Levels()
           
 void testRegionRef()
           
 void testRegionRefAngleBrackets()
           
 void testRegionRefWithDefAngleBrackets()
           
 void testRegionRefWithDefInConditional()
           
 void testRegionRefWithImplicitDefInConditional()
           
 void testRendererForGroup()
           
 void testRendererForST()
           
 void testRendererWithFormat()
           
 void testRendererWithFormatAndList()
           
 void testRendererWithFormatAndSeparator()
           
 void testRendererWithFormatAndSeparatorAndNull()
           
 void testRepeatedApplicationOfTemplateToMultiValuedAttributeWithSeparator()
           
 void testRepeatedApplicationOfTemplateToSingleValuedAttribute()
           
 void testRepeatedIteratedAttrFromArg()
          If an iterator is sent into ST, it must be cannot be reset after each use so repeated refs yield empty values.
 void testRepeatedRestOp()
           
 void testRestOp()
           
 void testRestWithLengthOneListAttributeOp()
           
 void testRestWithOneAttributeOp()
           
 void testReUseOfCat()
           
 void testReUseOfRestResult()
           
 void testReUseOfStripResult()
           
 void testSetButNotRefd()
           
 void testSimpleAutoIndent()
           
 void testSimpleIndentOfAttributeList()
           
 void testSimpleInheritance()
           
 void testSingleExprTemplateArgument()
           
 void testSingleExprTemplateArgumentError()
           
 void testSingleExprTemplateArgumentInApply()
           
 void testSingleValuedAttributes()
           
 void testSingleValueWrap()
           
 void testSizeZeroButNonNullListGetsNoOutput()
           
 void testSizeZeroOnLineByItselfGetsNoOutput()
           
 void testSizeZeroOnLineWithIndentGetsNoOutput()
           
 void testSoleFormalTemplateArgumentInMultiApply()
           
 void testStringCatenationOnSingleValuedAttributeViaTemplateLiteral()
           
 void testStringCatenationOpOnArg()
           
 void testStringCatenationOpOnArgWithEqualsInString()
           
 void testStringLiteralAsAttribute()
           
 void testStripOpOfListOfListsWithNulls()
           
 void testStripOpOfListWithNulls()