[tests] Adjust the MT0137 test for mcs change in behavior.

Starting with mono 5.16 mcs will now add assembly references when the assembly
is only used in attributes (this was already the case for csc in both 5.14 and
5.16, so it seems to be a compatibility change).

Adjust the MT0137 test accordingly.
This commit is contained in:
Rolf Bjarne Kvinge 2018-08-02 11:11:02 +02:00
Родитель fdf3536170
Коммит 9946fbd4dd
1 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -1770,10 +1770,13 @@ public class B
mtouch.Linker = MTouchLinker.DontLink;
File.Delete (dllPath);
mtouch.AlwaysShowOutput = true;
mtouch.AssertExecute (MTouchAction.BuildSim, "build");
mtouch.AssertExecuteFailure (MTouchAction.BuildSim, "build");
mtouch.AssertWarningPattern (136, "Cannot find the assembly 'A, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' referenced from '.*/testApp.exe'.");
mtouch.AssertWarning (137, "Cannot find the assembly 'A, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null', referenced by a MyCustomAttribute attribute in 'testApp.exe'.");
mtouch.AssertWarning (137, "Cannot find the assembly 'A, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null', referenced by a System.Diagnostics.DebuggerTypeProxyAttribute attribute in 'testApp.exe'.");
mtouch.AssertWarningCount (2);
mtouch.AssertWarningCount (3);
mtouch.AssertError (2002, "Failed to resolve assembly: 'A, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'");
mtouch.AssertErrorCount (1);
}
}