diff --git a/tests/fsharp/Compiler/Language/SpanTests.fs b/tests/fsharp/Compiler/Language/SpanTests.fs index bd89f0fcbfe9..5e4d39af8dd9 100644 --- a/tests/fsharp/Compiler/Language/SpanTests.fs +++ b/tests/fsharp/Compiler/Language/SpanTests.fs @@ -176,7 +176,7 @@ type T(span: Span) = struct end """ [| |] - [] + [] let ``A byref struct with custom attr can be passed as typar``() = CompilerAssert.TypeCheckWithErrors """ namespace System.Runtime.CompilerServices @@ -193,4 +193,4 @@ module WhatEver = let processT (a: Action, ie: seq, asList: list) = () """ [| FSharpDiagnosticSeverity.Error, 3300, (13, 45, 13, 51), "The parameter 'asList' has an invalid type 'T list'. This is not permitted by the rules of Common IL." |] -#endif \ No newline at end of file +#endif diff --git a/tests/fsharp/FSharpSuite.Tests.fsproj b/tests/fsharp/FSharpSuite.Tests.fsproj index 7b33353283bd..83c840652b59 100644 --- a/tests/fsharp/FSharpSuite.Tests.fsproj +++ b/tests/fsharp/FSharpSuite.Tests.fsproj @@ -20,7 +20,7 @@ scriptlib.fsx - + @@ -100,6 +100,10 @@ + + + + diff --git a/tests/fsharp/NUnitHelpers.fs b/tests/fsharp/XunitHelpers.fs similarity index 100% rename from tests/fsharp/NUnitHelpers.fs rename to tests/fsharp/XunitHelpers.fs diff --git a/tests/fsharp/core/quotes/cslib.dll b/tests/fsharp/core/quotes/cslib.dll new file mode 100644 index 000000000000..79b530ded94a Binary files /dev/null and b/tests/fsharp/core/quotes/cslib.dll differ diff --git a/tests/fsharp/readme.md b/tests/fsharp/readme.md index fa6a6bf78121..827a452e56b6 100644 --- a/tests/fsharp/readme.md +++ b/tests/fsharp/readme.md @@ -2,7 +2,7 @@ ## Layout -The tests are NUNIT test cases. They test a very wide range of compiler, interactive and FSharp.Core scenarios. +The tests are xUnit test cases. They test a very wide range of compiler, interactive and FSharp.Core scenarios. The bulk of the test cases are enumerated in tests.fs, these are the old cambridge test suite. They build on a test-suite ported from windows batch files. They run the compiler and fsi as separate processes, when built for the coreclr it runs the coreclr versions using dotnet.exe @@ -10,7 +10,7 @@ The framework and utilities can be found in test-framework.fs, single-test.fs. test cases look similar to: ```` - [] + [] let ``array-FSI`` () = singleTestBuildAndRun "core/array" FSI ```` This test case builds and runs the test case in the folder core/array @@ -20,7 +20,7 @@ __#if !NETCOREAPP__ There are some older tests in this section that looks similar to: ```` - [] + [] let events () = let cfg = testConfig "core/events" fsc cfg "%s -a -o:test.dll -g" cfg.fsc_flags ["test.fs"] @@ -34,11 +34,11 @@ There are some older tests in this section that looks similar to: ```` These tests build, compile, peverify and run fsi. -Below the Compiler directory there is a set of tests built on the compiler service. They are nunit and instead of executing the compiler and fsi using files on disk the tests are built from memory. These tests use the CompilerAssert framework and look similar to: +Below the Compiler directory there is a set of tests built on the compiler service. They are xUnit and instead of executing the compiler and fsi using files on disk the tests are built from memory. These tests use the CompilerAssert framework and look similar to: This test verifies that a warning is produces when a value is implicitly discarded. The line ````x = 20``` looks like an assignment but in F# is a test for equality it yields and discards the value false. ```` - [] + [] let ``Unused compare with immutable when assignment might be intended``() = CompilerAssert.TypeCheckSingleError """ @@ -62,4 +62,4 @@ When a test is run, .err/.vserr output files are created and compared to their m Refer to [Test Guide](../../TESTGUIDE.md#baselines) to know more about how to update them. -Tests are organized under modules as functions bearing NUnit `[]` attribute and can be run from an IDE or the command line (see the [Test Guide](../../TESTGUIDE.md)). +Tests are organized under modules as functions bearing xUnit `[]` attribute and can be run from an IDE or the command line (see the [Test Guide](../../TESTGUIDE.md)). diff --git a/tests/fsharp/xunit.runner.json b/tests/fsharp/xunit.runner.json new file mode 100644 index 000000000000..4e5a48343ece --- /dev/null +++ b/tests/fsharp/xunit.runner.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json", + "appDomain": "ifAvailable", + "shadowCopy": false +} \ No newline at end of file