Skip to content

Commit dac4019

Browse files
committed
Added solution & project files
1 parent 0e88b6d commit dac4019

File tree

12 files changed

+366
-0
lines changed

12 files changed

+366
-0
lines changed
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>9c582785-e24e-441c-b2f7-2c2a979f6a3e</ProjectGuid>
9+
<OutputType>Library</OutputType>
10+
<RootNamespace>SemanticDiff.Core</RootNamespace>
11+
<AssemblyName>SemanticDiff.Core</AssemblyName>
12+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13+
<Name>SemanticDiff.Core</Name>
14+
</PropertyGroup>
15+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16+
<DebugSymbols>true</DebugSymbols>
17+
<DebugType>full</DebugType>
18+
<Optimize>false</Optimize>
19+
<Tailcalls>false</Tailcalls>
20+
<OutputPath>bin\Debug\</OutputPath>
21+
<DefineConstants>DEBUG;TRACE</DefineConstants>
22+
<WarningLevel>3</WarningLevel>
23+
<DocumentationFile>bin\Debug\SemanticDiff.Core.XML</DocumentationFile>
24+
</PropertyGroup>
25+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26+
<DebugType>pdbonly</DebugType>
27+
<Optimize>true</Optimize>
28+
<Tailcalls>true</Tailcalls>
29+
<OutputPath>bin\Release\</OutputPath>
30+
<DefineConstants>TRACE</DefineConstants>
31+
<WarningLevel>3</WarningLevel>
32+
<DocumentationFile>bin\Release\SemanticDiff.Core.XML</DocumentationFile>
33+
</PropertyGroup>
34+
<ItemGroup>
35+
<Reference Include="mscorlib" />
36+
<Reference Include="FSharp.Core, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
37+
<Private>True</Private>
38+
</Reference>
39+
<Reference Include="Roslyn.Compilers, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
40+
<Private>True</Private>
41+
</Reference>
42+
<Reference Include="Roslyn.Compilers.CSharp, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
43+
<Private>True</Private>
44+
</Reference>
45+
<Reference Include="Roslyn.Compilers.VisualBasic, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
46+
<Private>True</Private>
47+
</Reference>
48+
<Reference Include="Roslyn.Services, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
49+
<Private>True</Private>
50+
</Reference>
51+
<Reference Include="Roslyn.Services.CSharp, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
52+
<Private>True</Private>
53+
</Reference>
54+
<Reference Include="Roslyn.Services.VisualBasic, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
55+
<Private>True</Private>
56+
</Reference>
57+
<Reference Include="Roslyn.Utilities, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
58+
<Private>True</Private>
59+
</Reference>
60+
<Reference Include="System" />
61+
<Reference Include="System.Core" />
62+
<Reference Include="System.Numerics" />
63+
</ItemGroup>
64+
<ItemGroup>
65+
<None Include="packages.config" />
66+
</ItemGroup>
67+
<PropertyGroup>
68+
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
69+
</PropertyGroup>
70+
<Import Project="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets" Condition=" Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets')" />
71+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
72+
Other similar extension points exist, see Microsoft.Common.targets.
73+
<Target Name="BeforeBuild">
74+
</Target>
75+
<Target Name="AfterBuild">
76+
</Target>
77+
-->
78+
</Project>

SemanticDiff.Core/packages.config

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="Roslyn" version="1.2.20906.2" targetFramework="net45" />
4+
<package id="Roslyn.Compilers.Common" version="1.2.20906.2" targetFramework="net45" />
5+
<package id="Roslyn.Compilers.CSharp" version="1.2.20906.2" targetFramework="net45" />
6+
<package id="Roslyn.Compilers.VisualBasic" version="1.2.20906.2" targetFramework="net45" />
7+
<package id="Roslyn.Services.Common" version="1.2.20906.2" targetFramework="net45" />
8+
<package id="Roslyn.Services.CSharp" version="1.2.20906.2" targetFramework="net45" />
9+
<package id="Roslyn.Services.VisualBasic" version="1.2.20906.2" targetFramework="net45" />
10+
</packages>

SemanticDiff.Runner/App.config

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
5+
</startup>
6+
<runtime>
7+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
8+
<dependentAssembly>
9+
<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
10+
<bindingRedirect oldVersion="4.0.0.0" newVersion="4.3.0.0"/>
11+
<bindingRedirect oldVersion="2.3.5.0" newVersion="4.3.0.0"/>
12+
<bindingRedirect oldVersion="2.0.0.0" newVersion="4.3.0.0"/>
13+
14+
</dependentAssembly>
15+
</assemblyBinding>
16+
</runtime>
17+
</configuration>

