Skip to content

Commit

Permalink
Add test for prepost (#629)
Browse files Browse the repository at this point in the history
  • Loading branch information
kharus authored Feb 11, 2025
1 parent ddb3ab1 commit 5e0013e
Show file tree
Hide file tree
Showing 4 changed files with 1,863 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/haskell/natural4/src/LS/XPile/AaJson.hs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ import Data.Aeson.Encode.Pretty (encodePretty)

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

bsToAaJson :: BoolStructLT -> Value
Expand Down
5 changes: 5 additions & 0 deletions lib/haskell/natural4/test/LS/XPile/AaJsonSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,8 @@ spec = do
it "convert must sing to AaJson" do
rodents_purs <- transpileFile "rodents"
pure $ goldenGeneric "rodents" rodents_purs

describe "pdpa" do
it "convert must sing to AaJson" do
rodents_purs <- transpileFile "pdpa"
pure $ goldenGeneric "pdpa" rodents_purs
Loading

0 comments on commit 5e0013e

Please # to comment.