Skip to content

Commit

Permalink
Some adjustments.
Browse files Browse the repository at this point in the history
  • Loading branch information
krymtkts committed Dec 23, 2023
1 parent cf6560a commit 6720c3b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
8 changes: 2 additions & 6 deletions src/pocof.Test/PocofData.fs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ module ``Action fromString should returns`` =
String.lower a.Name
String.upper a.Name ]
|> List.map Action.fromString
|> List.iter (fun s ->
s
|> shouldEqual (Ok(FSharpValue.MakeUnion(a, [||]) :?> Action))))
|> List.iter (shouldEqual (Ok(FSharpValue.MakeUnion(a, [||]) :?> Action))))

let ``Error Unknown.``<'a> (fromString: string -> 'a) =
shouldFail (fun () -> fromString "Unknown" |> ignore)
Expand All @@ -41,9 +39,7 @@ let ``known matchers.``<'a> (fromString: string -> 'a) =
String.lower a.Name
String.upper a.Name ]
|> List.map fromString
|> List.iter (fun s ->
s
|> shouldEqual (FSharpValue.MakeUnion(a, [||]) :?> 'a)))
|> List.iter (shouldEqual (FSharpValue.MakeUnion(a, [||]) :?> 'a)))

module ``Matcher fromString should returns`` =
[<Fact>]
Expand Down
2 changes: 1 addition & 1 deletion src/pocof.Test/PocofQuery.fs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ module run =
let props = Map []

open System.Collections
let mapToDict = List.map (PocofData.Dict)
let mapToDict = List.map PocofData.Dict

let entries =
mapToDict [ DictionaryEntry("John", "Doe")
Expand Down
3 changes: 1 addition & 2 deletions src/pocof/Data.fs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ module PocofData =

let unwrap (entries: Entry list) =
entries
|> List.map (fun o ->
match o with
|> List.map (function
| Dict (dct) -> dct :> obj
| Obj (o) -> o)

Expand Down

0 comments on commit 6720c3b

Please sign in to comment.