Skip to content

Commit 5e0013e

Browse files
authored
Add test for prepost (#629)
1 parent ddb3ab1 commit 5e0013e

4 files changed

Lines changed: 1863 additions & 1 deletion

File tree

lib/haskell/natural4/src/LS/XPile/AaJson.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ import Data.Aeson.Encode.Pretty (encodePretty)
7272

7373
labelToAaJson :: AA.Label T.Text -> Value
7474
labelToAaJson (AA.Pre a) = object [ "Pre" .= a ]
75-
labelToAaJson (AA.PrePost a b) = object [ "PrePost" .= [a,b] ]
75+
labelToAaJson (AA.PrePost a b) = object [ "Pre" .= a, "Post" .= b ]
7676
labelToAaJson (AA.Metadata a) = object [ "Metadata" .= a ]
7777

7878
bsToAaJson :: BoolStructLT -> Value

lib/haskell/natural4/test/LS/XPile/AaJsonSpec.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,8 @@ spec = do
114114
it "convert must sing to AaJson" do
115115
rodents_purs <- transpileFile "rodents"
116116
pure $ goldenGeneric "rodents" rodents_purs
117+
118+
describe "pdpa" do
119+
it "convert must sing to AaJson" do
120+
rodents_purs <- transpileFile "pdpa"
121+
pure $ goldenGeneric "pdpa" rodents_purs

0 commit comments

Comments
 (0)