elm-format
parent
5cdb4fad33
commit
20b4ea2f5c
|
@ -61,6 +61,7 @@ append sm2 sm1 =
|
||||||
List.foldl insert sm1 (values sm2)
|
List.foldl insert sm1 (values sm2)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- {-| Remove any floating empty Mashdicts from ALL keys in the dictionary.
|
-- {-| Remove any floating empty Mashdicts from ALL keys in the dictionary.
|
||||||
-- -}
|
-- -}
|
||||||
-- cleanAll : StateManager -> StateManager
|
-- cleanAll : StateManager -> StateManager
|
||||||
|
|
|
@ -19,6 +19,7 @@ fuzzer =
|
||||||
Fuzz.string
|
Fuzz.string
|
||||||
(Fuzz.maybe unsignedDataFuzzer)
|
(Fuzz.maybe unsignedDataFuzzer)
|
||||||
|
|
||||||
|
|
||||||
{-| Fuzzer for an event with a set state key
|
{-| Fuzzer for an event with a set state key
|
||||||
-}
|
-}
|
||||||
fuzzerState : Fuzzer Event
|
fuzzerState : Fuzzer Event
|
||||||
|
@ -26,10 +27,10 @@ fuzzerState =
|
||||||
Fuzz.map2
|
Fuzz.map2
|
||||||
(\event default ->
|
(\event default ->
|
||||||
{ event
|
{ event
|
||||||
| stateKey =
|
| stateKey =
|
||||||
event.stateKey
|
event.stateKey
|
||||||
|> Maybe.withDefault default
|
|> Maybe.withDefault default
|
||||||
|> Maybe.Just
|
|> Maybe.Just
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
fuzzer
|
fuzzer
|
||||||
|
|
|
@ -112,6 +112,7 @@ suite =
|
||||||
|> StateManager.member event
|
|> StateManager.member event
|
||||||
|> Expect.equal True
|
|> Expect.equal True
|
||||||
)
|
)
|
||||||
|
|
||||||
-- , fuzz2 TestEvent.fuzzerState TestEvent.fuzzerState
|
-- , fuzz2 TestEvent.fuzzerState TestEvent.fuzzerState
|
||||||
-- "singleton has no other members"
|
-- "singleton has no other members"
|
||||||
-- (\e1 e2 ->
|
-- (\e1 e2 ->
|
||||||
|
@ -124,7 +125,8 @@ suite =
|
||||||
-- |> StateManager.member e2
|
-- |> StateManager.member e2
|
||||||
-- |> Expect.equal False
|
-- |> Expect.equal False
|
||||||
-- )
|
-- )
|
||||||
, fuzz TestEvent.fuzzerState "singleton has one value"
|
, fuzz TestEvent.fuzzerState
|
||||||
|
"singleton has one value"
|
||||||
(\event ->
|
(\event ->
|
||||||
StateManager.singleton event
|
StateManager.singleton event
|
||||||
|> StateManager.values
|
|> StateManager.values
|
||||||
|
|
Loading…
Reference in New Issue