diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ArrayModule.fs b/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ArrayModule.fs index d0b440ea7d2..39ec819071a 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ArrayModule.fs +++ b/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ArrayModule.fs @@ -148,15 +148,15 @@ type ArrayModule() = member this.ChunkBySize() = // int Seq - Assert.AreEqual([| [|1..4|]; [|5..8|] |], Array.chunkBySize 4 [|1..8|]) - Assert.AreEqual([| [|1..4|]; [|5..8|]; [|9..10|] |], Array.chunkBySize 4 [|1..10|]) - Assert.AreEqual([| [|1|]; [|2|]; [|3|]; [|4|] |], Array.chunkBySize 1 [|1..4|]) + Assert.IsTrue([| [|1..4|]; [|5..8|] |] = Array.chunkBySize 4 [|1..8|]) + Assert.IsTrue([| [|1..4|]; [|5..8|]; [|9..10|] |] = Array.chunkBySize 4 [|1..10|]) + Assert.IsTrue([| [|1|]; [|2|]; [|3|]; [|4|] |] = Array.chunkBySize 1 [|1..4|]) // string Seq - Assert.AreEqual([| [|"a"; "b"|]; [|"c";"d"|]; [|"e"|] |], Array.chunkBySize 2 [|"a";"b";"c";"d";"e"|]) + Assert.IsTrue([| [|"a"; "b"|]; [|"c";"d"|]; [|"e"|] |] = Array.chunkBySize 2 [|"a";"b";"c";"d";"e"|]) // empty Seq - Assert.AreEqual([||], Array.chunkBySize 3 [||]) + Assert.IsTrue([||] = Array.chunkBySize 3 [||]) // null Seq let nullArr:_[] = null @@ -172,18 +172,18 @@ type ArrayModule() = member this.SplitInto() = // int array - Assert.AreEqual([| [|1..4|]; [|5..7|]; [|8..10|] |], Array.splitInto 3 [|1..10|]) - Assert.AreEqual([| [|1..4|]; [|5..8|]; [|9..11|] |], Array.splitInto 3 [|1..11|]) - Assert.AreEqual([| [|1..4|]; [|5..8|]; [|9..12|] |], Array.splitInto 3 [|1..12|]) + Assert.IsTrue([| [|1..4|]; [|5..7|]; [|8..10|] |] = Array.splitInto 3 [|1..10|]) + Assert.IsTrue([| [|1..4|]; [|5..8|]; [|9..11|] |] = Array.splitInto 3 [|1..11|]) + Assert.IsTrue([| [|1..4|]; [|5..8|]; [|9..12|] |] = Array.splitInto 3 [|1..12|]) - Assert.AreEqual([| [|1..2|]; [|3|]; [|4|]; [|5|] |], Array.splitInto 4 [|1..5|]) - Assert.AreEqual([| [|1|]; [|2|]; [|3|]; [|4|] |], Array.splitInto 20 [|1..4|]) + Assert.IsTrue([| [|1..2|]; [|3|]; [|4|]; [|5|] |] = Array.splitInto 4 [|1..5|]) + Assert.IsTrue([| [|1|]; [|2|]; [|3|]; [|4|] |] = Array.splitInto 20 [|1..4|]) // string array - Assert.AreEqual([| [|"a"; "b"|]; [|"c";"d"|]; [|"e"|] |], Array.splitInto 3 [|"a";"b";"c";"d";"e"|]) + Assert.IsTrue([| [|"a"; "b"|]; [|"c";"d"|]; [|"e"|] |] = Array.splitInto 3 [|"a";"b";"c";"d";"e"|]) // empty array - Assert.AreEqual([| |], Array.splitInto 3 [| |]) + Assert.IsTrue([| |] = Array.splitInto 3 [| |]) // null array let nullArr:_[] = null diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ListModule.fs b/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ListModule.fs index 481decfffa7..6722bf2c057 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ListModule.fs +++ b/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ListModule.fs @@ -112,15 +112,15 @@ type ListModule() = member this.ChunkBySize() = // int list - Assert.AreEqual([ [1..4]; [5..8] ], List.chunkBySize 4 [1..8]) - Assert.AreEqual([ [1..4]; [5..8]; [9..10] ], List.chunkBySize 4 [1..10]) - Assert.AreEqual([ [1]; [2]; [3]; [4] ], List.chunkBySize 1 [1..4]) + Assert.IsTrue([ [1..4]; [5..8] ] = List.chunkBySize 4 [1..8]) + Assert.IsTrue([ [1..4]; [5..8]; [9..10] ] = List.chunkBySize 4 [1..10]) + Assert.IsTrue([ [1]; [2]; [3]; [4] ] = List.chunkBySize 1 [1..4]) // string list - Assert.AreEqual([ ["a"; "b"]; ["c";"d"]; ["e"] ], List.chunkBySize 2 ["a";"b";"c";"d";"e"]) + Assert.IsTrue([ ["a"; "b"]; ["c";"d"]; ["e"] ] = List.chunkBySize 2 ["a";"b";"c";"d";"e"]) // empty list - Assert.AreEqual([], List.chunkBySize 3 []) + Assert.IsTrue([] = List.chunkBySize 3 []) // invalidArg CheckThrowsArgumentException (fun () -> List.chunkBySize 0 [1..10] |> ignore) @@ -132,18 +132,18 @@ type ListModule() = member this.SplitInto() = // int list - Assert.AreEqual([ [1..4]; [5..7]; [8..10] ], List.splitInto 3 [1..10]) - Assert.AreEqual([ [1..4]; [5..8]; [9..11] ], List.splitInto 3 [1..11]) - Assert.AreEqual([ [1..4]; [5..8]; [9..12] ], List.splitInto 3 [1..12]) + Assert.IsTrue([ [1..4]; [5..7]; [8..10] ] = List.splitInto 3 [1..10]) + Assert.IsTrue([ [1..4]; [5..8]; [9..11] ] = List.splitInto 3 [1..11]) + Assert.IsTrue([ [1..4]; [5..8]; [9..12] ] = List.splitInto 3 [1..12]) - Assert.AreEqual([ [1..2]; [3]; [4]; [5] ], List.splitInto 4 [1..5]) - Assert.AreEqual([ [1]; [2]; [3]; [4] ], List.splitInto 20 [1..4]) + Assert.IsTrue([ [1..2]; [3]; [4]; [5] ] = List.splitInto 4 [1..5]) + Assert.IsTrue([ [1]; [2]; [3]; [4] ] = List.splitInto 20 [1..4]) // string list - Assert.AreEqual([ ["a"; "b"]; ["c";"d"]; ["e"] ], List.splitInto 3 ["a";"b";"c";"d";"e"]) + Assert.IsTrue([ ["a"; "b"]; ["c";"d"]; ["e"] ] = List.splitInto 3 ["a";"b";"c";"d";"e"]) // empty list - Assert.AreEqual([], List.splitInto 3 []) + Assert.IsTrue([] = List.splitInto 3 []) // invalidArg CheckThrowsArgumentException (fun () -> List.splitInto 0 [1..10] |> ignore) @@ -335,7 +335,7 @@ type ListModule() = Assert.AreEqual(expectedStrList, List.except strList2 strList1) // empty list - let emptyIntList = [] + let emptyIntList : int list = [] Assert.AreEqual([1..100], List.except emptyIntList intList1) Assert.AreEqual(emptyIntList, List.except intList1 emptyIntList) Assert.AreEqual(emptyIntList, List.except emptyIntList emptyIntList) diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ListModule2.fs b/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ListModule2.fs index 827ffba4b97..27b39a41683 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ListModule2.fs +++ b/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ListModule2.fs @@ -811,12 +811,12 @@ type ListModule02() = Assert.AreEqual(["str1";"str2"], List.truncate 2 ["str1";"str2";"str3"]) // empty list - Assert.AreEqual([], List.truncate 0 []) - Assert.AreEqual([], List.truncate 1 []) + Assert.AreEqual(([] : int list), List.truncate 0 ([] : int list)) + Assert.AreEqual(([] : int list), List.truncate 1 ([] : int list)) // negative count - Assert.AreEqual([], List.truncate -1 [1..5]) - Assert.AreEqual([], List.truncate System.Int32.MinValue [1..5]) + Assert.AreEqual(([] : int list), List.truncate -1 [1..5]) + Assert.AreEqual(([] : int list), List.truncate System.Int32.MinValue [1..5]) () @@ -984,7 +984,7 @@ type ListModule02() = { InputList = [1..10] WindowSize = 25 - ExpectedList = [] + ExpectedList = ([] : int list list) Exception = None } |> testWindowed { @@ -994,15 +994,15 @@ type ListModule02() = Exception = None } |> testWindowed { - InputList = [] + InputList = ([] : int list) WindowSize = 2 - ExpectedList = [] + ExpectedList = ([] : int list list) Exception = None } |> testWindowed { InputList = [1..10] WindowSize = 0 - ExpectedList = [] + ExpectedList = ([] : int list list) Exception = Some typeof } |> testWindowed diff --git a/tests/fsharpqa/testenv/src/diff/diff.fsproj b/tests/fsharpqa/testenv/src/diff/diff.fsproj index 04e149662a1..ea81676500f 100644 --- a/tests/fsharpqa/testenv/src/diff/diff.fsproj +++ b/tests/fsharpqa/testenv/src/diff/diff.fsproj @@ -13,7 +13,7 @@ true True ..\..\..\..\..\$(Configuration)\net40\bin - 4.3.1.0 + 4.4.0.0 HostedCompilerServer