Skip to content

Commit 0357b4e

Browse files
mrangeforki
authored andcommitted
Implements extended if grammar
closes #55 commit 677a7e799fd5350fd166411004a734f56e9c4e4b Author: latkin <latkin@microsoft.com> Date: Tue Jan 20 11:34:49 2015 -0800 Update DEVGUIDE and TESTGUIDE to include compiler unit test suite commit 90f33737381c0932a478746fc566532da862f3c3 Author: latkin <latkin@microsoft.com> Date: Tue Jan 20 11:20:56 2015 -0800 Simplifying ExtendedIfGrammar tests commit 78b8ff4e325dc37a6d4ca0777b05a2abe85f961c Author: latkin <latkin@microsoft.com> Date: Tue Jan 20 11:20:10 2015 -0800 Adding compilerunit to RunTests.cmd usage commit ba861296fe847faa217ab76ec1cb76aef7bc4d02 Merge: 28da5c0 42e0766 Author: latkin <latkin@microsoft.com> Date: Tue Jan 20 11:05:01 2015 -0800 Merge branch 'pr/extended_if_grammar' of https://github.com/mrange/visualfsharp into mrange-pr/extended_if_grammar Conflicts: tests/fsharpqa/Source/Conformance/LexicalAnalysis/ConditionalCompilation/ExtendedIfGrammar.fs commit 28da5c0800a28cc2044a8d3bb4a22751803433aa Author: latkin <latkin@microsoft.com> Date: Mon Jan 19 18:38:11 2015 -0800 Removing generated .fs/.fsi files from repo commit 47b61d5460f4c84c1b985d50ce96d944c8791efa Author: latkin <latkin@microsoft.com> Date: Mon Jan 19 18:36:15 2015 -0800 Use dedicated fsharp-compiler-unittests-build.proj so portable/net20 build of library unit tests is not broken commit 95e1af8c8bac8b4bc6312a171e675392bff67626 Merge: c5e6699 5f8880c Author: latkin <latkin@microsoft.com> Date: Mon Jan 19 18:14:12 2015 -0800 Merge branch 'pr/extended_if_grammar' of https://github.com/mrange/visualfsharp into mrange-pr/extended_if_grammar commit 5f8880c Author: mrange <marten_range@hotmail.com> Date: Sun Jan 18 14:50:47 2015 +0100 Implements extended if grammar Origin: https://fslang.uservoice.com/forums/245727-f-language/suggestions/6079342-allow-extended-if-grammar This commit adds the possibility to write condtional compilation expressions like this: #if SILVERLIGHT || NETFX #endif or a bit more advanced: #if (SILVERLIGHT || NETFX) && COMPILED || !DEBUG #endif This commit doesn't add #elif which is an orthogonal problem.
1 parent c35937f commit 0357b4e

24 files changed

