1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 00:12:29 +03:00

Add a unit test for method roundtrips

This commit is contained in:
joshvera 2018-07-05 15:21:25 -04:00
parent ceebdbdfc2
commit c05e7e76aa

View File

@ -11,6 +11,7 @@ import Proto3.Suite
import qualified Proto3.Wire.Encode as E
import qualified Data.Syntax.Literal as Literal
import qualified Data.Syntax.Statement as Statement
import qualified Data.Syntax.Declaration as Declaration
import Data.Term (Term)
import Data.Sum
import Language.JSON.Assignment (Syntax)
@ -67,6 +68,10 @@ spec = parallel $ do
prop "roundtrips" $
\sp -> shouldRoundtrip1 @Statement.Statements @(Term (Sum Syntax) ()) (unListableF sp)
describe "methods" $
prop "roundtrips" $
\sp -> shouldRoundtrip1 @Declaration.Method @(Term (Sum Syntax) ()) (unListableF sp)
describe "blobs" $ do
it "should roundtrip given a Message instance" $ do
let bl = Blob (fromUTF8 "puts 'hi'") "example.rb" Ruby