Skip to content

Commit 50497fb

Browse files
Minor changes (#431)
* cleanup: delete xunit test output from the repository * adjust all tests to be under FSharp.Data.SqlClient.Tests namespace, removing all the conditional about "legacy namespace" support in context of tests. * adjust .sln to have few more useful stuff in the solution explorer * few launch settings to make it possible to launch in debug vscode
1 parent 391c078 commit 50497fb

30 files changed

+107
-664
lines changed

SqlClient.sln

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.28010.2041
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.8.34309.116
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{FD7933BD-2A90-49EB-A4B2-95F9D3076BBD}"
77
ProjectSection(SolutionItems) = preProject
@@ -17,7 +17,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1717
ProjectSection(SolutionItems) = preProject
1818
build.cmd = build.cmd
1919
build.fsx = build.fsx
20+
Directory.Build.props = Directory.Build.props
21+
fsc.props = fsc.props
2022
LICENSE.md = LICENSE.md
23+
netfx.props = netfx.props
2124
README.md = README.md
2225
RELEASE_NOTES.md = RELEASE_NOTES.md
2326
EndProjectSection

Tests.sln

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.28010.2041
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.9.34310.174
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{E35ED000-5A6C-49E1-82CF-55CB8C16C2AB}"
77
ProjectSection(SolutionItems) = preProject
88
paket.dependencies = paket.dependencies
9+
paket.lock = paket.lock
910
EndProjectSection
1011
EndProject
1112
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "SqlClient.Tests", "tests\SqlClient.Tests\SqlClient.Tests.fsproj", "{36665EFF-56A2-46C2-852D-6D26DF492D79}"
@@ -14,6 +15,13 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "SqlClient.DesignTime.Tests"
1415
EndProject
1516
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "SqlClient.SqlServerTypes.Tests", "tests\SqlClient.SqlServerTypes.Tests\SqlClient.SqlServerTypes.Tests.fsproj", "{CF3D9433-B20A-4E5A-9401-F6518CBAD34E}"
1617
EndProject
18+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution items", "Solution items", "{0005CBDB-E976-46EE-89A0-CEE3F25A9365}"
19+
ProjectSection(SolutionItems) = preProject
20+
Directory.Build.props = Directory.Build.props
21+
fsc.props = fsc.props
22+
netfx.props = netfx.props
23+
EndProjectSection
24+
EndProject
1725
Global
1826
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1927
Debug|Any CPU = Debug|Any CPU

fsc.props

+21-12
Original file line numberDiff line numberDiff line change
@@ -6,45 +6,50 @@
66
<IsOSX Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">true</IsOSX>
77
<IsLinux Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">true</IsLinux>
88
</PropertyGroup>
9-
<PropertyGroup Condition="'$(IsWindows)' == 'true' AND Exists('C:\Program Files (x86)\Microsoft SDKs\F#\4.1\Framework\v4.0\fsc.exe')">
10-
<FscToolPath>C:\Program Files (x86)\Microsoft SDKs\F#\4.1\Framework\v4.0</FscToolPath>
9+
<PropertyGroup Condition="'$(IsWindows)' == 'true'">
1110
<FscToolExe>fsc.exe</FscToolExe>
1211
</PropertyGroup>
12+
<PropertyGroup Condition="'$(IsWindows)' == 'true' AND Exists('C:\Program Files\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsc.exe')">
13+
<FscToolPath>C:\Program Files\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\FSharp</FscToolPath>
14+
</PropertyGroup>
15+
<PropertyGroup Condition="'$(IsWindows)' == 'true' AND Exists('C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsc.exe')">
16+
<FscToolPath>C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\FSharp</FscToolPath>
17+
</PropertyGroup>
18+
<PropertyGroup Condition="'$(IsWindows)' == 'true' AND Exists('C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsc.exe')">
19+
<FscToolPath>C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\FSharp</FscToolPath>
20+
</PropertyGroup>
21+
<PropertyGroup Condition="'$(IsWindows)' == 'true' AND Exists('C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsc.exe')">
22+
<FscToolPath>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\FSharp</FscToolPath>
23+
</PropertyGroup>
1324
<PropertyGroup Condition="'$(IsWindows)' == 'true' AND Exists('C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsc.exe')">
1425
<FscToolPath>C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\IDE\CommonExtensions\Microsoft\FSharp</FscToolPath>
15-
<FscToolExe>fsc.exe</FscToolExe>
1626
</PropertyGroup>
1727
<PropertyGroup Condition="'$(IsWindows)' == 'true' AND Exists('C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsc.exe')">
1828
<FscToolPath>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\FSharp</FscToolPath>
19-
<FscToolExe>fsc.exe</FscToolExe>
2029
</PropertyGroup>
2130
<PropertyGroup Condition="'$(IsWindows)' == 'true' AND Exists('C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsc.exe')">
2231
<FscToolPath>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\FSharp</FscToolPath>
23-
<FscToolExe>fsc.exe</FscToolExe>
2432
</PropertyGroup>
2533
<PropertyGroup Condition="'$(IsWindows)' == 'true' AND Exists('C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsc.exe')">
2634
<FscToolPath>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\FSharp</FscToolPath>
27-
<FscToolExe>fsc.exe</FscToolExe>
2835
</PropertyGroup>
2936
<PropertyGroup Condition="'$(IsWindows)' == 'true' AND Exists('C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsc.exe')">
3037
<FscToolPath>C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\CommonExtensions\Microsoft\FSharp</FscToolPath>
31-
<FscToolExe>fsc.exe</FscToolExe>
3238
</PropertyGroup>
3339
<PropertyGroup Condition="'$(IsWindows)' == 'true' AND Exists('C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsc.exe')">
3440
<FscToolPath>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\FSharp</FscToolPath>
35-
<FscToolExe>fsc.exe</FscToolExe>
3641
</PropertyGroup>
3742
<PropertyGroup Condition="'$(IsWindows)' == 'true' AND Exists('C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsc.exe')">
3843
<FscToolPath>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\FSharp</FscToolPath>
39-
<FscToolExe>fsc.exe</FscToolExe>
4044
</PropertyGroup>
4145
<PropertyGroup Condition="'$(IsWindows)' == 'true' AND Exists('C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsc.exe')">
4246
<FscToolPath>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\FSharp</FscToolPath>
43-
<FscToolExe>fsc.exe</FscToolExe>
4447
</PropertyGroup>
4548
<PropertyGroup Condition="'$(IsWindows)' == 'true' AND Exists('C:\Program Files (x86)\Microsoft SDKs\F#\10.1\Framework\v4.0\fsc.exe')">
4649
<FscToolPath>C:\Program Files (x86)\Microsoft SDKs\F#\10.1\Framework\v4.0</FscToolPath>
47-
<FscToolExe>fsc.exe</FscToolExe>
50+
</PropertyGroup>
51+
<PropertyGroup Condition="'$(IsWindows)' == 'true' AND Exists('C:\Program Files (x86)\Microsoft SDKs\F#\4.1\Framework\v4.0\fsc.exe')">
52+
<FscToolPath>C:\Program Files (x86)\Microsoft SDKs\F#\4.1\Framework\v4.0</FscToolPath>
4853
</PropertyGroup>
4954
<PropertyGroup Condition="'$(IsOSX)' == 'true' AND Exists('/Library/Frameworks/Mono.framework/Versions/Current/Commands/fsharpc')">
5055
<FscToolPath>/Library/Frameworks/Mono.framework/Versions/Current/Commands</FscToolPath>
@@ -54,4 +59,8 @@
5459
<FscToolPath>/usr/bin</FscToolPath>
5560
<FscToolExe>fsharpc</FscToolExe>
5661
</PropertyGroup>
57-
</Project>
62+
<!-- it doesn't do what I want: @baronfel "Imports and property groups are part of evaluation phase, not execution phase. Errors and warnings are only fired during execution phase. Best which can be done is detect the bad state in a target that you run early in the build"
63+
<Error Condition="'$(FscToolPath)' == ''" Text="FscToolPath MSBuild property could'nt be set" />
64+
<Error Condition="'$(FscToolPath)' == ''" Text="FscToolExe MSBuild property could'nt be set" />
65+
-->
66+
</Project>
+13-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
{
22
"profiles": {
3-
"SqlClient": {
3+
"debug vs2022": {
44
"commandName": "Executable",
5-
"executablePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\devenv.exe",
6-
"commandLineArgs": "..\\..\\Tests.sln"
5+
"executablePath": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\IDE\\devenv.exe",
6+
"commandLineArgs": "..\\Tests.sln"
7+
},
8+
"debug vscode": {
9+
"commandName": "Executable",
10+
"executablePath": "C:\\Users\\gauth\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe",
11+
"commandLineArgs": "..\\"
12+
},
13+
"debug rider": {
14+
"commandName": "Executable",
15+
"executablePath": "C:\\Users\\gauth\\AppData\\Local\\JetBrains\\Toolbox\\apps\\Rider\\ch-0\\232.10203.29\\bin\\rider64.exe",
16+
"commandLineArgs": "..\\..\\..\\..\\..\\tests.sln"
717
}
818
}
919
}

tests/SqlClient.DesignTime.Tests/SqlClient.DesignTime.Tests.fsproj

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
99
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
1010
<NoWarn>101</NoWarn>
11-
<DefineConstants>$(DefineConstants);WITH_LEGACY_NAMESPACE</DefineConstants>
1211
</PropertyGroup>
1312
<ItemGroup>
1413
<None Include="app.config" />

tests/SqlClient.SqlServerTypes.Tests/SpatialTypesTests.fs

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
#if WITH_LEGACY_NAMESPACE
2-
module FSharp.Data.SpatialTypesTests
3-
open FSharp.Data.SqlClient
4-
#else
5-
module FSharp.Data.SqlClient.SpatialTypesTests
6-
#endif
1+
module FSharp.Data.SqlClient.Tests.SpatialTypesTests
72

3+
open FSharp.Data
84
open Xunit
95
open Microsoft.SqlServer.Types
106
open System.Data.SqlTypes

tests/SqlClient.SqlServerTypes.Tests/SqlClient.SqlServerTypes.Tests.fsproj

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
for the time necessary of the transition, this enables more coverage of the type aliases working the way expected in client code
1111
-->
1212
<NoWarn>$(NoWarn);0044</NoWarn>
13-
<DefineConstants>$(DefineConstants);WITH_LEGACY_NAMESPACE</DefineConstants>
1413
</PropertyGroup>
1514
<ItemGroup>
1615
<None Include="App.config" />

tests/SqlClient.Tests/ConfigurationTest.fs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
module FSharp.Data.SqlClient.ConfigurationTests
1+
module FSharp.Data.SqlClient.Tests.ConfigurationTests
22

33
open Xunit
44
open FSharp.Data
5+
open FSharp.Data.SqlClient
6+
open FSharp.Data.SqlClient.Tests
57
open System.Configuration
68

79
let adventureWorks = ConfigurationManager.ConnectionStrings.["AdventureWorks"].ConnectionString

tests/SqlClient.Tests/ConnectionStrings.fs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module FSharp.Data.ConnectionStrings
1+
module FSharp.Data.SqlClient.Tests.ConnectionStrings
22

33
[<Literal>]
44
let server = @"."

tests/SqlClient.Tests/CreateCommand.fs

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
module FSharp.Data.CreateCommandTest
2-
1+
module FSharp.Data.SqlClient.Tests.CreateCommandTest
2+
open FSharp.Data
3+
open FSharp.Data.SqlClient
4+
open FSharp.Data.SqlClient.Tests
35
open Xunit
46

5-
type DB = FSharp.Data.ProgrammabilityTest.AdventureWorks
7+
type DB = FSharp.Data.SqlClient.Tests.ProgrammabilityTest.AdventureWorks
68

79
[<Fact>]
810
let getSingleRowNoParams() =

tests/SqlClient.Tests/DataTablesTests.fs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace FSharp.Data
1+
namespace FSharp.Data.SqlClient.Tests
22

33
open System
44
open System.Configuration
@@ -7,6 +7,7 @@ open System.Data.SqlClient
77
open System.Data
88
open FSharp.Data
99
open FSharp.Data.SqlClient
10+
open FSharp.Data.SqlClient.Tests
1011
open Xunit
1112

1213
open ProgrammabilityTest

tests/SqlClient.Tests/DynamicRecordTests.fs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module FSharp.Data.DynamicRecordTests
1+
module FSharp.Data.Tests.DynamicRecordTests
22

33
open System
44
open System.Dynamic

tests/SqlClient.Tests/FreeVarDoubleDeclTests.fs

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
#if WITH_LEGACY_NAMESPACE
2-
module FSharp.Data.``The undeclared parameter 'X' is used more than once in the batch being analyzed``
1+
module FSharp.Data.SqlClient.Tests.``The undeclared parameter 'X' is used more than once in the batch being analyzed``
2+
open FSharp.Data
33
open FSharp.Data.SqlClient
4-
#else
5-
module FSharp.Data.SqlClient.``The undeclared parameter 'X' is used more than once in the batch being analyzed``
6-
#endif
4+
open FSharp.Data.SqlClient.Tests
75

86
open System
97
open Xunit

tests/SqlClient.Tests/OptionalParamsTests.fs

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
#if WITH_LEGACY_NAMESPACE
2-
module FSharp.Data.OptionalParamsTests
3-
open FSharp.Data.SqlClient
4-
#else
5-
module FSharp.Data.SqlClient.OptionalParamsTests
6-
#endif
1+
module FSharp.Data.SqlClient.Tests.OptionalParamsTests
72

3+
open FSharp.Data
4+
open FSharp.Data.SqlClient
5+
open FSharp.Data.SqlClient.Tests
86

97
open Xunit
108
[<Literal>]

tests/SqlClient.Tests/ProgrammabilityTests.fs

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
#if WITH_LEGACY_NAMESPACE
2-
module FSharp.Data.ProgrammabilityTest
1+
module FSharp.Data.SqlClient.Tests.ProgrammabilityTest
2+
open FSharp.Data
33
open FSharp.Data.SqlClient
4-
#else
5-
module FSharp.Data.SqlClient.ProgrammabilityTest
6-
#endif
4+
open FSharp.Data.SqlClient.Tests
75

86
open System
97
open System.Data.SqlClient

tests/SqlClient.Tests/ResultTypeTests.fs

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
#if WITH_LEGACY_NAMESPACE
2-
module FSharp.Data.ResultTypeTests
1+
module FSharp.Data.SqlClient.Tests.ResultTypeTests
2+
open FSharp.Data
33
open FSharp.Data.SqlClient
4-
#else
5-
module FSharp.Data.SqlClient.ResultTypeTests
6-
#endif
4+
open FSharp.Data.SqlClient.Tests
75

86
open FSharp.Data
97
open Xunit

tests/SqlClient.Tests/SpReturnValueTests.fs

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
#if WITH_LEGACY_NAMESPACE
2-
module FSharp.Data.SpReturnValueTests
1+
module FSharp.Data.SqlClient.Tests.SpReturnValueTests
2+
open FSharp.Data
33
open FSharp.Data.SqlClient
4-
#else
5-
module FSharp.Data.SqlClient.SpReturnValueTests
6-
#endif
4+
open FSharp.Data.SqlClient.Tests
75

86
open System
97
open Xunit

tests/SqlClient.Tests/SqlClient.DesignTime.Tests.dll.html

-57
This file was deleted.

tests/SqlClient.Tests/SqlClient.DesignTime.Tests.dll.xml

-1
This file was deleted.

0 commit comments

Comments
 (0)