added enum pretty printing tests

This commit is contained in:
macocianradu
2022-01-12 14:41:28 +02:00
parent a8c5438d79
commit 07d4cc73e0
10 changed files with 122 additions and 13 deletions

View File

@@ -0,0 +1,13 @@
{-The enumerated values to specified the period, e.g. day, week.-}
data PeriodEnum =
{-Day-}
D
{-Month-}
| M
{-Year-}
| Y
instance Show PeriodEnum where
show D = "day"
show M = "month"
show Y = "year"

View File

@@ -0,0 +1,13 @@
{-The enumerated values to specified the period, e.g. day, week.-}
data EnumWithoutDisplay =
{-Day-}
D
{-Month-}
| M
{-Year-}
| Y
instance Show EnumWithoutDisplay where
show D = "D"
show M = "M"
show Y = "Y"

View File

@@ -0,0 +1,7 @@
data EnumWithoutDescription =
X
| Y
instance Show EnumWithoutDescription where
show X = "xs"
show Y = "ys"

View File

@@ -35,9 +35,9 @@ func EquityPriceObservation: <"Function specification for the observation of an
func Something: <"asd">
inputs:
equity1 boolean (1..1)
determinationMethod ObservationPrimitive (1..1)
equity1 boolean (1..1)
valuationTime ObservationPrimitive (1..1)
output:
valuation ObservationPrimitive (0..1)
valuation ObservationPrimitive (0..*)
assign-output: if True and False then determinationMethod
assign-output: if True and False then valuationTime

View File

@@ -1,11 +1,44 @@
func EquityPriceObservation: <"Function specification for the observation of an equity price, based on the attributes of the 'EquityValuation' class.">
inputs:
equity Equity (1..1)
valuationDate AdjustableOrRelativeDate (1..1)
valuationTime BusinessCenterTime (0..1)
timeType TimeTypeEnum (0..1)
determinationMethod DeterminationMethodEnum (1..*)
equity int (1..1)
determinationMethod ObservationPrimitive (1..1)
output:
observation ObservationPrimitive (1..1)
observation ObservationPrimitive (0..1)
assign-output: if asd exists then var2
assign-output: if True and False then valuationDate
func EquityPriceObservation: <"Function specification for the observation of an equity price, based on the attributes of the 'EquityValuation' class.">
inputs:
equity int (1..1)
determinationMethod ObservationPrimitive (1..1)
output:
observation ObservationPrimitive (0..*)
assign-output: if True and False then valuationDate
func EquityPriceObservation: <"Function specification for the observation of an equity price, based on the attributes of the 'EquityValuation' class.">
inputs:
equity int (1..1)
determinationMethod ObservationPrimitive (1..1)
output:
observation ObservationPrimitive (1..1)
assign-output: if True and False then valuationDate
func EquityPriceObservation: <"Function specification for the observation of an equity price, based on the attributes of the 'EquityValuation' class.">
inputs:
equity int (1..1)
determinationMethod ObservationPrimitive (1..1)
output:
observation ObservationPrimitive (1..*)
assign-output: if True and False then valuationDate
func EquityPriceObservation: <"Function specification for the observation of an equity price, based on the attributes of the 'EquityValuation' class.">
inputs:
equity int (1..1)
determinationMethod ObservationPrimitive (1..1)
output:
observation ObservationPrimitive (*..*)
assign-output: if True and False then valuationDate