diff --git a/TestPlatform.sln b/TestPlatform.sln
index 76ab1ea65e..fe0b57379b 100644
--- a/TestPlatform.sln
+++ b/TestPlatform.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
-VisualStudioVersion = 15.0.26009.0
+VisualStudioVersion = 15.0.26005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{ED0C35EB-7F31-4841-A24F-8EB708FFA959}"
EndProject
@@ -118,6 +118,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PerfTestProject", "test\Tes
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleDataCollector", "test\TestAssets\SimpleDataCollector\SimpleDataCollector.csproj", "{D62D754C-8F0A-406F-8BA7-E96C6FFA7C7C}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleTestProject3", "test\TestAssets\SimpleTestProject3\SimpleTestProject3.csproj", "{82E75225-FA92-4F87-909D-039D62F96BFF}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -644,6 +646,18 @@ Global
{D62D754C-8F0A-406F-8BA7-E96C6FFA7C7C}.Release|x64.Build.0 = Release|Any CPU
{D62D754C-8F0A-406F-8BA7-E96C6FFA7C7C}.Release|x86.ActiveCfg = Release|Any CPU
{D62D754C-8F0A-406F-8BA7-E96C6FFA7C7C}.Release|x86.Build.0 = Release|Any CPU
+ {82E75225-FA92-4F87-909D-039D62F96BFF}.Debug|Any CPU.ActiveCfg = Release|Any CPU
+ {82E75225-FA92-4F87-909D-039D62F96BFF}.Debug|Any CPU.Build.0 = Release|Any CPU
+ {82E75225-FA92-4F87-909D-039D62F96BFF}.Debug|x64.ActiveCfg = Release|Any CPU
+ {82E75225-FA92-4F87-909D-039D62F96BFF}.Debug|x64.Build.0 = Release|Any CPU
+ {82E75225-FA92-4F87-909D-039D62F96BFF}.Debug|x86.ActiveCfg = Release|Any CPU
+ {82E75225-FA92-4F87-909D-039D62F96BFF}.Debug|x86.Build.0 = Release|Any CPU
+ {82E75225-FA92-4F87-909D-039D62F96BFF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {82E75225-FA92-4F87-909D-039D62F96BFF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {82E75225-FA92-4F87-909D-039D62F96BFF}.Release|x64.ActiveCfg = Release|Any CPU
+ {82E75225-FA92-4F87-909D-039D62F96BFF}.Release|x64.Build.0 = Release|Any CPU
+ {82E75225-FA92-4F87-909D-039D62F96BFF}.Release|x86.ActiveCfg = Release|Any CPU
+ {82E75225-FA92-4F87-909D-039D62F96BFF}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -698,5 +712,6 @@ Global
{A23E3408-D569-488E-A071-E1B3625C5F09} = {8DA7CBD9-F17E-41B6-90C4-CFF55848A25A}
{57B182B8-9014-4C6D-B966-B464DE3127D5} = {8DA7CBD9-F17E-41B6-90C4-CFF55848A25A}
{D62D754C-8F0A-406F-8BA7-E96C6FFA7C7C} = {8DA7CBD9-F17E-41B6-90C4-CFF55848A25A}
+ {82E75225-FA92-4F87-909D-039D62F96BFF} = {8DA7CBD9-F17E-41B6-90C4-CFF55848A25A}
EndGlobalSection
EndGlobal
diff --git a/src/Microsoft.TestPlatform.ObjectModel/Navigation/PortablePdbReader.cs b/src/Microsoft.TestPlatform.ObjectModel/Navigation/PortablePdbReader.cs
index e6f7648451..fabea7016e 100644
--- a/src/Microsoft.TestPlatform.ObjectModel/Navigation/PortablePdbReader.cs
+++ b/src/Microsoft.TestPlatform.ObjectModel/Navigation/PortablePdbReader.cs
@@ -97,10 +97,10 @@ private static void GetMethodStartAndEndLineNumber(
out int startLineNumber,
out int endLineNumber)
{
- var startPoint = methodDebugDefinition.GetSequencePoints().OrderBy(s => s.StartLine).FirstOrDefault();
+ var startPoint = methodDebugDefinition.GetSequencePoints().OrderBy(s => s.StartLine).FirstOrDefault(s => s.IsHidden == false);
startLineNumber = startPoint.StartLine;
var endPoint =
- methodDebugDefinition.GetSequencePoints().OrderByDescending(s => s.StartLine).FirstOrDefault();
+ methodDebugDefinition.GetSequencePoints().OrderByDescending(s => s.StartLine).FirstOrDefault(s => s.IsHidden == false);
endLineNumber = endPoint.StartLine;
}
diff --git a/test/Microsoft.TestPlatform.Common.UnitTests/Microsoft.TestPlatform.Common.UnitTests.csproj b/test/Microsoft.TestPlatform.Common.UnitTests/Microsoft.TestPlatform.Common.UnitTests.csproj
index 702177b810..e61506db0b 100644
--- a/test/Microsoft.TestPlatform.Common.UnitTests/Microsoft.TestPlatform.Common.UnitTests.csproj
+++ b/test/Microsoft.TestPlatform.Common.UnitTests/Microsoft.TestPlatform.Common.UnitTests.csproj
@@ -1,22 +1,18 @@
-
+
$(MSBuildThisFileDirectory)../../
true
-
-
Exe
netcoreapp1.0;net46
Microsoft.TestPlatform.Common.UnitTests
$(PackageTargetFallback);dnxcore50;portable-net45+win8
-
-
@@ -31,26 +27,25 @@
-
1.0.0
-
-
+
+
+
-
-
+
\ No newline at end of file
diff --git a/test/Microsoft.TestPlatform.CommunicationUtilities.UnitTests/Microsoft.TestPlatform.CommunicationUtilities.UnitTests.csproj b/test/Microsoft.TestPlatform.CommunicationUtilities.UnitTests/Microsoft.TestPlatform.CommunicationUtilities.UnitTests.csproj
index 765ce55e9e..9342224eae 100644
--- a/test/Microsoft.TestPlatform.CommunicationUtilities.UnitTests/Microsoft.TestPlatform.CommunicationUtilities.UnitTests.csproj
+++ b/test/Microsoft.TestPlatform.CommunicationUtilities.UnitTests/Microsoft.TestPlatform.CommunicationUtilities.UnitTests.csproj
@@ -4,18 +4,15 @@
true
-
Exe
netcoreapp1.0;net46
Microsoft.TestPlatform.CommunicationUtilities.UnitTests
$(PackageTargetFallback);dnxcore50;portable-net45+win8
-
-
@@ -28,19 +25,19 @@
true
-
1.0.0
-
-
+
+
+
-
+
\ No newline at end of file
diff --git a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Microsoft.TestPlatform.CrossPlatEngine.UnitTests.csproj b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Microsoft.TestPlatform.CrossPlatEngine.UnitTests.csproj
index cfddfa336d..c33a0cd024 100644
--- a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Microsoft.TestPlatform.CrossPlatEngine.UnitTests.csproj
+++ b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Microsoft.TestPlatform.CrossPlatEngine.UnitTests.csproj
@@ -4,18 +4,15 @@
true
-
Exe
netcoreapp1.0;net46
Microsoft.TestPlatform.CrossPlatEngine.UnitTests
$(PackageTargetFallback);dnxcore50;portable-net45+win8
-
-
@@ -28,19 +25,19 @@
true
-
1.0.0
-
+
-
-
+
+
+
-
+
\ No newline at end of file
diff --git a/test/Microsoft.TestPlatform.ObjectModel.PlatformTests/DiaSessionTests.cs b/test/Microsoft.TestPlatform.ObjectModel.PlatformTests/DiaSessionTests.cs
index 60edd776e0..e851f806b7 100644
--- a/test/Microsoft.TestPlatform.ObjectModel.PlatformTests/DiaSessionTests.cs
+++ b/test/Microsoft.TestPlatform.ObjectModel.PlatformTests/DiaSessionTests.cs
@@ -40,8 +40,44 @@ public void GetNavigationDataShouldReturnCorrectFileNameAndLineNumber()
Assert.IsNotNull(diaNavigationData, "Failed to get navigation data");
StringAssert.EndsWith(diaNavigationData.FileName, @"\SimpleTestProject\UnitTest1.cs");
- Assert.AreEqual(diaNavigationData.MinLineNumber, 23);
- Assert.AreEqual(diaNavigationData.MaxLineNumber, 25);
+ Assert.AreEqual(23, diaNavigationData.MinLineNumber, "Incorrect min line number");
+ Assert.AreEqual(25, diaNavigationData.MaxLineNumber, "Incorrect max line number");
+
+ this.testEnvironment.TargetFramework = currentTargetFrameWork;
+ }
+
+ [TestMethod]
+ public void GetNavigationDataShouldReturnCorrectDataForAsyncMethod()
+ {
+ var currentTargetFrameWork = GetAndSetTargetFrameWork(this.testEnvironment);
+ var assemblyPath = this.GetAssetFullPath("SimpleTestProject3.dll");
+
+ DiaSession diaSession = new DiaSession(assemblyPath);
+ DiaNavigationData diaNavigationData = diaSession.GetNavigationData("SampleUnitTestProject3.UnitTest1+d__1", "MoveNext");
+
+ Assert.IsNotNull(diaNavigationData, "Failed to get navigation data");
+ StringAssert.EndsWith(diaNavigationData.FileName, @"\SimpleTestProject3\UnitTest1.cs");
+
+ Assert.AreEqual(20, diaNavigationData.MinLineNumber, "Incorrect min line number");
+ Assert.AreEqual(22, diaNavigationData.MaxLineNumber, "Incorrect max line number");
+
+ this.testEnvironment.TargetFramework = currentTargetFrameWork;
+ }
+
+ [TestMethod]
+ public void GetNavigationDataShouldReturnCorrectDataForOverLoadedMethod()
+ {
+ var currentTargetFrameWork = GetAndSetTargetFrameWork(this.testEnvironment);
+ var assemblyPath = this.GetAssetFullPath("SimpleTestProject3.dll");
+
+ DiaSession diaSession = new DiaSession(assemblyPath);
+ DiaNavigationData diaNavigationData = diaSession.GetNavigationData("SampleUnitTestProject3.Class1", "OverLoadededMethod");
+
+ Assert.IsNotNull(diaNavigationData, "Failed to get navigation data");
+ StringAssert.EndsWith(diaNavigationData.FileName, @"\SimpleTestProject3\UnitTest1.cs");
+
+ Assert.AreEqual(32, diaNavigationData.MinLineNumber, "Incorrect min line number");
+ Assert.AreEqual(33, diaNavigationData.MaxLineNumber, "Incorrect max line number");
this.testEnvironment.TargetFramework = currentTargetFrameWork;
}
diff --git a/test/TestAssets/PerfTestProject/PerfTestProject.csproj b/test/TestAssets/PerfTestProject/PerfTestProject.csproj
index 53a3878a9a..3868ff5b66 100644
--- a/test/TestAssets/PerfTestProject/PerfTestProject.csproj
+++ b/test/TestAssets/PerfTestProject/PerfTestProject.csproj
@@ -1,6 +1,5 @@
-
+
-
netcoreapp1.0;net46
PerfTestProject
@@ -14,13 +13,11 @@
false
false
-
-
1.0.0-alpha-20161104-2
@@ -33,26 +30,24 @@
1.0.4-preview
-
1.0.0
-
-
portable
-
+
+ full
+
$(DefineConstants);RELEASE
-
-
+
\ No newline at end of file
diff --git a/test/TestAssets/SimpleTestProject/SimpleTestProject.csproj b/test/TestAssets/SimpleTestProject/SimpleTestProject.csproj
index 2384dadc14..685445c6d1 100644
--- a/test/TestAssets/SimpleTestProject/SimpleTestProject.csproj
+++ b/test/TestAssets/SimpleTestProject/SimpleTestProject.csproj
@@ -1,4 +1,4 @@
-
+
netcoreapp1.0;net46;netcoreapp1.1
@@ -53,6 +53,9 @@
portable
+
+ full
+
$(DefineConstants);RELEASE
diff --git a/test/TestAssets/SimpleTestProject2/SimpleTestProject2.csproj b/test/TestAssets/SimpleTestProject2/SimpleTestProject2.csproj
index 5f0383fa90..9b026d5420 100644
--- a/test/TestAssets/SimpleTestProject2/SimpleTestProject2.csproj
+++ b/test/TestAssets/SimpleTestProject2/SimpleTestProject2.csproj
@@ -1,4 +1,4 @@
-
+
netcoreapp1.0;net46;netcoreapp1.1
@@ -25,22 +25,20 @@
1.1.6-preview
-
+
15.0.0-preview-20161123-03
1.0.1
-
+
-
1.1.0
-
@@ -49,6 +47,12 @@
+
+ portable
+
+
+ full
+
$(DefineConstants);RELEASE
diff --git a/test/TestAssets/SimpleTestProject3/SimpleTestProject3.csproj b/test/TestAssets/SimpleTestProject3/SimpleTestProject3.csproj
new file mode 100644
index 0000000000..a656902bfe
--- /dev/null
+++ b/test/TestAssets/SimpleTestProject3/SimpleTestProject3.csproj
@@ -0,0 +1,60 @@
+
+
+
+ netcoreapp1.0;net46;netcoreapp1.1
+ SimpleTestProject3
+ $(PackageTargetFallback);dnxcore50;portable-net45+win8
+ Exe
+
+
+
+
+
+
+
+
+ 1.0.0-alpha-20161104-2
+ All
+
+
+ 1.6.0
+
+
+ 1.0.6-preview
+
+
+ 1.1.6-preview
+
+
+ 15.0.0-preview-20161123-03
+
+
+
+
+ 1.0.1
+
+
+
+
+ 1.1.0
+
+
+
+
+
+
+
+
+
+
+
+ portable
+
+
+ full
+
+
+ $(DefineConstants);RELEASE
+
+
+
\ No newline at end of file
diff --git a/test/TestAssets/SimpleTestProject3/UnitTest1.cs b/test/TestAssets/SimpleTestProject3/UnitTest1.cs
new file mode 100644
index 0000000000..5f9361306b
--- /dev/null
+++ b/test/TestAssets/SimpleTestProject3/UnitTest1.cs
@@ -0,0 +1,35 @@
+// Copyright (c) Microsoft. All rights reserved.
+
+using System.Threading.Tasks;
+
+namespace SampleUnitTestProject3
+{
+ using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+ [TestClass]
+ public class UnitTest1
+ {
+ [TestMethod]
+ public void PassingTest()
+ {
+ Assert.AreEqual(2, 2);
+ }
+
+ [TestMethod]
+ public async Task AsyncTestMethod()
+ {
+ await Task.CompletedTask;
+ }
+ }
+
+ public class Class1
+ {
+ public void OverLoadededMethod()
+ {
+ }
+
+ public void OverLoadededMethod(string name)
+ {
+ }
+ }
+}
diff --git a/test/vstest.console.UnitTests/vstest.console.UnitTests.csproj b/test/vstest.console.UnitTests/vstest.console.UnitTests.csproj
index 995ede1750..3551a02a31 100644
--- a/test/vstest.console.UnitTests/vstest.console.UnitTests.csproj
+++ b/test/vstest.console.UnitTests/vstest.console.UnitTests.csproj
@@ -4,18 +4,15 @@
true
-
Exe
netcoreapp1.0;net46
vstest.console.UnitTests
$(PackageTargetFallback);dnxcore50;portable-net45+win8
-
-
@@ -38,13 +35,11 @@
true
-
1.0.0
-
+
-
@@ -52,6 +47,8 @@
-
+
+
+
-
+
\ No newline at end of file