Skip to content

Commit

Permalink
Fix ApiApprovalTests to run in debug or release
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane32 committed Apr 26, 2024
1 parent 109989c commit e12a695
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion QRCoderApiTests/ApiApprovalTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ public void PublicApi(Type type)
string projectName = type.Assembly.GetName().Name!;
string testDir = Path.Combine(baseDir, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..");
string projectDir = Path.Combine(testDir, "..");
string buildDir = Path.Combine(projectDir, projectName, "bin", "Release");
string buildDir = Path.Combine(projectDir, projectName, "bin",
#if DEBUG
"Debug");
#else
"Release");
#endif
Debug.Assert(Directory.Exists(buildDir), $"Directory '{buildDir}' doesn't exist");
string csProject = Path.Combine(projectDir, projectName, projectName + ".csproj");
var project = XDocument.Load(csProject);
Expand Down

0 comments on commit e12a695

Please sign in to comment.