Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUnknown <michaelv@unity3d.com>2019-05-31 05:01:15 +0300
committerMarek Safar <marek.safar@gmail.com>2019-05-31 09:44:52 +0300
commitbdd0765bb1bace90a59ca123dacf9167941dfbc2 (patch)
tree2fec87b6d2a11557e22269b1625e10f7e552a5ca /test/Mono.Linker.Tests
parent12adeafab1ae903118dd9cd8d47c7e5bccc13361 (diff)
Adjust how tests are asserted
We are hitting ever more complex scenarios in our linker. I'm finding that I'd rather know that the IL was valid before worrying about getting all the types, methods, etc correctly annotated with [Kept] attributes. In our linker test framework we have extra attributes to allow for the cases to be executed and the output asserted. `InitialChecking` will be the place where we do that. Again, I'd rather see these failures first before I invest the time correctly annotating the kept attributes.
Diffstat (limited to 'test/Mono.Linker.Tests')
-rw-r--r--test/Mono.Linker.Tests/TestCasesRunner/ResultChecker.cs19
1 files changed, 12 insertions, 7 deletions
diff --git a/test/Mono.Linker.Tests/TestCasesRunner/ResultChecker.cs b/test/Mono.Linker.Tests/TestCasesRunner/ResultChecker.cs
index ea3eaf950..1280a57f9 100644
--- a/test/Mono.Linker.Tests/TestCasesRunner/ResultChecker.cs
+++ b/test/Mono.Linker.Tests/TestCasesRunner/ResultChecker.cs
@@ -49,20 +49,17 @@ namespace Mono.Linker.Tests.TestCasesRunner {
try
{
var original = ResolveOriginalsAssembly (linkResult.ExpectationsAssemblyPath.FileNameWithoutExtension);
+ var linked = ResolveLinkedAssembly (linkResult.OutputAssemblyPath.FileNameWithoutExtension);
+
+ InitialChecking (linkResult, original, linked);
+
PerformOutputAssemblyChecks (original, linkResult.OutputAssemblyPath.Parent);
PerformOutputSymbolChecks (original, linkResult.OutputAssemblyPath.Parent);
- var linked = ResolveLinkedAssembly (linkResult.OutputAssemblyPath.FileNameWithoutExtension);
-
CreateAssemblyChecker (original, linked).Verify ();
VerifyLinkingOfOtherAssemblies (original);
-#if !NETCOREAPP
- // the PE Verifier does not know how to resolve .NET Core assemblies.
- _peVerifier.Check (linkResult, original);
-#endif
-
AdditionalChecking (linkResult, original, linked);
}
finally
@@ -170,6 +167,14 @@ namespace Mono.Linker.Tests.TestCasesRunner {
{
}
+ protected virtual void InitialChecking (LinkedTestCaseResult linkResult, AssemblyDefinition original, AssemblyDefinition linked)
+ {
+#if !NETCOREAPP
+ // the PE Verifier does not know how to resolve .NET Core assemblies.
+ _peVerifier.Check (linkResult, original);
+#endif
+ }
+
void VerifyLinkingOfOtherAssemblies (AssemblyDefinition original)
{
var checks = BuildOtherAssemblyCheckTable (original);