Open grokys opened 3 years ago
* `CompilerTestBase.GetCallbacks` fails on net47:
Why this happens is described here https://github.com/kekekeks/XamlX/pull/31#issuecomment-708623730
In fact, conditionally, they work. But they need to be fixed so that they really work
* `File.WriteAllBytes("testasm.dll", data)` throws
I did not understand why this is happening, perhaps windows OS does not have time to release dll files, but this was decided in #31, since this strut is not needed for batch tests
* `CecilTests`/`CecilNetstandardTests` are being built for `netstandard2.0` which is not a valid TFM for unit tests due to [it being an API not a platform](https://xunit.net/docs/why-no-netstandard) causing the tests to show up in the VS test explorer but not be runnable
Also, it affects dotnet test. I have a hunch that if you select what netstandard was for, then the problems in VS will disappear
CecilNetstandardTests
project has to be built for netstandard2.0
as well as actual runtime TFMs because the binaries built for netstandard2.0
are being feed to Cecil in order to check that compiler is capable of processing netstandard2.0
-targeting libraries. CecilTests
most likely doesn't has to be built for netstandard2.0
"Ghost" tests in VS test explorer is a Visual Studio bug.
Also, it affects dotnet test. I have a hunch that if you select what netstandard was for, then the problems in VS will disappear
Okey. It looks like to do this, we will need to rewrite the tests to separate the test asserts from the classes
dotnet test trying run for testclasses... https://github.com/rstm-sf/XamlX/runs/1270736821?check_suite_focus=true#step:5:36
"Ghost" tests in VS test explorer is a Visual Studio bug.
It seems to me that these are problems test runner
CecilNetstandardTests
project has to be built fornetstandard2.0
as well as actual runtime TFMs because the binaries built fornetstandard2.0
are being feed to Cecil in order to check that compiler is capable of processingnetstandard2.0
-targeting libraries.CecilTests
most likely doesn't has to be built fornetstandard2.0
I do not see any particular problem in separating classes from tests. See https://github.com/rstm-sf/XamlX/actions/runs/313556568
dotnet test trying run for testclasses...
It works now #35
Thus, it remains to figure out the following
"Ghost" tests in VS test explorer is a Visual Studio bug.
An example that this is most likely a dotnet test problem
Thus, it remains to figure out the following
- Running tests with VS in a XamlParserTests project
https://github.com/microsoft/vstest/issues/655#issuecomment-344556398
@grokys tests in VS looks good https://github.com/rstm-sf/XamlX/tree/refactor/extract_netstandard_tests
tests in VS looks good https://github.com/rstm-sf/XamlX/tree/refactor/extract_netstandard_tests
Also solves the problem of non-building Benchmarks
This is mentioned in #30 but that has been closed: the test and benchmarks suite currently does not run. I can see the following problems in a freshly cloned repro:
File.WriteAllBytes("testasm.dll", data)
throws (#30)CompilerTestBase.GetCallbacks
fails on net47:CecilTests
/CecilNetstandardTests
are being built fornetstandard2.0
which is not a valid TFM for unit tests due to it being an API not a platform causing the tests to show up in the VS test explorer but not be runnable