Skip to content

Commit 3743cd3

Browse files
author
7sharp9
committed
Switched tests to use a set
1 parent f2acb19 commit 3743cd3

File tree

1 file changed

+82
-79
lines changed

1 file changed

+82
-79
lines changed

tests/service/ProjectOptionsTests.fs

Lines changed: 82 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -244,41 +244,42 @@ let ``Project file parsing -- PCL profile7 project``() =
244244
let references =
245245
options.OtherOptions
246246
|> Array.choose (fun o -> if o.StartsWith("-r:") then o.[3..] |> (Path.GetFileName >> Some) else None)
247+
|> Set.ofArray
247248
references
248249
|> shouldEqual
249-
[|"FSharp.Core.dll"; "Microsoft.CSharp.dll"; "Microsoft.VisualBasic.dll";
250-
"System.Collections.Concurrent.dll"; "System.Collections.dll";
251-
"System.ComponentModel.Annotations.dll";
252-
"System.ComponentModel.DataAnnotations.dll";
253-
"System.ComponentModel.EventBasedAsync.dll"; "System.ComponentModel.dll";
254-
"System.Core.dll"; "System.Diagnostics.Contracts.dll";
255-
"System.Diagnostics.Debug.dll"; "System.Diagnostics.Tools.dll";
256-
"System.Diagnostics.Tracing.dll"; "System.Dynamic.Runtime.dll";
257-
"System.Globalization.dll"; "System.IO.Compression.dll"; "System.IO.dll";
258-
"System.Linq.Expressions.dll"; "System.Linq.Parallel.dll";
259-
"System.Linq.Queryable.dll"; "System.Linq.dll"; "System.Net.Http.dll";
260-
"System.Net.NetworkInformation.dll"; "System.Net.Primitives.dll";
261-
"System.Net.Requests.dll"; "System.Net.dll"; "System.Numerics.dll";
262-
"System.ObjectModel.dll"; "System.Reflection.Context.dll";
263-
"System.Reflection.Extensions.dll"; "System.Reflection.Primitives.dll";
264-
"System.Reflection.dll"; "System.Resources.ResourceManager.dll";
265-
"System.Runtime.Extensions.dll";
266-
"System.Runtime.InteropServices.WindowsRuntime.dll";
267-
"System.Runtime.InteropServices.dll"; "System.Runtime.Numerics.dll";
268-
"System.Runtime.Serialization.Json.dll";
269-
"System.Runtime.Serialization.Primitives.dll";
270-
"System.Runtime.Serialization.Xml.dll"; "System.Runtime.Serialization.dll";
271-
"System.Runtime.dll"; "System.Security.Principal.dll";
272-
"System.ServiceModel.Duplex.dll"; "System.ServiceModel.Http.dll";
273-
"System.ServiceModel.NetTcp.dll"; "System.ServiceModel.Primitives.dll";
274-
"System.ServiceModel.Security.dll"; "System.ServiceModel.Web.dll";
275-
"System.ServiceModel.dll"; "System.Text.Encoding.Extensions.dll";
276-
"System.Text.Encoding.dll"; "System.Text.RegularExpressions.dll";
277-
"System.Threading.Tasks.Parallel.dll"; "System.Threading.Tasks.dll";
278-
"System.Threading.dll"; "System.Windows.dll"; "System.Xml.Linq.dll";
279-
"System.Xml.ReaderWriter.dll"; "System.Xml.Serialization.dll";
280-
"System.Xml.XDocument.dll"; "System.Xml.XmlSerializer.dll"; "System.Xml.dll";
281-
"System.dll"; "mscorlib.dll"|]
250+
(set [|"FSharp.Core.dll"; "Microsoft.CSharp.dll"; "Microsoft.VisualBasic.dll";
251+
"System.Collections.Concurrent.dll"; "System.Collections.dll";
252+
"System.ComponentModel.Annotations.dll";
253+
"System.ComponentModel.DataAnnotations.dll";
254+
"System.ComponentModel.EventBasedAsync.dll"; "System.ComponentModel.dll";
255+
"System.Core.dll"; "System.Diagnostics.Contracts.dll";
256+
"System.Diagnostics.Debug.dll"; "System.Diagnostics.Tools.dll";
257+
"System.Diagnostics.Tracing.dll"; "System.Dynamic.Runtime.dll";
258+
"System.Globalization.dll"; "System.IO.Compression.dll"; "System.IO.dll";
259+
"System.Linq.Expressions.dll"; "System.Linq.Parallel.dll";
260+
"System.Linq.Queryable.dll"; "System.Linq.dll"; "System.Net.Http.dll";
261+
"System.Net.NetworkInformation.dll"; "System.Net.Primitives.dll";
262+
"System.Net.Requests.dll"; "System.Net.dll"; "System.Numerics.dll";
263+
"System.ObjectModel.dll"; "System.Reflection.Context.dll";
264+
"System.Reflection.Extensions.dll"; "System.Reflection.Primitives.dll";
265+
"System.Reflection.dll"; "System.Resources.ResourceManager.dll";
266+
"System.Runtime.Extensions.dll";
267+
"System.Runtime.InteropServices.WindowsRuntime.dll";
268+
"System.Runtime.InteropServices.dll"; "System.Runtime.Numerics.dll";
269+
"System.Runtime.Serialization.Json.dll";
270+
"System.Runtime.Serialization.Primitives.dll";
271+
"System.Runtime.Serialization.Xml.dll"; "System.Runtime.Serialization.dll";
272+
"System.Runtime.dll"; "System.Security.Principal.dll";
273+
"System.ServiceModel.Duplex.dll"; "System.ServiceModel.Http.dll";
274+
"System.ServiceModel.NetTcp.dll"; "System.ServiceModel.Primitives.dll";
275+
"System.ServiceModel.Security.dll"; "System.ServiceModel.Web.dll";
276+
"System.ServiceModel.dll"; "System.Text.Encoding.Extensions.dll";
277+
"System.Text.Encoding.dll"; "System.Text.RegularExpressions.dll";
278+
"System.Threading.Tasks.Parallel.dll"; "System.Threading.Tasks.dll";
279+
"System.Threading.dll"; "System.Windows.dll"; "System.Xml.Linq.dll";
280+
"System.Xml.ReaderWriter.dll"; "System.Xml.Serialization.dll";
281+
"System.Xml.XDocument.dll"; "System.Xml.XmlSerializer.dll"; "System.Xml.dll";
282+
"System.dll"; "mscorlib.dll"|])
282283

