Class TestStringTemplate

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

public class TestStringTemplate extends junit.framework.TestCase
  • Constructor Details

    • TestStringTemplate

      public TestStringTemplate()
  • Method Details

    • testInterfaceFileFormat

      public void testInterfaceFileFormat() throws Exception
      Throws:
      Exception
    • testNoGroupLoader

      public void testNoGroupLoader() throws Exception
      Throws:
      Exception
    • testCannotFindInterfaceFile

      public void testCannotFindInterfaceFile() throws Exception
      Throws:
      Exception
    • testMultiDirGroupLoading

      public void testMultiDirGroupLoading() throws Exception
      Throws:
      Exception
    • testGroupSatisfiesSingleInterface

      public void testGroupSatisfiesSingleInterface() throws Exception
      Throws:
      Exception
    • testGroupExtendsSuperGroup

      public void testGroupExtendsSuperGroup() throws Exception
      Throws:
      Exception
    • testGroupExtendsSuperGroupWithAngleBrackets

      public void testGroupExtendsSuperGroupWithAngleBrackets() throws Exception
      Throws:
      Exception
    • testMissingInterfaceTemplate

      public void testMissingInterfaceTemplate() throws Exception
      Throws:
      Exception
    • testMissingOptionalInterfaceTemplate

      public void testMissingOptionalInterfaceTemplate() throws Exception
      Throws:
      Exception
    • testMismatchedInterfaceTemplate

      public void testMismatchedInterfaceTemplate() throws Exception
      Throws:
      Exception
    • testGroupFileFormat

      public void testGroupFileFormat() throws Exception
      Throws:
      Exception
    • testEscapedTemplateDelimiters

      public void testEscapedTemplateDelimiters() throws Exception
      Throws:
      Exception
    • testTemplateParameterDecls

      public void testTemplateParameterDecls() throws Exception
      Check syntax and setAttribute-time errors
      Throws:
      Exception
    • testTemplateRedef

      public void testTemplateRedef() throws Exception
      Throws:
      Exception
    • testMissingInheritedAttribute

      public void testMissingInheritedAttribute() throws Exception
      Throws:
      Exception
    • testFormalArgumentAssignment

      public void testFormalArgumentAssignment() throws Exception
      Throws:
      Exception
    • testUndefinedArgumentAssignment

      public void testUndefinedArgumentAssignment() throws Exception
      Throws:
      Exception
    • testFormalArgumentAssignmentInApply

      public void testFormalArgumentAssignmentInApply() throws Exception
      Throws:
      Exception
    • testUndefinedArgumentAssignmentInApply

      public void testUndefinedArgumentAssignmentInApply() throws Exception
      Throws:
      Exception
    • testUndefinedAttributeReference

      public void testUndefinedAttributeReference() throws Exception
      Throws:
      Exception
    • testUndefinedDefaultAttributeReference

      public void testUndefinedDefaultAttributeReference() throws Exception
      Throws:
      Exception
    • testAngleBracketsWithGroupFile

      public void testAngleBracketsWithGroupFile() throws Exception
      Throws:
      Exception
    • testAngleBracketsNoGroup

      public void testAngleBracketsNoGroup() throws Exception
      Throws:
      Exception
    • testRegionRef

      public void testRegionRef() throws Exception
      Throws:
      Exception
    • testEmbeddedRegionRef

      public void testEmbeddedRegionRef() throws Exception
      Throws:
      Exception
    • testRegionRefAngleBrackets

      public void testRegionRefAngleBrackets() throws Exception
      Throws:
      Exception
    • testEmbeddedRegionRefAngleBrackets

      public void testEmbeddedRegionRefAngleBrackets() throws Exception
      Throws:
      Exception
    • testEmbeddedRegionRefWithNewlinesAngleBrackets

      public void testEmbeddedRegionRefWithNewlinesAngleBrackets() throws Exception
      Throws:
      Exception
    • testRegionRefWithDefAngleBrackets

      public void testRegionRefWithDefAngleBrackets() throws Exception
      Throws:
      Exception
    • testRegionRefWithDefInConditional

      public void testRegionRefWithDefInConditional() throws Exception
      Throws:
      Exception
    • testRegionRefWithImplicitDefInConditional

      public void testRegionRefWithImplicitDefInConditional() throws Exception
      Throws:
      Exception
    • testRegionOverride

      public void testRegionOverride() throws Exception
      Throws:
      Exception
    • testRegionOverrideRefSuperRegion

      public void testRegionOverrideRefSuperRegion() throws Exception
      Throws:
      Exception
    • testRegionOverrideRefSuperRegion3Levels

      public void testRegionOverrideRefSuperRegion3Levels() throws Exception
      Throws:
      Exception
    • testRegionOverrideRefSuperImplicitRegion

      public void testRegionOverrideRefSuperImplicitRegion() throws Exception
      Throws:
      Exception
    • testEmbeddedRegionRedefError

      public void testEmbeddedRegionRedefError() throws Exception
      Throws:
      Exception
    • testImplicitRegionRedefError

      public void testImplicitRegionRedefError() throws Exception
      Throws:
      Exception
    • testImplicitOverriddenRegionRedefError

      public void testImplicitOverriddenRegionRedefError() throws Exception
      Throws:
      Exception
    • testUnknownRegionDefError

      public void testUnknownRegionDefError() throws Exception
      Throws:
      Exception
    • testSuperRegionRefError

      public void testSuperRegionRefError() throws Exception
      Throws:
      Exception
    • testMissingEndRegionError

      public void testMissingEndRegionError() throws Exception
      Throws:
      Exception
    • testMissingEndRegionErrorAngleBrackets

      public void testMissingEndRegionErrorAngleBrackets() throws Exception
      Throws:
      Exception
    • testSimpleInheritance

      public void testSimpleInheritance() throws Exception
      Throws:
      Exception
    • testOverrideInheritance

      public void testOverrideInheritance() throws Exception
      Throws:
      Exception
    • testMultiLevelInheritance

      public void testMultiLevelInheritance() throws Exception
      Throws:
      Exception
    • testComplicatedInheritance

      public void testComplicatedInheritance() throws Exception
      Throws:
      Exception
    • test3LevelSuperRef

      public void test3LevelSuperRef() throws Exception
      Throws:
      Exception
    • testExprInParens

      public void testExprInParens() throws Exception
      Throws:
      Exception
    • testMultipleAdditions

      public void testMultipleAdditions() throws Exception
      Throws:
      Exception
    • testCollectionAttributes

      public void testCollectionAttributes() throws Exception
      Throws:
      Exception
    • testParenthesizedExpression

      public void testParenthesizedExpression() throws Exception
      Throws:
      Exception
    • testApplyTemplateNameExpression

      public void testApplyTemplateNameExpression() throws Exception
      Throws:
      Exception
    • testApplyTemplateNameTemplateEval

      public void testApplyTemplateNameTemplateEval() throws Exception
      Throws:
      Exception
    • testTemplateNameExpression

      public void testTemplateNameExpression() throws Exception
      Throws:
      Exception
    • testMissingEndDelimiter

      public void testMissingEndDelimiter() throws Exception
      Throws:
      Exception
    • testSetButNotRefd

      public void testSetButNotRefd() throws Exception
      Throws:
      Exception
    • testNullTemplateApplication

      public void testNullTemplateApplication() throws Exception
      Throws:
      Exception
    • testNullTemplateToMultiValuedApplication

      public void testNullTemplateToMultiValuedApplication() throws Exception
      Throws:
      Exception
    • testChangingAttrValueTemplateApplicationToVector

      public void testChangingAttrValueTemplateApplicationToVector() throws Exception
      Throws:
      Exception
    • testChangingAttrValueRepeatedTemplateApplicationToVector

      public void testChangingAttrValueRepeatedTemplateApplicationToVector() throws Exception
      Throws:
      Exception
    • testAlternatingTemplateApplication

      public void testAlternatingTemplateApplication() throws Exception
      Throws:
      Exception
    • testExpressionAsRHSOfAssignment

      public void testExpressionAsRHSOfAssignment() throws Exception
      Throws:
      Exception
    • testTemplateApplicationAsRHSOfAssignment

      public void testTemplateApplicationAsRHSOfAssignment() throws Exception
      Throws:
      Exception
    • testParameterAndAttributeScoping

      public void testParameterAndAttributeScoping() throws Exception
      Throws:
      Exception
    • testComplicatedSeparatorExpr

      public void testComplicatedSeparatorExpr() throws Exception
      Throws:
      Exception
    • testAttributeRefButtedUpAgainstEndifAndWhitespace

      public void testAttributeRefButtedUpAgainstEndifAndWhitespace() throws Exception
      Throws:
      Exception
    • testStringCatenationOnSingleValuedAttributeViaTemplateLiteral

      public void testStringCatenationOnSingleValuedAttributeViaTemplateLiteral() throws Exception
      Throws:
      Exception
    • testStringCatenationOpOnArg

      public void testStringCatenationOpOnArg() throws Exception
      Throws:
      Exception
    • testStringCatenationOpOnArgWithEqualsInString

      public void testStringCatenationOpOnArgWithEqualsInString() throws Exception
      Throws:
      Exception
    • testApplyingTemplateFromDiskWithPrecompiledIF

      public void testApplyingTemplateFromDiskWithPrecompiledIF() throws Exception
      Throws:
      Exception
    • testMultiValuedAttributeWithAnonymousTemplateUsingIndexVariableI

      public void testMultiValuedAttributeWithAnonymousTemplateUsingIndexVariableI() throws Exception
      Throws:
      Exception
    • testFindTemplateInCLASSPATH

      public void testFindTemplateInCLASSPATH() throws Exception
      Throws:
      Exception
    • testApplyTemplateToSingleValuedAttribute

      public void testApplyTemplateToSingleValuedAttribute() throws Exception
      Throws:
      Exception
    • testStringLiteralAsAttribute

      public void testStringLiteralAsAttribute() throws Exception
      Throws:
      Exception
    • testApplyTemplateToSingleValuedAttributeWithDefaultAttribute

      public void testApplyTemplateToSingleValuedAttributeWithDefaultAttribute() throws Exception
      Throws:
      Exception
    • testApplyAnonymousTemplateToSingleValuedAttribute

      public void testApplyAnonymousTemplateToSingleValuedAttribute() throws Exception
      Throws:
      Exception
    • testApplyAnonymousTemplateToMultiValuedAttribute

      public void testApplyAnonymousTemplateToMultiValuedAttribute() throws Exception
      Throws:
      Exception
    • testApplyAnonymousTemplateToAggregateAttribute

      public void testApplyAnonymousTemplateToAggregateAttribute() throws Exception
      Throws:
      Exception
    • testRepeatedApplicationOfTemplateToSingleValuedAttribute

      public void testRepeatedApplicationOfTemplateToSingleValuedAttribute() throws Exception
      Throws:
      Exception
    • testRepeatedApplicationOfTemplateToMultiValuedAttributeWithSeparator

      public void testRepeatedApplicationOfTemplateToMultiValuedAttributeWithSeparator() throws Exception
      Throws:
      Exception
    • testMultiValuedAttributeWithSeparator

      public void testMultiValuedAttributeWithSeparator() throws Exception
      Throws:
      Exception
    • testSingleValuedAttributes

      public void testSingleValuedAttributes() throws Exception
      Throws:
      Exception
    • testIFTemplate

      public void testIFTemplate() throws Exception
      Throws:
      Exception
    • testIFCondWithParensTemplate

      public void testIFCondWithParensTemplate() throws Exception
      Throws:
      Exception
    • testIFCondWithParensDollarDelimsTemplate

      public void testIFCondWithParensDollarDelimsTemplate() throws Exception
      Throws:
      Exception
    • testIFBoolean

      public void testIFBoolean() throws Exception
      As of 2.0, you can test a boolean value
      Throws:
      Exception
    • testNestedIFTemplate

      public void testNestedIFTemplate() throws Exception
      Throws:
      Exception
    • testIFConditionWithTemplateApplication

      public void testIFConditionWithTemplateApplication() throws Exception
      Throws:
      Exception
    • testObjectPropertyReference

      public void testObjectPropertyReference() throws Exception
      Throws:
      Exception
    • testApplyRepeatedAnonymousTemplateWithForeignTemplateRefToMultiValuedAttribute

      public void testApplyRepeatedAnonymousTemplateWithForeignTemplateRefToMultiValuedAttribute() throws Exception
      Throws:
      Exception
    • testRecursion

      public void testRecursion() throws Exception
      Throws:
      Exception
    • testNestedAnonymousTemplates

      public void testNestedAnonymousTemplates() throws Exception
      Throws:
      Exception
    • testAnonymousTemplateAccessToEnclosingAttributes

      public void testAnonymousTemplateAccessToEnclosingAttributes() throws Exception
      Throws:
      Exception
    • testNestedAnonymousTemplatesAgain

      public void testNestedAnonymousTemplatesAgain() throws Exception
      Throws:
      Exception
    • testEscapes

      public void testEscapes() throws Exception
      Throws:
      Exception
    • testEscapesOutsideExpressions

      public void testEscapesOutsideExpressions() throws Exception
      Throws:
      Exception
    • testElseClause

      public void testElseClause() throws Exception
      Throws:
      Exception
    • testElseIfClause

      public void testElseIfClause() throws Exception
      Throws:
      Exception
    • testElseIfClauseAngleBrackets

      public void testElseIfClauseAngleBrackets() throws Exception
      Throws:
      Exception
    • testElseIfClause2

      public void testElseIfClause2() throws Exception
      Throws:
      Exception
    • testElseIfClauseAndElse

      public void testElseIfClauseAndElse() throws Exception
      Throws:
      Exception
    • testNestedIF

      public void testNestedIF() throws Exception
      Throws:
      Exception
    • testEmbeddedMultiLineIF

      public void testEmbeddedMultiLineIF() throws Exception
      Throws:
      Exception
    • testSimpleIndentOfAttributeList

      public void testSimpleIndentOfAttributeList() throws Exception
      Throws:
      Exception
    • testIndentOfMultilineAttributes

      public void testIndentOfMultilineAttributes() throws Exception
      Throws:
      Exception
    • testIndentOfMultipleBlankLines

      public void testIndentOfMultipleBlankLines() throws Exception
      Throws:
      Exception
    • testIndentBetweenLeftJustifiedLiterals

      public void testIndentBetweenLeftJustifiedLiterals() throws Exception
      Throws:
      Exception
    • testNestedIndent

      public void testNestedIndent() throws Exception
      Throws:
      Exception
    • testAlternativeWriter

      public void testAlternativeWriter() throws Exception
      Throws:
      Exception
    • testApplyAnonymousTemplateToMapAndSet

      public void testApplyAnonymousTemplateToMapAndSet() throws Exception
      Throws:
      Exception
    • testDumpMapAndSet

      public void testDumpMapAndSet() throws Exception
      Throws:
      Exception
    • testApplyAnonymousTemplateToArrayAndMapProperty

      public void testApplyAnonymousTemplateToArrayAndMapProperty() throws Exception
      Throws:
      Exception
    • testSuperTemplateRef

      public void testSuperTemplateRef() throws Exception
      Throws:
      Exception
    • testApplySuperTemplateRef

      public void testApplySuperTemplateRef() throws Exception
      Throws:
      Exception
    • testLazyEvalOfSuperInApplySuperTemplateRef

      public void testLazyEvalOfSuperInApplySuperTemplateRef() throws Exception
      Throws:
      Exception
    • testTemplatePolymorphism

      public void testTemplatePolymorphism() throws Exception
      Throws:
      Exception
    • testListOfEmbeddedTemplateSeesEnclosingAttributes

      public void testListOfEmbeddedTemplateSeesEnclosingAttributes() throws Exception
      Throws:
      Exception
    • testInheritArgumentFromRecursiveTemplateApplication

      public void testInheritArgumentFromRecursiveTemplateApplication() throws Exception
      Throws:
      Exception
    • testDeliberateRecursiveTemplateApplication

      public void testDeliberateRecursiveTemplateApplication() throws Exception
      Throws:
      Exception
    • testImmediateTemplateAsAttributeLoop

      public void testImmediateTemplateAsAttributeLoop() throws Exception
      Throws:
      Exception
    • testTemplateAlias

      public void testTemplateAlias() throws Exception
      Throws:
      Exception
    • testTemplateGetPropertyGetsAttribute

      public void testTemplateGetPropertyGetsAttribute() throws Exception
      Throws:
      Exception
    • testComplicatedIndirectTemplateApplication

      public void testComplicatedIndirectTemplateApplication() throws Exception
      Throws:
      Exception
    • testIndirectTemplateApplication

      public void testIndirectTemplateApplication() throws Exception
      Throws:
      Exception
    • testIndirectTemplateWithArgsApplication

      public void testIndirectTemplateWithArgsApplication() throws Exception
      Throws:
      Exception
    • testNullIndirectTemplateApplication

      public void testNullIndirectTemplateApplication() throws Exception
      Throws:
      Exception
    • testNullIndirectTemplate

      public void testNullIndirectTemplate() throws Exception
      Throws:
      Exception
    • testHashMapPropertyFetch

      public void testHashMapPropertyFetch() throws Exception
      Throws:
      Exception
    • testHashMapPropertyFetchEmbeddedStringTemplate

      public void testHashMapPropertyFetchEmbeddedStringTemplate() throws Exception
      Throws:
      Exception
    • testEmbeddedComments

      public void testEmbeddedComments() throws Exception
      Throws:
      Exception
    • testEmbeddedCommentsAngleBracketed

      public void testEmbeddedCommentsAngleBracketed() throws Exception
      Throws:
      Exception
    • testLineBreak

      public void testLineBreak() throws Exception
      Throws:
      Exception
    • testLineBreak2

      public void testLineBreak2() throws Exception
      Throws:
      Exception
    • testLineBreakNoWhiteSpace

      public void testLineBreakNoWhiteSpace() throws Exception
      Throws:
      Exception
    • testLineBreakDollar

      public void testLineBreakDollar() throws Exception
      Throws:
      Exception
    • testLineBreakDollar2

      public void testLineBreakDollar2() throws Exception
      Throws:
      Exception
    • testLineBreakNoWhiteSpaceDollar

      public void testLineBreakNoWhiteSpaceDollar() throws Exception
      Throws:
      Exception
    • testCharLiterals

      public void testCharLiterals() throws Exception
      Throws:
      Exception
    • testNewlineNormalizationInTemplateString

      public void testNewlineNormalizationInTemplateString() throws Exception
      Throws:
      Exception
    • testNewlineNormalizationInTemplateStringPC

      public void testNewlineNormalizationInTemplateStringPC() throws Exception
      Throws:
      Exception
    • testNewlineNormalizationInAttribute

      public void testNewlineNormalizationInAttribute() throws Exception
      Throws:
      Exception
    • testUnicodeLiterals

      public void testUnicodeLiterals() throws Exception
      Throws:
      Exception
    • testEmptyIteratedValueGetsSeparator

      public void testEmptyIteratedValueGetsSeparator() throws Exception
      Throws:
      Exception
    • testMissingIteratedConditionalValueGetsNOSeparator

      public void testMissingIteratedConditionalValueGetsNOSeparator() throws Exception
      Throws:
      Exception
    • testMissingIteratedConditionalValueGetsNOSeparator2

      public void testMissingIteratedConditionalValueGetsNOSeparator2() throws Exception
      Throws:
      Exception
    • testMissingIteratedDoubleConditionalValueGetsNOSeparator

      public void testMissingIteratedDoubleConditionalValueGetsNOSeparator() throws Exception
      Throws:
      Exception
    • testIteratedConditionalWithEmptyElseValueGetsSeparator

      public void testIteratedConditionalWithEmptyElseValueGetsSeparator() throws Exception
      Throws:
      Exception
    • testWhiteSpaceAtEndOfTemplate

      public void testWhiteSpaceAtEndOfTemplate() throws Exception
      Throws:
      Exception
    • testSizeZeroButNonNullListGetsNoOutput

      public void testSizeZeroButNonNullListGetsNoOutput() throws Exception
      Throws:
      Exception
    • testNullListGetsNoOutput

      public void testNullListGetsNoOutput() throws Exception
      Throws:
      Exception
    • testEmptyListGetsNoOutput

      public void testEmptyListGetsNoOutput() throws Exception
      Throws:
      Exception
    • testEmptyListNoIteratorGetsNoOutput

      public void testEmptyListNoIteratorGetsNoOutput() throws Exception
      Throws:
      Exception
    • testEmptyExprAsFirstLineGetsNoOutput

      public void testEmptyExprAsFirstLineGetsNoOutput() throws Exception
      Throws:
      Exception
    • testSizeZeroOnLineByItselfGetsNoOutput

      public void testSizeZeroOnLineByItselfGetsNoOutput() throws Exception
      Throws:
      Exception
    • testSizeZeroOnLineWithIndentGetsNoOutput

      public void testSizeZeroOnLineWithIndentGetsNoOutput() throws Exception
      Throws:
      Exception
    • testSimpleAutoIndent

      public void testSimpleAutoIndent() throws Exception
      Throws:
      Exception
    • testComputedPropertyName

      public void testComputedPropertyName() throws Exception
      Throws:
      Exception
    • testNonNullButEmptyIteratorTestsFalse

      public void testNonNullButEmptyIteratorTestsFalse() throws Exception
      Throws:
      Exception
    • testDoNotInheritAttributesThroughFormalArgs

      public void testDoNotInheritAttributesThroughFormalArgs() throws Exception
      Throws:
      Exception
    • testArgEvaluationContext

      public void testArgEvaluationContext() throws Exception
      Throws:
      Exception
    • testPassThroughAttributes

      public void testPassThroughAttributes() throws Exception
      Throws:
      Exception
    • testPassThroughAttributes2

      public void testPassThroughAttributes2() throws Exception
      Throws:
      Exception
    • testDefaultArgument

      public void testDefaultArgument() throws Exception
      Throws:
      Exception
    • testDefaultArgument2

      public void testDefaultArgument2() throws Exception
      Throws:
      Exception
    • testDefaultArgumentManuallySet

      public void testDefaultArgumentManuallySet() throws Exception
      Throws:
      Exception
    • testDefaultArgumentImplicitlySet

      public void testDefaultArgumentImplicitlySet() throws Exception
      This fails because checkNullAttributeAgainstFormalArguments looks for a formal argument at the current level not of the original embedded template. We have defined it all the way in the embedded, but there is no value so we try to look upwards ala dynamic scoping. When it reaches the top, it doesn't find a value but it will miss the formal argument down in the embedded. By definition, though, the formal parameter exists if we have a default value. look up the value to see if it's null without checking checkNullAttributeAgainstFormalArguments.
      Throws:
      Exception
    • testDefaultArgumentAsTemplate

      public void testDefaultArgumentAsTemplate() throws Exception
      Throws:
      Exception
    • testDefaultArgumentAsTemplate2

      public void testDefaultArgumentAsTemplate2() throws Exception
      Throws:
      Exception
    • testDoNotUseDefaultArgument

      public void testDoNotUseDefaultArgument() throws Exception
      Throws:
      Exception
    • testDefaultArgumentInParensToEvalEarly

      public void testDefaultArgumentInParensToEvalEarly() throws Exception
      Throws:
      Exception
    • testArgumentsAsTemplates

      public void testArgumentsAsTemplates() throws Exception
      Throws:
      Exception
    • testTemplateArgumentEvaluatedInSurroundingContext

      public void testTemplateArgumentEvaluatedInSurroundingContext() throws Exception
      Throws:
      Exception
    • testArgumentsAsTemplatesDefaultDelimiters

      public void testArgumentsAsTemplatesDefaultDelimiters() throws Exception
      Throws:
      Exception
    • testDefaultArgsWhenNotInvoked

      public void testDefaultArgsWhenNotInvoked() throws Exception
      Throws:
      Exception
    • testRendererForST

      public void testRendererForST() throws Exception
      Throws:
      Exception
    • testRendererWithFormat

      public void testRendererWithFormat() throws Exception
      Throws:
      Exception
    • testRendererWithFormatAndList

      public void testRendererWithFormatAndList() throws Exception
      Throws:
      Exception
    • testRendererWithFormatAndSeparator

      public void testRendererWithFormatAndSeparator() throws Exception
      Throws:
      Exception
    • testRendererWithFormatAndSeparatorAndNull

      public void testRendererWithFormatAndSeparatorAndNull() throws Exception
      Throws:
      Exception
    • testEmbeddedRendererSeesEnclosing

      public void testEmbeddedRendererSeesEnclosing() throws Exception
      Throws:
      Exception
    • testRendererForGroup

      public void testRendererForGroup() throws Exception
      Throws:
      Exception
    • testOverriddenRenderer

      public void testOverriddenRenderer() throws Exception
      Throws:
      Exception
    • testMap

      public void testMap() throws Exception
      Throws:
      Exception
    • testMapValuesAreTemplates

      public void testMapValuesAreTemplates() throws Exception
      Throws:
      Exception
    • testMapKeyLookupViaTemplate

      public void testMapKeyLookupViaTemplate() throws Exception
      Throws:
      Exception
    • testMapMissingDefaultValueIsEmpty

      public void testMapMissingDefaultValueIsEmpty() throws Exception
      Throws:
      Exception
    • testMapHiddenByFormalArg

      public void testMapHiddenByFormalArg() throws Exception
      Throws:
      Exception
    • testMapEmptyValueAndAngleBracketStrings

      public void testMapEmptyValueAndAngleBracketStrings() throws Exception
      Throws:
      Exception
    • testMapDefaultValue

      public void testMapDefaultValue() throws Exception
      Throws:
      Exception
    • testMapEmptyDefaultValue

      public void testMapEmptyDefaultValue() throws Exception
      Throws:
      Exception
    • testMapDefaultValueIsKey

      public void testMapDefaultValueIsKey() throws Exception
      Throws:
      Exception
    • testMapDefaultStringAsKey

      public void testMapDefaultStringAsKey() throws Exception
      Test that a map can have only the default entry.

      Bug ref: JIRA bug ST-15 (Fixed)

      Throws:
      Exception
    • testMapDefaultIsDefaultString

      public void testMapDefaultIsDefaultString() throws Exception
      Test that a map can return a string with the word: default.

      Bug ref: JIRA bug ST-15 (Fixed)

      Throws:
      Exception
    • testMapViaEnclosingTemplates

      public void testMapViaEnclosingTemplates() throws Exception
      Throws:
      Exception
    • testMapViaEnclosingTemplates2

      public void testMapViaEnclosingTemplates2() throws Exception
      Throws:
      Exception
    • testEmptyGroupTemplate

      public void testEmptyGroupTemplate() throws Exception
      Throws:
      Exception
    • testEmptyStringAndEmptyAnonTemplateAsParameterUsingAngleBracketLexer

      public void testEmptyStringAndEmptyAnonTemplateAsParameterUsingAngleBracketLexer() throws Exception
      Throws:
      Exception
    • testEmptyStringAndEmptyAnonTemplateAsParameterUsingDollarLexer

      public void testEmptyStringAndEmptyAnonTemplateAsParameterUsingDollarLexer() throws Exception
      Throws:
      Exception
    • test8BitEuroChars

      public void test8BitEuroChars() throws Exception
      FIXME: Dannish does not work if typed directly in with default file encoding on windows. The character needs to be escaped as bellow. Please correct to escape the correct charcter.
      Throws:
      Exception
    • test16BitUnicodeChar

      public void test16BitUnicodeChar() throws Exception
      Throws:
      Exception
    • testFirstOp

      public void testFirstOp() throws Exception
      Throws:
      Exception
    • testTruncOp

      public void testTruncOp() throws Exception
      Throws:
      Exception
    • testRestOp

      public void testRestOp() throws Exception
      Throws:
      Exception
    • testRestOpEmptyList

      public void testRestOpEmptyList() throws Exception
      Throws:
      Exception
    • testReUseOfRestResult

      public void testReUseOfRestResult() throws Exception
      Throws:
      Exception
    • testLastOp

      public void testLastOp() throws Exception
      Throws:
      Exception
    • testCombinedOp

      public void testCombinedOp() throws Exception
      Throws:
      Exception
    • testCatListAndSingleAttribute

      public void testCatListAndSingleAttribute() throws Exception
      Throws:
      Exception
    • testReUseOfCat

      public void testReUseOfCat() throws Exception
      Throws:
      Exception
    • testCatListAndEmptyAttributes

      public void testCatListAndEmptyAttributes() throws Exception
      Throws:
      Exception
    • testNestedOp

      public void testNestedOp() throws Exception
      Throws:
      Exception
    • testFirstWithOneAttributeOp

      public void testFirstWithOneAttributeOp() throws Exception
      Throws:
      Exception
    • testLastWithOneAttributeOp

      public void testLastWithOneAttributeOp() throws Exception
      Throws:
      Exception
    • testLastWithLengthOneListAttributeOp

      public void testLastWithLengthOneListAttributeOp() throws Exception
      Throws:
      Exception
    • testRestWithOneAttributeOp

      public void testRestWithOneAttributeOp() throws Exception
      Throws:
      Exception
    • testRestWithLengthOneListAttributeOp

      public void testRestWithLengthOneListAttributeOp() throws Exception
      Throws:
      Exception
    • testRepeatedRestOp

      public void testRepeatedRestOp() throws Exception
      Throws:
      Exception
    • testRepeatedIteratedAttrFromArg

      public void testRepeatedIteratedAttrFromArg() throws Exception
      If an iterator is sent into ST, it must be cannot be reset after each use so repeated refs yield empty values. This would work if we passed in a List not an iterator. Avoid sending in iterators if you ref it twice.
      Throws:
      Exception
    • testIncomingLists

      public void testIncomingLists() throws Exception
      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. Seems like first, tail do not have same problem as they yield objects. Maybe make a RestIterator like I have CatIterator.
      Throws:
      Exception
    • testIncomingListsAreNotModified

      public void testIncomingListsAreNotModified() throws Exception
      Throws:
      Exception
    • testIncomingListsAreNotModified2

      public void testIncomingListsAreNotModified2() throws Exception
      Throws:
      Exception
    • testIncomingArraysAreOk

      public void testIncomingArraysAreOk() throws Exception
      Throws:
      Exception
    • testMultipleRefsToListAttribute

      public void testMultipleRefsToListAttribute() throws Exception
      Throws:
      Exception
    • testApplyTemplateWithSingleFormalArgs

      public void testApplyTemplateWithSingleFormalArgs() throws Exception
      Throws:
      Exception
    • testApplyTemplateWithNoFormalArgs

      public void testApplyTemplateWithNoFormalArgs() throws Exception
      Throws:
      Exception
    • testAnonTemplateArgs

      public void testAnonTemplateArgs() throws Exception
      Throws:
      Exception
    • testAnonTemplateWithArgHasNoITArg

      public void testAnonTemplateWithArgHasNoITArg() throws Exception
      Throws:
      Exception
    • testAnonTemplateArgs2

      public void testAnonTemplateArgs2() throws Exception
      Throws:
      Exception
    • testFirstWithCatAttribute

      public void testFirstWithCatAttribute() throws Exception
      Throws:
      Exception
    • testFirstWithListOfMaps

      public void testFirstWithListOfMaps() throws Exception
      Throws:
      Exception
    • testJustCat

      public void testJustCat() throws Exception
      Throws:
      Exception
    • testCat2Attributes

      public void testCat2Attributes() throws Exception
      Throws:
      Exception
    • testCat2AttributesWithApply

      public void testCat2AttributesWithApply() throws Exception
      Throws:
      Exception
    • testCat3Attributes

      public void testCat3Attributes() throws Exception
      Throws:
      Exception
    • testCatWithTemplateApplicationAsElement

      public void testCatWithTemplateApplicationAsElement() throws Exception
      Throws:
      Exception
    • testCatWithIFAsElement

      public void testCatWithIFAsElement() throws Exception
      Throws:
      Exception
    • testCatWithNullTemplateApplicationAsElement

      public void testCatWithNullTemplateApplicationAsElement() throws Exception
      Throws:
      Exception
    • testCatWithNestedTemplateApplicationAsElement

      public void testCatWithNestedTemplateApplicationAsElement() throws Exception
      Throws:
      Exception
    • testListAsTemplateArgument

      public void testListAsTemplateArgument() throws Exception
      Throws:
      Exception
    • testSingleExprTemplateArgument

      public void testSingleExprTemplateArgument() throws Exception
      Throws:
      Exception
    • testSingleExprTemplateArgumentInApply

      public void testSingleExprTemplateArgumentInApply() throws Exception
      Throws:
      Exception
    • testSoleFormalTemplateArgumentInMultiApply

      public void testSoleFormalTemplateArgumentInMultiApply() throws Exception
      Throws:
      Exception
    • testSingleExprTemplateArgumentError

      public void testSingleExprTemplateArgumentError() throws Exception
      Throws:
      Exception
    • testInvokeIndirectTemplateWithSingleFormalArgs

      public void testInvokeIndirectTemplateWithSingleFormalArgs() throws Exception
      Throws:
      Exception
    • testParallelAttributeIteration

      public void testParallelAttributeIteration() throws Exception
      Throws:
      Exception
    • testParallelAttributeIterationWithNullValue

      public void testParallelAttributeIterationWithNullValue() throws Exception
      Throws:
      Exception
    • testParallelAttributeIterationHasI

      public void testParallelAttributeIterationHasI() throws Exception
      Throws:
      Exception
    • testParallelAttributeIterationWithDifferentSizes

      public void testParallelAttributeIterationWithDifferentSizes() throws Exception
      Throws:
      Exception
    • testParallelAttributeIterationWithSingletons

      public void testParallelAttributeIterationWithSingletons() throws Exception
      Throws:
      Exception
    • testParallelAttributeIterationWithMismatchArgListSizes

      public void testParallelAttributeIterationWithMismatchArgListSizes() throws Exception
      Throws:
      Exception
    • testParallelAttributeIterationWithMissingArgs

      public void testParallelAttributeIterationWithMissingArgs() throws Exception
      Throws:
      Exception
    • testParallelAttributeIterationWithDifferentSizesTemplateRefInsideToo

      public void testParallelAttributeIterationWithDifferentSizesTemplateRefInsideToo() throws Exception
      Throws:
      Exception
    • testAnonTemplateOnLeftOfApply

      public void testAnonTemplateOnLeftOfApply() throws Exception
      Throws:
      Exception
    • testOverrideThroughConditional

      public void testOverrideThroughConditional() throws Exception
      Throws:
      Exception
    • testNonPublicPropertyAccess

      public void testNonPublicPropertyAccess() throws Exception
      Throws:
      Exception
    • testIndexVar

      public void testIndexVar() throws Exception
      Throws:
      Exception
    • testIndex0Var

      public void testIndex0Var() throws Exception
      Throws:
      Exception
    • testIndexVarWithMultipleExprs

      public void testIndexVarWithMultipleExprs() throws Exception
      Throws:
      Exception
    • testIndex0VarWithMultipleExprs

      public void testIndex0VarWithMultipleExprs() throws Exception
      Throws:
      Exception
    • testArgumentContext

      public void testArgumentContext() throws Exception
      Throws:
      Exception
    • testNoDotsInAttributeNames

      public void testNoDotsInAttributeNames() throws Exception
      Throws:
      Exception
    • testNoDotsInTemplateNames

      public void testNoDotsInTemplateNames() throws Exception
      Throws:
      Exception
    • testLineWrap

      public void testLineWrap() throws Exception
      Throws:
      Exception
    • testLineWrapWithNormalizedNewlines

      public void testLineWrapWithNormalizedNewlines() throws Exception
      Throws:
      Exception
    • testLineWrapAnchored

      public void testLineWrapAnchored() throws Exception
      Throws:
      Exception
    • testSubtemplatesAnchorToo

      public void testSubtemplatesAnchorToo() throws Exception
      Throws:
      Exception
    • testFortranLineWrap

      public void testFortranLineWrap() throws Exception
      Throws:
      Exception
    • testLineWrapWithDiffAnchor

      public void testLineWrapWithDiffAnchor() throws Exception
      Throws:
      Exception
    • testLineWrapEdgeCase

      public void testLineWrapEdgeCase() throws Exception
      Throws:
      Exception
    • testLineWrapLastCharIsNewline

      public void testLineWrapLastCharIsNewline() throws Exception
      Throws:
      Exception
    • testLineWrapCharAfterWrapIsNewline

      public void testLineWrapCharAfterWrapIsNewline() throws Exception
      Throws:
      Exception
    • testLineWrapForAnonTemplate

      public void testLineWrapForAnonTemplate() throws Exception
      Throws:
      Exception
    • testLineWrapForAnonTemplateAnchored

      public void testLineWrapForAnonTemplateAnchored() throws Exception
      Throws:
      Exception
    • testLineWrapForAnonTemplateComplicatedWrap

      public void testLineWrapForAnonTemplateComplicatedWrap() throws Exception
      Throws:
      Exception
    • testIndentBeyondLineWidth

      public void testIndentBeyondLineWidth() throws Exception
      Throws:
      Exception
    • testIndentedExpr

      public void testIndentedExpr() throws Exception
      Throws:
      Exception
    • testNestedIndentedExpr

      public void testNestedIndentedExpr() throws Exception
      Throws:
      Exception
    • testNestedWithIndentAndTrackStartOfExpr

      public void testNestedWithIndentAndTrackStartOfExpr() throws Exception
      Throws:
      Exception
    • testLineDoesNotWrapDueToLiteral

      public void testLineDoesNotWrapDueToLiteral() throws Exception
      Throws:
      Exception
    • testSingleValueWrap

      public void testSingleValueWrap() throws Exception
      Throws:
      Exception
    • testLineWrapInNestedExpr

      public void testLineWrapInNestedExpr() throws Exception
      Throws:
      Exception
    • testBackslash

      public void testBackslash() throws Exception
      Throws:
      Exception
    • testBackslash2

      public void testBackslash2() throws Exception
      Throws:
      Exception
    • testEscapeEscape

      public void testEscapeEscape() throws Exception
      Throws:
      Exception
    • testEscapeEscapeNestedAngle

      public void testEscapeEscapeNestedAngle() throws Exception
      Throws:
      Exception
    • testListOfIntArrays

      public void testListOfIntArrays() throws Exception
      Throws:
      Exception
    • testNullOptionSingleNullValue

      public void testNullOptionSingleNullValue() throws Exception
      Throws:
      Exception
    • testNullOptionHasEmptyNullValue

      public void testNullOptionHasEmptyNullValue() throws Exception
      Throws:
      Exception
    • testNullOptionSingleNullValueInList

      public void testNullOptionSingleNullValueInList() throws Exception
      Throws:
      Exception
    • testNullValueInList

      public void testNullValueInList() throws Exception
      Throws:
      Exception
    • testNullValueInListNoNullOption

      public void testNullValueInListNoNullOption() throws Exception
      Throws:
      Exception
    • testNullValueInListWithTemplateApply

      public void testNullValueInListWithTemplateApply() throws Exception
      Throws:
      Exception
    • testNullValueInListWithTemplateApplyNullFirstValue

      public void testNullValueInListWithTemplateApplyNullFirstValue() throws Exception
      Throws:
      Exception
    • testNullSingleValueInListWithTemplateApply

      public void testNullSingleValueInListWithTemplateApply() throws Exception
      Throws:
      Exception
    • testNullSingleValueWithTemplateApply

      public void testNullSingleValueWithTemplateApply() throws Exception
      Throws:
      Exception
    • testLengthOp

      public void testLengthOp() throws Exception
      Throws:
      Exception
    • testLengthOpWithMap

      public void testLengthOpWithMap() throws Exception
      Throws:
      Exception
    • testLengthOpWithSet

      public void testLengthOpWithSet() throws Exception
      Throws:
      Exception
    • testLengthOpNull

      public void testLengthOpNull() throws Exception
      Throws:
      Exception
    • testLengthOpSingleValue

      public void testLengthOpSingleValue() throws Exception
      Throws:
      Exception
    • testLengthOpPrimitive

      public void testLengthOpPrimitive() throws Exception
      Throws:
      Exception
    • testLengthOpOfListWithNulls

      public void testLengthOpOfListWithNulls() throws Exception
      Throws:
      Exception
    • testStripOpOfListWithNulls

      public void testStripOpOfListWithNulls() throws Exception
      Throws:
      Exception
    • testStripOpOfListOfListsWithNulls

      public void testStripOpOfListOfListsWithNulls() throws Exception
      Throws:
      Exception
    • testStripOpOfSingleAlt

      public void testStripOpOfSingleAlt() throws Exception
      Throws:
      Exception
    • testStripOpOfNull

      public void testStripOpOfNull() throws Exception
      Throws:
      Exception
    • testReUseOfStripResult

      public void testReUseOfStripResult() throws Exception
      Throws:
      Exception
    • testLengthOpOfStrippedListWithNulls

      public void testLengthOpOfStrippedListWithNulls() throws Exception
      Throws:
      Exception
    • testLengthOpOfStrippedListWithNullsFrontAndBack

      public void testLengthOpOfStrippedListWithNullsFrontAndBack() throws Exception
      Throws:
      Exception
    • testMapKeys

      public void testMapKeys() throws Exception
      Throws:
      Exception
    • testMapValues

      public void testMapValues() throws Exception
      Throws:
      Exception
    • testMapKeysWithIntegerType

      public void testMapKeysWithIntegerType() throws Exception
      Throws:
      Exception
    • testSuperReferenceInIfClause

      public void testSuperReferenceInIfClause() throws Exception
      Check what happens when a semicolon is appended to a single line template Should fail with a parse error(?) and not a missing template error. FIXME: This should generate a warning or error about that semi colon.

      Bug ref: JIRA bug ST-2

      Throws:
      Exception
    • testListLiteralWithEmptyElements

      public void testListLiteralWithEmptyElements() throws Exception
      Added feature for ST-21
      Throws:
      Exception
    • testTemplateApplicationAsOptionValue

      public void testTemplateApplicationAsOptionValue() throws Exception
      Throws:
      Exception
    • writeFile

      public static void writeFile(String dir, String fileName, String content)