diff --git a/Algorithms.Tests/DataStructures/Trie.fs b/Algorithms.Tests/DataStructures/Trie.fs index 7e2ad16..0ab3da2 100644 --- a/Algorithms.Tests/DataStructures/Trie.fs +++ b/Algorithms.Tests/DataStructures/Trie.fs @@ -30,19 +30,20 @@ type TrieTests () = [] member this.``Test insert empty key``() = - let mutable trie = empty + let trie = + empty + |> insert "" - trie <- insert "" trie Assert.IsTrue(search "" trie) Assert.IsFalse(search "foo" trie) [] member this.``Test overlapping keys``() = - let mutable trie = empty - - trie <- insert "car" trie - trie <- insert "cart" trie - trie <- insert "carter" trie + let trie = + empty + |> insert "car" + |> insert "cart" + |> insert "carter" Assert.IsTrue(search "car" trie) Assert.IsTrue(search "cart" trie) @@ -51,9 +52,10 @@ type TrieTests () = [] member this.``Test partial match``() = - let mutable trie = empty + let trie = + empty + |> insert "apple" - trie <- insert "apple" trie Assert.IsFalse(search "app" trie) Assert.IsFalse(search "appl" trie) Assert.IsTrue(search "apple" trie)