283284
checkOption options.OtherOptions "--targetprofile:netcore"
284285

@@ -290,32 +291,33 @@ let ``Project file parsing -- PCL profile78 project``() =
290291
let references =
291292
options.OtherOptions
292293
|> Array.choose (fun o -> if o.StartsWith("-r:") then o.[3..] |> (Path.GetFileName >> Some) else None)
294+
|> Set.ofArray
293295
references
294296
|> shouldEqual
295-
[|"FSharp.Core.dll"; "Microsoft.CSharp.dll"; "System.Collections.dll";
296-
"System.ComponentModel.EventBasedAsync.dll"; "System.ComponentModel.dll";
297-
"System.Core.dll"; "System.Diagnostics.Contracts.dll";
298-
"System.Diagnostics.Debug.dll"; "System.Diagnostics.Tools.dll";
299-
"System.Dynamic.Runtime.dll"; "System.Globalization.dll"; "System.IO.dll";
300-
"System.Linq.Expressions.dll"; "System.Linq.Queryable.dll"; "System.Linq.dll";
301-
"System.Net.NetworkInformation.dll"; "System.Net.Primitives.dll";
302-
"System.Net.Requests.dll"; "System.Net.dll"; "System.ObjectModel.dll";
303-
"System.Reflection.Extensions.dll"; "System.Reflection.Primitives.dll";
304-
"System.Reflection.dll"; "System.Resources.ResourceManager.dll";
305-
"System.Runtime.Extensions.dll";
306-
"System.Runtime.InteropServices.WindowsRuntime.dll";
307-
"System.Runtime.Serialization.Json.dll";
308-
"System.Runtime.Serialization.Primitives.dll";
309-
"System.Runtime.Serialization.Xml.dll"; "System.Runtime.Serialization.dll";
310-
"System.Runtime.dll"; "System.Security.Principal.dll";
311-
"System.ServiceModel.Http.dll"; "System.ServiceModel.Primitives.dll";
312-
"System.ServiceModel.Security.dll"; "System.ServiceModel.Web.dll";
313-
"System.ServiceModel.dll"; "System.Text.Encoding.Extensions.dll";
314-
"System.Text.Encoding.dll"; "System.Text.RegularExpressions.dll";
315-
"System.Threading.Tasks.dll"; "System.Threading.dll"; "System.Windows.dll";
316-
"System.Xml.Linq.dll"; "System.Xml.ReaderWriter.dll";
317-
"System.Xml.Serialization.dll"; "System.Xml.XDocument.dll";
318-
"System.Xml.XmlSerializer.dll"; "System.Xml.dll"; "System.dll"; "mscorlib.dll"|]
297+
(set [|"FSharp.Core.dll"; "Microsoft.CSharp.dll"; "System.Collections.dll";
298+
"System.ComponentModel.EventBasedAsync.dll"; "System.ComponentModel.dll";
299+
"System.Core.dll"; "System.Diagnostics.Contracts.dll";
300+
"System.Diagnostics.Debug.dll"; "System.Diagnostics.Tools.dll";
301+
"System.Dynamic.Runtime.dll"; "System.Globalization.dll"; "System.IO.dll";
302+
"System.Linq.Expressions.dll"; "System.Linq.Queryable.dll"; "System.Linq.dll";
303+
"System.Net.NetworkInformation.dll"; "System.Net.Primitives.dll";
304+
"System.Net.Requests.dll"; "System.Net.dll"; "System.ObjectModel.dll";
305+
"System.Reflection.Extensions.dll"; "System.Reflection.Primitives.dll";
306+
"System.Reflection.dll"; "System.Resources.ResourceManager.dll";
307+
"System.Runtime.Extensions.dll";
308+
"System.Runtime.InteropServices.WindowsRuntime.dll";
309+
"System.Runtime.Serialization.Json.dll";
310+
"System.Runtime.Serialization.Primitives.dll";
311+
"System.Runtime.Serialization.Xml.dll"; "System.Runtime.Serialization.dll";
312+
"System.Runtime.dll"; "System.Security.Principal.dll";
313+
"System.ServiceModel.Http.dll"; "System.ServiceModel.Primitives.dll";
314+
"System.ServiceModel.Security.dll"; "System.ServiceModel.Web.dll";
315+
"System.ServiceModel.dll"; "System.Text.Encoding.Extensions.dll";
316+
"System.Text.Encoding.dll"; "System.Text.RegularExpressions.dll";
317+
"System.Threading.Tasks.dll"; "System.Threading.dll"; "System.Windows.dll";
318+
"System.Xml.Linq.dll"; "System.Xml.ReaderWriter.dll";
319+
"System.Xml.Serialization.dll"; "System.Xml.XDocument.dll";
320+
"System.Xml.XmlSerializer.dll"; "System.Xml.dll"; "System.dll"; "mscorlib.dll"|])
319321

