Overview  Index  Help 

SMLPPTest0009


structure SMLPPTest0009 =
struct
  structure Assert = SMLUnit.Assert
  structure Test = SMLUnit.Test
  structure Testee = SMLPP
  structure FE = Testee.FormatExpression
  structure PP = Testee.PrinterParameter
  val TESTASSOC_COLUMNS
  val prettyPrint
  val TESTASSOC_ASSOCSTRENGTH
  val makeExpression
  val assertAssoc
  val testAssoc00L1
  val testAssoc00L2
  val testAssoc00L3
  val testAssoc00L4
  val testAssoc00N1
  val testAssoc00N2
  val testAssoc00N3
  val testAssoc00N4
  val testAssoc00R1
  val testAssoc00R2
  val testAssoc00R3
  val testAssoc00R4
  val suite
end

verify that the SMLPP treats the left/right most element in guards properly in inheriting associativity from the guards to their elements.

These cases pretty-print expressions of the form as follows:

 cm{ eL Lm{ ... } ... Rm{ ... } eR }
 
c denotes assoc direction(L, N, R), and m denotes assoc strength (integer value).

If eL or eR is not Term or Guard, it should be ignored in the inheritance of associativity.

Test cases matrix
case direction(c) left-most of inner(eL) right-most of inner(eR)
00L1LTermTerm
00L2GuardGuard
00L3IndicatorIndicator
00L4StartOfIndentEndOfIndent
00N1NTermTerm
00N2GuardGuard
00N3IndicatorIndicator
00N4StartOfIndentEndOfIndent
00R1RTermTerm
00R2GuardGuard
00R3IndicatorIndicator
00R4StartOfIndentEndOfIndent

       
Value detail

TESTASSOC_COLUMNS

val TESTASSOC_COLUMNS


prettyPrint

val prettyPrint


TESTASSOC_ASSOCSTRENGTH

val TESTASSOC_ASSOCSTRENGTH


makeExpression

val makeExpression


assertAssoc

val assertAssoc


testAssoc00L1

val testAssoc00L1


testAssoc00L2

val testAssoc00L2


testAssoc00L3

val testAssoc00L3


testAssoc00L4

val testAssoc00L4


testAssoc00N1

val testAssoc00N1


testAssoc00N2

val testAssoc00N2


testAssoc00N3

val testAssoc00N3


testAssoc00N4

val testAssoc00N4


testAssoc00R1

val testAssoc00R1


testAssoc00R2

val testAssoc00R2


testAssoc00R3

val testAssoc00R3


testAssoc00R4

val testAssoc00R4


suite

val suite

 


Overview  Index  Help