Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions eng/testing/tests.singlefile.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<PropertyGroup>
<OutputType>Exe</OutputType>

<DefineConstants>$(DefineConstants);SINGLE_FILE_TEST_RUNNER</DefineConstants>

<BundleDir>$([MSBuild]::NormalizeDirectory('$(OutDir)', 'publish'))</BundleDir>
<RunScriptOutputPath>$([MSBuild]::NormalizePath('$(BundleDir)', '$(RunScriptOutputName)'))</RunScriptOutputPath>
<RuntimeIdentifier>$(PackageRID)</RuntimeIdentifier>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ public void CustomAttributes()
[Fact]
public void FullyQualifiedName()
{
#if SINGLE_FILE_TEST_RUNNER
Assert.Equal("<Unknown>", Module.FullyQualifiedName);
#else
var loc = AssemblyPathHelper.GetAssemblyLocation(Assembly.GetExecutingAssembly());

// Browser will include the path (/), so strip it
Expand All @@ -90,12 +93,17 @@ public void FullyQualifiedName()
}

Assert.Equal(loc, Module.FullyQualifiedName);
#endif
}

[Fact]
public void Name()
{
#if SINGLE_FILE_TEST_RUNNER
Assert.Equal("<Unknown>", Module.Name, ignoreCase: true);
#else
Assert.Equal("system.runtime.tests.dll", Module.Name, ignoreCase: true);
#endif
}

[Fact]
Expand Down