You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context: #1916
These tests were never quite right, since they were just looking for
instances of `TargetFrameworkVersion` in the build log. This would
match for inputs and outputs, and wasn't actually testing anything
because it appeared to always pass.
In #1916 I improved them by looking for `Output Property:
TargetFrameworkVersion=v2.3`, but they were not passing.
Two issues to fix:
- These tests should set `AndroidUseLatestPlatformSdk=False`
- These tests shouldn't use `StringAssertEx.Contains` because it calls
`Assert.Pass`, skipping any future assertions...
When testing on Windows, these tests get skipped, so I had to fix
things on Mac. The PR builder also skips them, so we did not see the
issue until it was merged into master.
Assert.Ignore("This is a Pull Request Build. Ignoring test.");
1729
1730
Assert.IsTrue(builder.Build(proj),"Build should have succeeded.");
1730
-
StringAssertEx.Contains($"Output Property: TargetFrameworkVersion=v2.3",builder.LastBuildOutput,"TargetFrameworkVerson should be v2.3");
1731
+
Assert.IsTrue(StringAssertEx.ContainsText(builder.LastBuildOutput,$"Output Property: TargetFrameworkVersion=v2.3"),"TargetFrameworkVerson should be v2.3");
1731
1732
Assert.IsTrue(builder.Build(proj,parameters:new[]{"TargetFrameworkVersion=v4.4"}),"Build should have succeeded.");
1732
-
StringAssertEx.Contains($"Output Property: TargetFrameworkVersion=v4.4",builder.LastBuildOutput,"TargetFrameworkVerson should be v4.4");
1733
+
Assert.IsTrue(StringAssertEx.ContainsText(builder.LastBuildOutput,$"Output Property: TargetFrameworkVersion=v4.4"),"TargetFrameworkVerson should be v4.4");
1733
1734
1734
1735
}
1735
1736
}
@@ -2161,14 +2162,15 @@ public void CheckTargetFrameworkVersion ()
Assert.Ignore("This is a Pull Request Build. Ignoring test.");
2168
2170
Assert.IsTrue(builder.Build(proj),"Build should have succeeded.");
2169
-
StringAssertEx.Contains($"Output Property: TargetFrameworkVersion=v2.3",builder.LastBuildOutput,"TargetFrameworkVerson should be v2.3");
2171
+
Assert.IsTrue(StringAssertEx.ContainsText(builder.LastBuildOutput,$"Output Property: TargetFrameworkVersion=v2.3"),"TargetFrameworkVerson should be v2.3");
2170
2172
Assert.IsTrue(builder.Build(proj,parameters:new[]{"TargetFrameworkVersion=v4.4"}),"Build should have succeeded.");
2171
-
StringAssertEx.Contains($"Output Property: TargetFrameworkVersion=v4.4",builder.LastBuildOutput,"TargetFrameworkVerson should be v4.4");
2173
+
Assert.IsTrue(StringAssertEx.ContainsText(builder.LastBuildOutput,$"Output Property: TargetFrameworkVersion=v4.4"),"TargetFrameworkVerson should be v4.4");
0 commit comments