Граф коммитов

11 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 081505b173
[tests] Improve perf in cecil-tests by only loading assemblies once. (#16997)
Improve perf in cecil-tests by caching loaded assemblies, and thus only
loading them once. The gain isn't all that much - it saves about 3s of ~2m on
my machine, so ~1.5% faster - but it'll be more and more important as we write
more tests. Also the code becomes slightly simpler too.
2022-12-13 09:23:25 +01:00
Rolf Bjarne Kvinge deb0faa4f2
Autoformat cecil-tests.csproj. (#16103)
All other changes should be blank space only.

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2022-09-26 21:00:28 +02:00
Rolf Bjarne Kvinge a020f09979
[tests] Update the cecil tests to run on .NET assemblies. (#15969)
And not legacy assemblies if the legacy build is disabled.
2022-09-19 11:52:23 +02:00
Rolf Bjarne Kvinge 82482edc70
[cecil-tests] Improve these tests a bit. (#14994) 2022-05-13 20:50:02 +02:00
Rolf Bjarne Kvinge 2972e1b715
Fix some whitespace issues in various files. (#12399)
* Remove BOM
* Add EOL at end of file.
2021-08-11 10:06:46 +02:00
Rolf Bjarne Kvinge 01dfd6f2f5
[cecil-tests] Fix string composition (#10781) 2021-03-04 16:40:53 +01:00
Sebastien Pouliot 11cec5096a
[tests][cecil] Check for absence of `[NoX]` (Unavailable) in platform assemblies. Fix #4835 (#9686)
It's way too easy to forget that attributes like `[NoiOS]` means the code
is not generated (for bindings) on that platform but that they will be
compiled for _manual_ bindings (not run thru the generator).

This can expose types (and API) that are not usable on some platforms.
This new test checks that the `[No*]` and `[Unavailable]` attributes
are not in their respective platform assemblies.

For compatibility (existing mistakes) we ignore the check on API that
are decorated with `[Obsolete]` attributes.

Changes in the bindings are fix such mistakes - mostly adding the
`[Obsolete]` attribute.

Fix https://github.com/xamarin/xamarin-macios/issues/4835
2020-09-30 07:56:48 -04:00
Sebastien Pouliot 76a61f1290
[runtime] Remove internal memcpy p/invoke (#8890)
* Replace `memcpy` with `Buffer.MemoryCopy`
* Add cecil-based test to make sure we're not p/invoke into it again (nor any other MS banned API)
* Remove `memcpy` from xtro ignore file
2020-06-19 09:41:54 -04:00
Sebastien Pouliot 4cc33f4d80
[src] Use `Runtime.NSLog` instead of `System.Console.WriteLine` (#8626)
inside the product assemblies [1]. The latter brings a lot [2] of the BCL
into the application for, eventually, ending up back to `NSLog` anyway

Also include a, cecil-based, test to ensure we don't regress.

[1] except for Xamarin.Mac.dll since there's a workaround for a
Sierra (only) bug

[2] https://gist.github.com/spouliot/c63343c1a76f4e49248be3a2c7aa25ed
2020-05-20 13:38:44 -04:00
Sebastien Pouliot ac01b522f0
[generator] Add missing `EnsureUIThread` for generated `init` and `initWithCoder` (#8250)
Fix https://github.com/xamarin/xamarin-macios/issues/8249
2020-03-31 17:20:44 -04:00
Sebastien Pouliot 7cbf90c5c6
[tests] Add cecil-based unit tests (#7825)
Only one to start... it's been discussed before but we generally
found other ways to do them. Let's continue to pick the best place
but we now have more options :)
2020-02-10 17:23:12 -05:00