SemanticDiff.Runner/Program.fs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Learn more about F# at http://fsharp.net
2+
// See the 'F# Tutorial' project for more help.
3+
4+
[<EntryPoint>]
5+
let main argv =
6+
printfn "%A" argv
7+
0 // return an integer exit code
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>fd8a4e8a-f71b-4f55-abd2-555b49de8f2c</ProjectGuid>
9+
<OutputType>Exe</OutputType>
10+
<RootNamespace>SemanticDiff.Runner</RootNamespace>
11+
<AssemblyName>SemanticDiff.Runner</AssemblyName>
12+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13+
<Name>SemanticDiff.Runner</Name>
14+
</PropertyGroup>
15+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16+
<DebugSymbols>true</DebugSymbols>
17+
<DebugType>full</DebugType>
18+
<Optimize>false</Optimize>
19+
<Tailcalls>false</Tailcalls>
20+
<OutputPath>bin\Debug\</OutputPath>
21+
<DefineConstants>DEBUG;TRACE</DefineConstants>
22+
<WarningLevel>3</WarningLevel>
23+
<PlatformTarget>AnyCPU</PlatformTarget>
24+
<DocumentationFile>bin\Debug\SemanticDiff.Runner.XML</DocumentationFile>
25+
<Prefer32Bit>true</Prefer32Bit>
26+
</PropertyGroup>
27+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28+
<DebugType>pdbonly</DebugType>
29+
<Optimize>true</Optimize>
30+
<Tailcalls>true</Tailcalls>
31+
<OutputPath>bin\Release\</OutputPath>
32+
<DefineConstants>TRACE</DefineConstants>
33+
<WarningLevel>3</WarningLevel>
34+
<PlatformTarget>AnyCPU</PlatformTarget>
35+
<DocumentationFile>bin\Release\SemanticDiff.Runner.XML</DocumentationFile>
36+
<Prefer32Bit>true</Prefer32Bit>
37+
</PropertyGroup>
38+
<ItemGroup>
39+
<Reference Include="mscorlib" />
40+
<Reference Include="FSharp.Core, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
41+
<Private>True</Private>
42+
</Reference>
43+
<Reference Include="System" />
44+
<Reference Include="System.Core" />
45+
<Reference Include="System.Numerics" />
46+
</ItemGroup>
47+
<ItemGroup>
48+
<Compile Include="Program.fs" />
49+
<None Include="App.config" />
50+
</ItemGroup>
51+
<PropertyGroup>
52+
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
53+
</PropertyGroup>
54+
<Import Project="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets" Condition=" Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets')" />
55+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
56+
Other similar extension points exist, see Microsoft.Common.targets.
57+
<Target Name="BeforeBuild">
58+
</Target>
59+
<Target Name="AfterBuild">
60+
</Target>
61+
-->
62+
</Project>

SemanticDiff.Tests/App.config

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<runtime>
4+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
5+
<dependentAssembly>
6+
<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
7+
<bindingRedirect oldVersion="4.0.0.0" newVersion="4.3.0.0"/>
8+
<bindingRedirect oldVersion="2.3.5.0" newVersion="4.3.0.0"/>
9+
<bindingRedirect oldVersion="2.0.0.0" newVersion="4.3.0.0"/>
10+
</dependentAssembly>
11+
</assemblyBinding>
12+
</runtime>
13+
</configuration>