+834
-41
lines changed

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,18 @@ src/fsharp/FSharp.Compiler/ilpars.fsi
4545
src/fsharp/FSharp.Compiler/lex.fs
4646
src/fsharp/FSharp.Compiler/pars.fs
4747
src/fsharp/FSharp.Compiler/pars.fsi
48+
src/fsharp/FSharp.Compiler/pplex.fs
49+
src/fsharp/FSharp.Compiler/pppars.fs
50+
src/fsharp/FSharp.Compiler/pppars.fsi
4851
src/fsharp/FSharp.Compiler-proto/illex.fs
4952
src/fsharp/FSharp.Compiler-proto/ilpars.fs
5053
src/fsharp/FSharp.Compiler-proto/ilpars.fsi
5154
src/fsharp/FSharp.Compiler-proto/lex.fs
5255
src/fsharp/FSharp.Compiler-proto/pars.fs
5356
src/fsharp/FSharp.Compiler-proto/pars.fsi
57+
src/fsharp/FSharp.Compiler-proto/pplex.fs
58+
src/fsharp/FSharp.Compiler-proto/pppars.fs
59+
src/fsharp/FSharp.Compiler-proto/pppars.fsi
5460
*~
5561
tests/projects/Sample_VS2012_FSharp_ConsoleApp_net45_with_resource/Sample_VS2012_FSharp_ConsoleApp_net45/Sample_VS2012_FSharp_ConsoleApp_net45.sln
5662
tests/projects/Sample_VS2012_FSharp_ConsoleApp_net45_with_resource/Sample_VS2012_FSharp_ConsoleApp_net45/Sample_VS2012_FSharp_ConsoleApp_net45.userprefs
@@ -68,6 +74,9 @@ src/fsharp/FSharp.LanguageService.Compiler/illex.*
6874
src/fsharp/FSharp.LanguageService.Compiler/ilpars.*
6975
src/fsharp/FSharp.LanguageService.Compiler/lex.*
7076
src/fsharp/FSharp.LanguageService.Compiler/pars.*
77+
src/fsharp/FSharp.LanguageService.Compiler/pplex.fs
78+
src/fsharp/FSharp.LanguageService.Compiler/pppars.fs
79+
src/fsharp/FSharp.LanguageService.Compiler/pppars.fsi
7180
tests/fsharp/typecheck/sigs/*.dll
7281
tests/fsharp/typecheck/sigs/*.exe
7382
vsintegration/src/unittests/Unittests.fsi

DEVGUIDE.md

+2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Prior to a **Debug** test run, you need to complete **all** of these steps:
4545
msbuild src/fsharp-library-build.proj
4646
msbuild src/fsharp-compiler-build.proj
4747
msbuild src/fsharp-typeproviders-build.proj
48+
msbuild src/fsharp-compiler-unittests-build.proj
4849
msbuild src/fsharp-library-build.proj /p:TargetFramework=net20
4950
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable47
5051
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable7
@@ -72,6 +73,7 @@ Prior to a **Release** test run, you need to do **all** of these:
7273
msbuild src/fsharp-library-build.proj /p:Configuration=Release
7374
msbuild src/fsharp-compiler-build.proj /p:Configuration=Release
7475
msbuild src/fsharp-typeproviders-build.proj /p:Configuration=Release
76+
msbuild src/fsharp-compiler-unittests-build.proj /p:Configuration=Release
7577
msbuild src/fsharp-library-build.proj /p:TargetFramework=net20 /p:Configuration=Release
7678
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable47 /p:Configuration=Release
7779
msbuild src/fsharp-library-build.proj /p:TargetFramework=portable7 /p:Configuration=Release

TESTGUIDE.md

+11-5
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ The test cases for this suite reside under `tests\fsharp`. This suite dates back
1111
The test cases for this suite reside under `tests\fsharpqa\source`.
1212
This suite was first created when F# 2.0 was being added to Visual Studio 2010. Tests for this suite are driven by the "RunAll" framework, implemented in Perl. This suite is rather large and has broad and deep coverage of a variety of compiler, runtime, and syntax scenarios.
1313

14-
### Compiler and Library Core Unit Test Suite
15-
The test cases for this suite reside next to the F# core library code, at `src\fsharp\FSharp.Core.Unittests`. This suite is a set of standard NUnit test cases, implemented in F#. This suite focuses on validation of the core F# types and the public surface area of `FSharp.Core.dll`.
14+
### Compiler and Library Core Unit Test Suites
15+
The test cases for these suites reside next to the F# core library code, at `src\fsharp\FSharp.Core.Unittests` and `src\fsharp\FSharp.Compiler.Unittests`. These suites are standard NUnit test cases, implemented in F#. The FSharp.Core.Unittests suite focuses on validation of the core F# types and the public surface area of `FSharp.Core.dll`, and the FSharp.Compiler.Unittests suite focuses on validation of compiler internals.
1616

1717
### Visual F# Tools IDE Unit Test Suite
1818
The test cases for this suite reside next to the Visual F# Tools code, at `vsintegration\src\unittests`. This suite is a set of standard NUnit test cases, implemented in F#. This suite exercises a wide range of behaviors in the F# Visual Studio project system and language service.
@@ -39,6 +39,7 @@ The script `tests\RunTests.cmd` has been provided to make execution of the above
3939
```
4040
RunTests.cmd <debug|release> fsharp [tags to run] [tags not to run]
4141
RunTests.cmd <debug|release> fsharpqa [tags to run] [tags not to run]
42+
RunTests.cmd <debug|release> compilerunit
4243
RunTests.cmd <debug|release> coreunit
4344
RunTests.cmd <debug|release> coreunitportable47
4445
RunTests.cmd <debug|release> coreunitportable7
@@ -49,7 +50,7 @@ RunTests.cmd <debug|release> ideunit
4950

5051
`RunTests.cmd` sets a handful of environment variables which allow for the tests to work, then puts together and executes the appropriate command line to start the specified test suite.
5152

52-
All test execution logs and result files will be dropped into the `tests\TestResults` folder, and have file names matching `FSharp_*.*`, `FSharpQA_*.*`, `CoreUnit_*.*`, `IDEUnit_*.*`, e.g. `FSharpQA_Results.log` or `FSharp_Failures.log`.
53+
All test execution logs and result files will be dropped into the `tests\TestResults` folder, and have file names matching `FSharp_*.*`, `FSharpQA_*.*`, `CompilerUnit_*.*`, `CoreUnit_*.*`, `IDEUnit_*.*`, e.g. `FSharpQA_Results.log` or `FSharp_Failures.log`.
5354

5455
For the FSharp and FSharpQA suites, the list of test areas and their associated "tags" is stored at
5556

@@ -94,9 +95,14 @@ Test area directories in this suite will contain a number of source code files a
9495
Test cases will run an optional "pre command," compile some set of source files using some set of flags, optionally run the resulting binary, then optionally run a final "post command."
9596
If all of these steps complete without issue, the test is considered to have passed.
9697

97-
### Core Unit Test Suite
98+
### FSharp.Compiler and FSharp.Core Unit Test Suites
9899

99-
To build the unit test binary, call `msbuild fsharp-library-unittests-build.proj` from the `src` directory. Tests are contained in the binary `FSharp.Core.Unittests.dll`.
100+
To build these unit test binaries, from the `src` directory call
101+
102+
- `msbuild fsharp-compiler-unittests-build.proj`
103+
- Output binary is `FSharp.Compiler.Unittests.dll`
104+
- `msbuild fsharp-library-unittests-build.proj`
105+
- Output binary is `FSharp.Core.Unittests.dll`
100106

101107
You can execute and re-run these tests using any standard NUnit approach - via graphical `nunit.exe` or on the command line via `nunit-console.exe`.
102108

src/assemblyinfo/assemblyinfo.FSharp.Compiler.dll.fs

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ open System.Reflection
2222

2323
// Note: internals visible to unit test DLLs in Retail (and all) builds.
2424
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("Test")>]
25+
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("FSharp.Compiler.Unittests")>]
2526
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("Salsa")>]
2627
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("Unittests")>]
2728
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("SystematicUnitTests")>]
@@ -45,6 +46,7 @@ open System.Reflection
4546
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("Unittests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
4647
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("SystematicUnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
4748
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("Test, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
49+
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("FSharp.Compiler.Unittests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
4850
#endif
4951

5052
#if STRONG_NAME_FSHARP_COMPILER_WITH_TEST_KEY
@@ -62,6 +64,7 @@ open System.Reflection
6264
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("Unittests, PublicKey=002400000480000094000000060200000024000052534131000400000100010077d32e043d184cf8cebf177201ec6fad091581a3a639a0534f1c4ebb3ab847a6b6636990224a04cf4bd1aec51ecec44cf0c8922eb5bb2ee65ec3fb9baa87e141042c96ce414f98af33508c7e24dab5b068aa802f6693881537ee0efcb5d3f1c9aaf8215ac42e92ba9a5a02574d6890d07464cb2f338b043b1c4ffe98efe069ee")>]
6365
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("SystematicUnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010077d32e043d184cf8cebf177201ec6fad091581a3a639a0534f1c4ebb3ab847a6b6636990224a04cf4bd1aec51ecec44cf0c8922eb5bb2ee65ec3fb9baa87e141042c96ce414f98af33508c7e24dab5b068aa802f6693881537ee0efcb5d3f1c9aaf8215ac42e92ba9a5a02574d6890d07464cb2f338b043b1c4ffe98efe069ee")>]
6466
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("Test, PublicKey=002400000480000094000000060200000024000052534131000400000100010077d32e043d184cf8cebf177201ec6fad091581a3a639a0534f1c4ebb3ab847a6b6636990224a04cf4bd1aec51ecec44cf0c8922eb5bb2ee65ec3fb9baa87e141042c96ce414f98af33508c7e24dab5b068aa802f6693881537ee0efcb5d3f1c9aaf8215ac42e92ba9a5a02574d6890d07464cb2f338b043b1c4ffe98efe069ee")>]
67+
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("FSharp.Compiler.Unittests, PublicKey=002400000480000094000000060200000024000052534131000400000100010077d32e043d184cf8cebf177201ec6fad091581a3a639a0534f1c4ebb3ab847a6b6636990224a04cf4bd1aec51ecec44cf0c8922eb5bb2ee65ec3fb9baa87e141042c96ce414f98af33508c7e24dab5b068aa802f6693881537ee0efcb5d3f1c9aaf8215ac42e92ba9a5a02574d6890d07464cb2f338b043b1c4ffe98efe069ee")>]
6568
#endif
6669

6770

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!-- Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
3+
ToolsVersion="4.0">
4+
5+
<PropertyGroup>
6+
<TargetFramework Condition="'$(TargetFramework)'==''">net40</TargetFramework>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<ProjectFiles Include="fsharp/FSharp.Compiler.Unittests/FSharp.Compiler.Unittests.fsproj"/>
11+
</ItemGroup>
12+
13+
<Import Project="root.traversal.targets"/>
14+
15+
<!-- Insert any customizations for targets here -->
16+
17+
</Project>
18+

src/fsharp.sln

+6
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Data.TypeProviders",
3131
EndProject
3232
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsiAnyCPU", "fsharp\fsiAnyCpu\FsiAnyCPU.fsproj", "{8B3E283D-B5FE-4055-9D80-7E3A32F3967B}"
3333
EndProject
34+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Unittests", "fsharp\FSharp.Compiler.Unittests\FSharp.Compiler.Unittests.fsproj", "{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}"
35+
EndProject
3436
Global
3537
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3638
Debug|Any CPU = Debug|Any CPU
@@ -75,6 +77,10 @@ Global
7577
{CB7D20C4-6506-406D-9144-5342C3595F03}.Release|Any CPU.Build.0 = Release|Any CPU
7678
{8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Debug|Any CPU.ActiveCfg = Debug|x86
7779
{8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Release|Any CPU.ActiveCfg = Release|x86
80+
{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
81+
{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
82+
{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
83+
{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Release|Any CPU.Build.0 = Release|Any CPU
7884
EndGlobalSection
7985
GlobalSection(SolutionProperties) = preSolution
8086
HideSolutionNode = FALSE

src/fsharp/FSComp.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -1064,7 +1064,7 @@ lexHashEndingNoMatchingIf,"#endif has no matching #if"
10641064
1169,lexHashIfMustHaveIdent,"#if directive should be immediately followed by an identifier"
10651065
1170,lexWrongNestedHashEndif,"Syntax error. Wrong nested #endif, unexpected tokens before it."
10661066
lexHashBangMustBeFirstInFile,"#! may only appear as the first line at the start of a file."
1067-
1171,lexExpectedSingleLineComment,"Expected single line comment or end of line"
1067+
1171,pplexExpectedSingleLineComment,"Expected single line comment or end of line"
10681068
1172,memberOperatorDefinitionWithNoArguments,"Infix operator member '%s' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ..."
10691069
1173,memberOperatorDefinitionWithNonPairArgument,"Infix operator member '%s' has %d initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ..."
10701070
1174,memberOperatorDefinitionWithCurriedArguments,"Infix operator member '%s' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ..."
@@ -1336,3 +1336,7 @@ descriptionUnavailable,"(description unavailable...)"
13361336
3180,abImplicitHeapAllocation,"The mutable local '%s' is implicitly allocated as a reference cell because it has been captured by a closure. This warning is for informational purposes only to indicate where implicit allocations are performed."
13371337
estApplyStaticArgumentsForMethodNotImplemented,"A type provider implemented GetStaticParametersForMethod, but ApplyStaticArgumentsForMethod was not implemented or invalid"
13381338
3181,etErrorApplyingStaticArgumentsToMethod,"An error occured applying the static arguments to a provided method"
1339+
3182,pplexUnexpectedChar,"Unexpected character '%s' in preprocessor expression"
1340+
3183,ppparsUnexpectedToken,"Unexpected token '%s' in preprocessor expression"
1341+
3184,ppparsIncompleteExpression,"Incomplete preprocessor expression"
1342+
3185,ppparsMissingToken,"Missing token '%s' in preprocessor expression"

src/fsharp/FSharp.Compiler-proto/FSharp.Compiler-proto.fsproj

+12
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@
2222
<Link>FSComp.txt</Link>
2323
</FsSrGen>
2424
<EmbeddedResource Include="..\FSStrings.resx" />
25+
<FsLex Include="..\pplex.fsl">
26+
<OtherFlags>--lexlib Internal.Utilities.Text.Lexing</OtherFlags>
27+
<Link>pplex.fsl</Link>
28+
</FsLex>
29+
<FsYacc Include="..\pppars.fsy">
30+
<Module>Microsoft.FSharp.Compiler.PPParser</Module>
31+
<Open>Microsoft.FSharp.Compiler</Open>
32+
<OtherFlags>--internal --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing</OtherFlags>
33+
<Link>pppars.fsy</Link>
34+
</FsYacc>
2535
<FsLex Include="..\lex.fsl">
2636
<OtherFlags>--lexlib Internal.Utilities.Text.Lexing</OtherFlags>
2737
<Link>lex.fsl</Link>
@@ -250,13 +260,15 @@
250260
<Compile Include="..\ast.fs">
251261
<Link>ast.fs</Link>
252262
</Compile>
263+
<Compile Include="pppars.fs" />
253264
<Compile Include="pars.fs" />
254265
<Compile Include="..\lexhelp.fsi">
255266
<Link>lexhelp.fsi</Link>
256267
</Compile>
257268
<Compile Include="..\lexhelp.fs">
258269
<Link>lexhelp.fs</Link>
259270
</Compile>
271+
<Compile Include="pplex.fs" />
260272
<Compile Include="lex.fs" />
261273
<Compile Include="..\sreflect.fsi">
262274
<Link>sreflect.fsi</Link>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
3+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
4+
<PropertyGroup>
5+
<FSharpSourcesRoot>..\..</FSharpSourcesRoot>
6+
<ProjectGuid>{a8d9641a-9170-4cf4-8fe0-6db8c134e1b5}</ProjectGuid>
7+
</PropertyGroup>
8+
<Import Project="$(FSharpSourcesRoot)\FSharpSource.Settings.targets" />
9+
<PropertyGroup>
10+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
11+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
12+
<SchemaVersion>2.0</SchemaVersion>
13+
<AllowCrossTargeting>true</AllowCrossTargeting>
14+
<ReferenceVsAssemblies>true</ReferenceVsAssemblies>
15+
<OutputType>Library</OutputType>
16+
<AssemblyName>FSharp.Compiler.Unittests</AssemblyName>
17+
<TargetFrameworkVersion Condition=" '$(TargetFramework)' == 'net20' ">v3.5</TargetFrameworkVersion>
18+
<Name>SystematicUnitTests</Name>
19+
<!-- Prevent compiler from inlining calls to FSharp.Core to improve code coverage accuracy -->
20+
<Optimize>false</Optimize>
21+
<Tailcalls>false</Tailcalls>
22+
<TargetProfile Condition=" '$(TargetFramework)' == 'portable7' or '$(TargetFramework)' == 'portable78' or '$(TargetFramework)' == 'portable259' ">netcore</TargetProfile>
23+
<!-- workaround for msbuild narrowing the assembly search paths when building portable libs -->
24+
<AssemblySearchPaths Condition="$(TargetFramework.Contains('portable'))">
25+
{CandidateAssemblyFiles};
26+
{TargetFrameworkDirectory};
27+
{Registry:Software\Microsoft\.NETFramework,v4.5,AssemblyFoldersEx};
28+
</AssemblySearchPaths>
29+
</PropertyGroup>
30+
<PropertyGroup>
31+
<DefineConstants Condition=" '$(TargetFramework)' == 'sl5' ">$(DefineConstants);SILVERLIGHT</DefineConstants>
32+
<DefineConstants>$(DefineConstants);EXTENSIONTYPING</DefineConstants>
33+
</PropertyGroup>
34+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
35+
<DebugSymbols>true</DebugSymbols>
36+
<DebugType>full</DebugType>
37+
<Optimize>false</Optimize>
38+
<OutputPath>bin\Debug\</OutputPath>
39+
<DefineConstants>DEBUG;TRACE</DefineConstants>
40+
<ErrorReport>prompt</ErrorReport>
41+
<WarningLevel>3</WarningLevel>
42+
</PropertyGroup>
43+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
44+
<DebugType>pdbonly</DebugType>
45+
<Optimize>true</Optimize>
46+
<OutputPath>bin\Release\</OutputPath>
47+
<DefineConstants>TRACE</DefineConstants>
48+
<ErrorReport>prompt</ErrorReport>
49+
<WarningLevel>3</WarningLevel>
50+
</PropertyGroup>
51+
<ItemGroup>
52+
<!-- need full name and SpecificVersion = true in order to convince msbuild to allow this reference when targeting portable47 -->
53+
<Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" Condition="'$(TargetFramework)' != 'sl5' AND '$(TargetFramework)' != 'sl3-wp'">
54+
<SpecificVersion>true</SpecificVersion>
55+
</Reference>
56+
<Reference Include="NUnitFramework" Condition="'$(TargetFramework)' == 'sl5' OR '$(TargetFramework)' == 'sl3-wp'" />
57+
</ItemGroup>
58+
<ItemGroup Condition="!$(TargetFramework.Contains('portable'))">
59+
<Reference Include="mscorlib" />
60+
<Reference Include="System" />
61+
<Reference Include="System.Numerics" Condition="'$(TargetFramework)' == 'net40'" />
62+
<Reference Include="System.Core" />
63+
<Reference Include="System.Net" Condition="'$(TargetFramework)' == 'sl5' " />
64+
<Reference Include="System.Observable" Condition="'$(TargetFramework)' == 'sl3-wp' " />
65+
</ItemGroup>
66+
<ItemGroup>
67+
<Compile Include="NUnitFrameworkShims.fs" Condition="'$(TargetFramework)' == 'sl3-wp'" />
68+
<Compile Include="HashIfExpression.fs" />
69+
</ItemGroup>
70+
<ItemGroup>
71+
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Compiler\FSharp.Compiler.fsproj">
72+
<Name>FSharp.Compiler</Name>
73+
<Project>{2e4d67b4-522d-4cf7-97e4-ba940f0b18f3}</Project>
74+
</ProjectReference>
75+
<ProjectReference Include="..\FSharp.Core\FSharp.Core.fsproj">
76+
<Name>FSharp.Core</Name>
77+
<Project>{ded3bbd7-53f4-428a-8c9f-27968e768605}</Project>
78+
<Private>True</Private>
79+
</ProjectReference>
80+
</ItemGroup>
81+
<Import Project="$(FSharpSourcesRoot)\FSharpSource.targets" />
82+
</Project>

0 commit comments

Comments
 (0)