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
{{ message }}
Repository navigation
Clean up the disabled tests/mtouch suite: delete legacy tests, port the useful ones (mainly registrar validation) #26148
The tests/mtouch test suite has not run since the migration from classic Xamarin to .NET. It's a .NET Framework 4.8 class library that references the classic tools/mtouch/mtouch.csproj (mtouch.exe) and drives it against classic MonoTouch.*.sdk / lib/mono/Xamarin.iOS layouts. It is not part of the build — tests/MakefileSUBDIRS only includes test-libraries and dotnet — so it hasn't been built or run in CI for a long time.
Many testcases no longer apply, but some still test useful behavior. In particular, the bulk of RegistrarTest.cs exercises registrar validation that the current static registrar still emits (verified: tools/common/StaticRegistrar.cs still produces MT4102, MT4111, MT4138, MT4145, MT4161, MT4169, MT4174, MT4176, …), and none of those codes are covered by any running suite today. The tests/assembly-preparer harness already compiles a C# snippet and runs the registrar via AssemblyPreparer, so these tests port over cleanly (only the assertion changes, from scraping mtouch output to asserting Prepare fails with the expected error).
Goal
Port the registrar-validation tests (~39 of ~56 methods in RegistrarTest.cs) — mostly to tests/assembly-preparer as small "snippet + expected MT4xxx" unit tests, a few end-to-end ones to tests/dotnet/UnitTests.
Port ExportedSymbols / ExportedSymbols_VerifyLinkedAwayField from MTouch.cs (linker symbol preservation) to assembly-preparer / a dotnet build test.
Port the pure-logic tinies:ErrorTest.cs (ProductException formatting) and StringUtilsTest.cs, plus optionally MiscTests.NoBannedApi (banned native C symbols — complements the managed-only check in cecil-tests) and MiscTests.PublicSymbols.
Evaluate then port-or-drop:ManyBigPInvokes, ExceptionMarshaling, and any MT0xxx build-error messages still emitted by current MSBuild tasks.
Delete tests/mtouch/ entirely once the above are ported.
Almost everything else in MTouch.cs and the smaller files is legacy (32-bit/fat/bitcode/FastDev/simlauncher/watchOS/mtouch-CLI/mlaunch-migrated device control/classic BCL profiles) or already covered by tests/dotnet/UnitTests, and should be deleted.
Full per-testcase report
A detailed file-by-file, testcase-by-testcase classification (delete-legacy / delete-obsolete-mechanism / already-covered / port-candidate, with suggested port target) is in this gist:
Activity