Skip to content

Commit

Permalink
Port issue 1466 to V4
Browse files Browse the repository at this point in the history
  • Loading branch information
CharliePoole committed Dec 28, 2024
1 parent acef844 commit c26d339
Show file tree
Hide file tree
Showing 3 changed files with 194 additions and 94 deletions.
18 changes: 9 additions & 9 deletions package-tests.cake
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,15 @@ StandardRunnerTests.Add(new PackageTest(
// WPF TESTS
//////////////////////////////////////////////////////////////////////

//AddToBothLists(new PackageTest(
// 1, "Net60WPFTest", "Run test using WPF under .NET 6.0",
// "testdata/net6.0-windows/WpfTest.dll --trace=Debug",
// new ExpectedResult("Passed") { Assemblies = new[] { new ExpectedAssemblyResult("WpfTest.dll", "netcore-6.0") } }));
AddToBothLists(new PackageTest(
1, "Net60WPFTest", "Run test using WPF under .NET 6.0",
"testdata/net6.0-windows/WpfTest.dll --trace=Debug",
new ExpectedResult("Passed") { Assemblies = new[] { new ExpectedAssemblyResult("WpfTest.dll", "netcore-6.0") } }));

//AddToBothLists(new PackageTest(
// 1, "Net80WPFTest", "Run test using WPF under .NET 8.0",
// "testdata/net8.0-windows/WpfTest.dll --trace=Debug",
// new ExpectedResult("Passed") { Assemblies = new[] { new ExpectedAssemblyResult("WpfTest.dll", "netcore-8.0") } }));
AddToBothLists(new PackageTest(
1, "Net80WPFTest", "Run test using WPF under .NET 8.0",
"testdata/net8.0-windows/WpfTest.dll --trace=Debug",
new ExpectedResult("Passed") { Assemblies = new[] { new ExpectedAssemblyResult("WpfTest.dll", "netcore-8.0") } }));

//////////////////////////////////////////////////////////////////////
// RUN TESTS USING EACH OF OUR EXTENSIONS
Expand Down Expand Up @@ -363,7 +363,7 @@ AddToBothLists(new PackageTest(
}
}));

StandardRunnerTests.Add(new PackageTest(
AddToBothLists(new PackageTest(
1, "AppContextBaseDirectory_NET80",
"Test Setting the BaseDirectory to match test assembly location under .NET 8.0",
"testdata/net8.0/AppContextTest.dll",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ internal sealed class TestAssemblyLoadContext : AssemblyLoadContext
{
private static readonly Logger log = InternalTrace.GetLogger(typeof(TestAssemblyLoadContext));

private readonly string _testAssemblyPath;
private readonly string _basePath;
private readonly TestAssemblyResolver _resolver;
private readonly System.Runtime.Loader.AssemblyDependencyResolver _runtimeResolver;

public TestAssemblyLoadContext(string testAssemblyPath)
{
_testAssemblyPath = testAssemblyPath;
_resolver = new TestAssemblyResolver(this, testAssemblyPath);
_basePath = Path.GetDirectoryName(testAssemblyPath);
_runtimeResolver = new AssemblyDependencyResolver(testAssemblyPath);
Expand Down
Loading

0 comments on commit c26d339

Please sign in to comment.