mirror of
https://github.com/github/semantic.git
synced 2024-12-26 08:25:19 +03:00
Add a unit test for method roundtrips
This commit is contained in:
parent
ceebdbdfc2
commit
c05e7e76aa
@ -11,6 +11,7 @@ import Proto3.Suite
|
|||||||
import qualified Proto3.Wire.Encode as E
|
import qualified Proto3.Wire.Encode as E
|
||||||
import qualified Data.Syntax.Literal as Literal
|
import qualified Data.Syntax.Literal as Literal
|
||||||
import qualified Data.Syntax.Statement as Statement
|
import qualified Data.Syntax.Statement as Statement
|
||||||
|
import qualified Data.Syntax.Declaration as Declaration
|
||||||
import Data.Term (Term)
|
import Data.Term (Term)
|
||||||
import Data.Sum
|
import Data.Sum
|
||||||
import Language.JSON.Assignment (Syntax)
|
import Language.JSON.Assignment (Syntax)
|
||||||
@ -67,6 +68,10 @@ spec = parallel $ do
|
|||||||
prop "roundtrips" $
|
prop "roundtrips" $
|
||||||
\sp -> shouldRoundtrip1 @Statement.Statements @(Term (Sum Syntax) ()) (unListableF sp)
|
\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
|
describe "blobs" $ do
|
||||||
it "should roundtrip given a Message instance" $ do
|
it "should roundtrip given a Message instance" $ do
|
||||||
let bl = Blob (fromUTF8 "puts 'hi'") "example.rb" Ruby
|
let bl = Blob (fromUTF8 "puts 'hi'") "example.rb" Ruby
|
||||||
|
Loading…
Reference in New Issue
Block a user