320322
checkOption options.OtherOptions "--targetprofile:netcore"
321323

@@ -327,30 +329,31 @@ let ``Project file parsing -- PCL profile259 project``() =
327329
let references =
328330
options.OtherOptions
329331
|> Array.choose (fun o -> if o.StartsWith("-r:") then o.[3..] |> (Path.GetFileName >> Some) else None)
332+
|> Set.ofArray
330333
references
331334
|> shouldEqual
332-
[|"FSharp.Core.dll"; "Microsoft.CSharp.dll"; "System.Collections.dll";
333-
"System.ComponentModel.EventBasedAsync.dll"; "System.ComponentModel.dll";
334-
"System.Core.dll"; "System.Diagnostics.Contracts.dll";
335-
"System.Diagnostics.Debug.dll"; "System.Diagnostics.Tools.dll";
336-
"System.Dynamic.Runtime.dll"; "System.Globalization.dll"; "System.IO.dll";
337-
"System.Linq.Expressions.dll"; "System.Linq.Queryable.dll"; "System.Linq.dll";
338-
"System.Net.NetworkInformation.dll"; "System.Net.Primitives.dll";
339-
"System.Net.Requests.dll"; "System.Net.dll"; "System.ObjectModel.dll";
340-
"System.Reflection.Extensions.dll"; "System.Reflection.Primitives.dll";
341-
"System.Reflection.dll"; "System.Resources.ResourceManager.dll";
342-
"System.Runtime.Extensions.dll";
343-
"System.Runtime.InteropServices.WindowsRuntime.dll";
344-
"System.Runtime.Serialization.Json.dll";
345-
"System.Runtime.Serialization.Primitives.dll";
346-
"System.Runtime.Serialization.Xml.dll"; "System.Runtime.Serialization.dll";
347-
"System.Runtime.dll"; "System.Security.Principal.dll";
348-
"System.ServiceModel.Web.dll"; "System.Text.Encoding.Extensions.dll";
349-
"System.Text.Encoding.dll"; "System.Text.RegularExpressions.dll";
350-
"System.Threading.Tasks.dll"; "System.Threading.dll"; "System.Windows.dll";
351-
"System.Xml.Linq.dll"; "System.Xml.ReaderWriter.dll";
352-
"System.Xml.Serialization.dll"; "System.Xml.XDocument.dll";
353-
"System.Xml.XmlSerializer.dll"; "System.Xml.dll"; "System.dll"; "mscorlib.dll"|]
335+
(set [|"FSharp.Core.dll"; "Microsoft.CSharp.dll"; "System.Collections.dll";
336+
"System.ComponentModel.EventBasedAsync.dll"; "System.ComponentModel.dll";
337+
"System.Core.dll"; "System.Diagnostics.Contracts.dll";
338+
"System.Diagnostics.Debug.dll"; "System.Diagnostics.Tools.dll";
339+
"System.Dynamic.Runtime.dll"; "System.Globalization.dll"; "System.IO.dll";
340+
"System.Linq.Expressions.dll"; "System.Linq.Queryable.dll"; "System.Linq.dll";
341+
"System.Net.NetworkInformation.dll"; "System.Net.Primitives.dll";
342+
"System.Net.Requests.dll"; "System.Net.dll"; "System.ObjectModel.dll";
343+
"System.Reflection.Extensions.dll"; "System.Reflection.Primitives.dll";
344+
"System.Reflection.dll"; "System.Resources.ResourceManager.dll";
345+
"System.Runtime.Extensions.dll";
346+
"System.Runtime.InteropServices.WindowsRuntime.dll";
347+
"System.Runtime.Serialization.Json.dll";
348+
"System.Runtime.Serialization.Primitives.dll";
349+
"System.Runtime.Serialization.Xml.dll"; "System.Runtime.Serialization.dll";
350+
"System.Runtime.dll"; "System.Security.Principal.dll";
351+
"System.ServiceModel.Web.dll"; "System.Text.Encoding.Extensions.dll";
352+
"System.Text.Encoding.dll"; "System.Text.RegularExpressions.dll";
353+
"System.Threading.Tasks.dll"; "System.Threading.dll"; "System.Windows.dll";
354+
"System.Xml.Linq.dll"; "System.Xml.ReaderWriter.dll";
355+
"System.Xml.Serialization.dll"; "System.Xml.XDocument.dll";
356+
"System.Xml.XmlSerializer.dll"; "System.Xml.dll"; "System.dll"; "mscorlib.dll"|])
354357

355358
checkOption options.OtherOptions "--targetprofile:netcore"
356359

0 commit comments

Comments
 (0)