File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed
stbx-protocol/test/Statebox/Protocol Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change 11module Test.Statebox.Protocol.Fire where
22
33import Prelude
4+ import Data.Either (Either (..))
5+ import Data.Maybe (Maybe (..))
6+ import Data.NonEmpty (NonEmpty (..))
47import Test.Spec (Spec , describe , it )
58import Test.Spec.Assertions (shouldEqual )
69
10+ import Statebox.Core.Wiring (NetsAndDiagramsIndex (..))
11+ import Statebox.Protocol.Fire (FiringError (..), fire )
12+
713suite :: Spec Unit
814suite = do
915 describe " Firing a firing" do
10- it " should work" do
11- 1 `shouldEqual` 1
16+ it " fails if the wiring is not valid" do
17+ -- the only relevant thing here is that the wiring is not valid
18+ let wiring = { diagrams: [{ name: " diagram"
19+ , names: []
20+ , pixels: [1 , 2 ]
21+ , width: 1
22+ }]
23+ , nets : []
24+ , labels : [NetsAndDiagramsIndex 5 ]
25+ }
26+ firing = { execution : Nothing
27+ , message: Nothing
28+ , path: NonEmpty 3 []
29+ }
30+ marking = mempty
31+ fire wiring firing marking `shouldEqual` Left FireInvalidWiringTree
You can’t perform that action at this time.
0 commit comments