Skip to content

Commit

Permalink
[Fable 2] Add test for Map.TryGetValue (#1526)
Browse files Browse the repository at this point in the history
* Add test for  Map.TryGetValue

* Fable.Tests: update FSharp.Core to 4.5.2
  • Loading branch information
0x53A authored and alfonsogarciacaro committed Aug 27, 2018
1 parent 23f7c6f commit 08569ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/Main/Fable.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Expecto" Version="5.1.2" />
<PackageReference Include="FSharp.Core" Version="4.5.2" />
</ItemGroup>
<ItemGroup>
<Reference Include="Fable.Core" HintPath="../../build/fable/Fable.Core.dll" />
Expand Down
5 changes: 5 additions & 0 deletions tests/Main/MapTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ let tests =
xs.Count
|> equal 1

testCase "Map.TryGetValue works" <| fun () ->
let xs = Map.empty.Add(1, 1)
xs.TryGetValue(1)
|> equal (true, 1)

testCase "Map.containsKey works" <| fun () ->
let xs = Map.empty |> Map.add 1 1
xs |> Map.containsKey 1 |> equal true
Expand Down

0 comments on commit 08569ed

Please sign in to comment.