From 08569ed09464ddbaf3ffd70e0d2f221d65a1196d Mon Sep 17 00:00:00 2001 From: Lukas Rieger <0x53A@users.noreply.github.com> Date: Mon, 27 Aug 2018 23:18:59 +0200 Subject: [PATCH] [Fable 2] Add test for Map.TryGetValue (#1526) * Add test for Map.TryGetValue * Fable.Tests: update FSharp.Core to 4.5.2 --- tests/Main/Fable.Tests.fsproj | 1 + tests/Main/MapTests.fs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/tests/Main/Fable.Tests.fsproj b/tests/Main/Fable.Tests.fsproj index 8d5f73e1ca..bf8065c06d 100644 --- a/tests/Main/Fable.Tests.fsproj +++ b/tests/Main/Fable.Tests.fsproj @@ -5,6 +5,7 @@ + diff --git a/tests/Main/MapTests.fs b/tests/Main/MapTests.fs index dbde7f3ea9..1414974119 100644 --- a/tests/Main/MapTests.fs +++ b/tests/Main/MapTests.fs @@ -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