SemanticDiff.Tests/Experiments.fs

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
module Experiments
2+
3+
open System
4+
open Microsoft.VisualStudio.TestTools.UnitTesting
5+
6+
open Roslyn.Compilers
7+
open Roslyn.Compilers.CSharp
8+
open Roslyn.Compilers.Common
9+
open Roslyn.Services
10+
open Roslyn.Services.CSharp
11+
12+
let sampleCode = "void foo()\
13+
{
14+
int i = 1 + 1;
15+
}"
16+
17+
let sampleCode2 = "void foo()\
18+
{ /* Same Code
19+
But with comments... */
20+
int i=1+1;
21+
// ... and whitespace changes
22+
}"
23+
24+
[<TestClass>]
25+
type RoslynBasicExperiments() =
26+
27+
[<TestMethod>]
28+
member this.GenerateSimpleAST () =
29+
Assert.AreNotEqual(String.Empty, sampleCode)
30+
31+
let ast1 = SyntaxTree.ParseText sampleCode
32+
let identical_ast = SyntaxTree.ParseText sampleCode
33+
let ast2 = SyntaxTree.ParseText sampleCode2
34+
35+
Assert.AreNotEqual(ast1, identical_ast)
36+
37+
(* The "IsEquivalentTo" disregards SyntaxTrivia *)
38+
Assert.IsTrue(ast1.IsEquivalentTo ast2)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RunSettings>
3+
<MSTest>
4+
<ForcedLegacyMode>true</ForcedLegacyMode>
5+
</MSTest>
6+
</RunSettings>
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<SchemaVersion>2.0</SchemaVersion>
7+
<ProjectGuid>1f3ede6e-7d84-45bd-9b0c-00198760a714</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<RootNamespace>SemanticDiff.Tests</RootNamespace>
10+
<AssemblyName>SemanticDiff.Tests</AssemblyName>
11+
<targetframeworkversion>4.5</targetframeworkversion>
12+
<Name>FsUnitTest</Name>
13+
</PropertyGroup>
14+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
15+
<DebugSymbols>true</DebugSymbols>
16+
<DebugType>full</DebugType>
17+
<Optimize>false</Optimize>
18+
<Tailcalls>false</Tailcalls>
19+
<OutputPath>bin\Debug\</OutputPath>
20+
<DefineConstants>DEBUG;TRACE</DefineConstants>
21+
<WarningLevel>3</WarningLevel>
22+
<DocumentationFile>bin\Debug\FsUnitTest.XML</DocumentationFile>
23+
</PropertyGroup>
24+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
25+
<DebugType>pdbonly</DebugType>
26+
<Optimize>true</Optimize>
27+
<Tailcalls>true</Tailcalls>
28+
<OutputPath>bin\Release\</OutputPath>
29+
<DefineConstants>TRACE</DefineConstants>
30+
<WarningLevel>3</WarningLevel>
31+
<DocumentationFile>bin\Release\FsUnitTest.XML</DocumentationFile>
32+
</PropertyGroup>
33+
<ItemGroup>
34+
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
35+
<Reference Include="mscorlib" />
36+
<Reference Include="FSharp.Core, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
37+
<Private>True</Private>
38+
</Reference>
39+
<Reference Include="Roslyn.Compilers, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
40+
<Private>True</Private>
41+
</Reference>
42+
<Reference Include="Roslyn.Compilers.CSharp, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
43+
<Private>True</Private>
44+
</Reference>
45+
<Reference Include="Roslyn.Compilers.VisualBasic, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
46+
<Private>True</Private>
47+
</Reference>
48+
<Reference Include="Roslyn.Services, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
49+
<Private>True</Private>
50+
</Reference>
51+
<Reference Include="Roslyn.Services.CSharp, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
52+
<Private>True</Private>
53+
</Reference>
54+
<Reference Include="Roslyn.Services.VisualBasic, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
55+
<Private>True</Private>
56+
</Reference>
57+
<Reference Include="Roslyn.Utilities, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
58+
<Private>True</Private>
59+
</Reference>
60+
<Reference Include="System" />
61+
<Reference Include="System.Core" />
62+
<Reference Include="System.Numerics" />
63+
</ItemGroup>
64+
<ItemGroup>
65+
<Compile Include="UnitTest.fs" />
66+
<None Include="App.config" />
67+
<None Include="MSTest.runsettings" />
68+
<None Include="packages.config" />
69+
<Compile Include="Experiments.fs" />
70+
</ItemGroup>
71+
<PropertyGroup>
72+
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
73+
</PropertyGroup>
74+
<Import Project="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets" Condition=" Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets')" />
75+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
76+
Other similar extension points exist, see Microsoft.Common.targets.
77+
<Target Name="BeforeBuild">
78+
</Target>
79+
<Target Name="AfterBuild">
80+
</Target>
81+
-->
82+
</Project>

SemanticDiff.Tests/UnitTest.fs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
namespace UnitTestProject1
2+
3+
open System
4+
open Microsoft.VisualStudio.TestTools.UnitTesting
5+
6+
[<TestClass>]
7+
type UnitTest() =
8+
[<TestMethod>]
9+
member x.TestMethod1 () =
10+
let testVal = 1
11+
Assert.AreEqual(1, testVal)

0 commit comments

Comments
 (0)