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

25 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 09f84f988c
[autoformat] Autoformat after a PR race. (#16720)
There was a PR race:

1. I created a PR to autoformat monotouch-test code.
2. Another PR added incorrectly formatted code to monotouch-test.
3. The first PR was merged, everything was fine.
4. The second PR was merged (it was green) - but its code hadn't been
   autoformatted.
5. Now there's incorrectly formatted code in the repo, which will show up in
   every new PR.

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2022-11-14 08:43:39 +01:00
Marius Ungureanu 2bd6433fda
[perf] Add unmanaged constraint to some APIs to allow pinning, and not manual GCHandle code (#7561)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2022-11-11 08:58:46 +01:00
Rolf Bjarne Kvinge 6f45caa84d
[autoformat] Add monotouch-test (#16701) 2022-11-10 17:59:26 +01:00
Rolf Bjarne Kvinge c738fd47b4
[AudioComponentDescription] Strong-type the ComponentSubType field in .NET. (#13827)
Strong names are always better!
2022-01-21 21:30:55 +01:00
Rolf Bjarne Kvinge 19c2765156 [tests][monotouch-test] Adjust code to cope with NativeHandle. 2021-11-26 14:25:21 +01:00
Manuel de la Pena 70936c3fcd
[Tests] Remove not needed usings in the AudioUnit tests. (#13235) 2021-11-03 10:33:42 -04:00
Rolf Bjarne Kvinge f9ae3bd9a0
[monotouch-test] Fix a comparison to work with both C# nint and System.nint. (#13155) 2021-10-29 16:03:57 +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 7aa0a10284
[monotouch-test] Ignore a few audio-related tests when we're running on a VM. (#11744)
Fixes these failures when on a VM:

    Xamarin.Mac.Tests.AudioUnitTests
    	[FAIL] GetCurrentDevice_Test :   Expected: True
      But was:  False

    		  at Xamarin.Mac.Tests.AudioUnitTests.GetCurrentDevice_Test () [0x00011] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/AudioUnit/AudioUnit.cs:37
    Xamarin.Mac.Tests.AudioUnitTests : 13 ms

    Xamarin.Mac.Tests.AUGraphTests
    	[FAIL] DoTest : Did not see events after 1 second
    		  at Xamarin.Mac.Tests.AUGraphTests.WaitOnGraphAndMixerCallbacks () [0x00050] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/AudioUnit/AUGraphTestMac.cs:93
    		  at Xamarin.Mac.Tests.AUGraphTests.DoTest () [0x0004c] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/AudioUnit/AUGraphTestMac.cs:66
    Xamarin.Mac.Tests.AUGraphTests : 3113 ms

    Xamarin.Mac.Tests.AVAudioIONodeTests
    	[FAIL] AVAudioIONodeTests_AudioUnitTest : Foundation.ObjCException : com.apple.coreaudio.avfaudio: error -10879
    		  at (wrapper managed-to-native) ObjCRuntime.Messaging.IntPtr_objc_msgSend(intptr,intptr)
    		  at AVFoundation.AVAudioEngine.get_OutputNode () [0x00030] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/build/mac/mobile/AVFoundation/AVAudioEngine.g.cs:1099
    		  at Xamarin.Mac.Tests.AVAudioIONodeTests.AVAudioIONodeTests_AudioUnitTest () [0x0000d] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/AVFoundation/AVAudioIONode.cs:23
    		  at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
    		  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/src/Xamarin.Mac/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395
    Xamarin.Mac.Tests.AVAudioIONodeTests : 7 ms
2021-05-31 15:25:08 +02:00
Rolf Bjarne Kvinge 7ac3c658e0
[tests] Preserve all test fixtures. (#10870)
* [tests] Preserve all test fixtures.

This fixes the wildly diffetent number of tests when running xammac tests with and without linking.

Without linking:

> Tests run: 2446 Passed: 2321 Inconclusive: 9 Failed: 0 Ignored: 125

vs with linking:

> Tests run: 1885 Passed: 1802 Inconclusive: 4 Failed: 0 Ignored: 83

Now we run the same tests either with or without linking.

One test was updated to not fail when linking is enabled.

Also add a test to ensure all future test fixtures are preserved.

* Remove whitespace noise.
2021-03-16 15:15:30 +01:00
Rolf Bjarne Kvinge aa1bf71cd6 [monotouch-test] Make it work with Mac Catalyst.
* Fix system version checks to work properly on Mac Catalyst (which uses the macOS
  version as its system version).

* Add the framework-specific defines to the build for monotouch-test.csproj (using
  the generated response files), this way we can use them in the tests.

* Sprinkle conditionals in numerous places - I tried using either framework-specific
  or XAMCORE_3_0 whenever that made since (instead of using Mac Catalyst as a condition).

* Updated a few tests to use non-deprecated API (because the deprecated API often
  doesn't exist in Mac Catalyst).

* Also a few minor API fixes to make any corresponding tests compile.
2021-01-15 17:52:28 +01:00
Rolf Bjarne Kvinge 93bbfe7a86
[tests] Merge apitest into xammac_tests. (#10276)
* [apitest] Sanitize files by adding missing eols.

* [apitest] Add #if __MACOS__ to all test files.

In preparation for the move into monotouchtest.

* [apitest] Move test files into monotouchtest.

* [tests] Remove the apitest project.

* [monotouch-test] Remove MessagingMac.cs, it's not needed.

* [xammac-tests] Add file PlatformInfo.cs to the build.

* [xammac-tests] Move files into monotouch-test.

* [monotouch-test] Rename test class to not clash with another test class of the same (Objective-C) name.

* [tests] How did this ever work?

Answer: it never did.

* [monotouch-test] Remove duplicated test code.

* [xammac-tests] Define DYNAMIC_REGISTRAR when we're using the dynamic registrar.

* [monotouch-test] Adjust the BundleTest.TestGetBundleId test to cope with having multiple apps for the same bundle id.

* [monotouch-test] Ignore a test that doesn't work with the static registrar (due to a bug in the static registrar).
2020-12-18 11:45:06 +01:00
Manuel de la Pena 0f7bc75e50 Merge branch 'xcode12.2' into main-xcode12.2 2020-11-17 11:09:15 -05:00
Alex Soto 9d1988a3c8
[tests][xcode12.2] Fix xammac tests (#9935)
* [tests][xcode12.2] Fix xammac tests

* Update tests/common/TestRuntime.cs

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>

* [xammac] Avoid multiple #if statements

* [xammac] Fix missing cases amd reduce amount of changes

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-10-21 17:12:48 -04:00
Manuel de la Pena dcb0c93ab0 [Xcode12] Bring xcode 12 changes into main. 2020-09-23 16:05:22 -04:00
Rolf Bjarne Kvinge e1ac701421
[tests] Rework a few tests to not throw exceptions in a background thread. (#9636)
Uncaught exceptions in a background thread will cause the process to crash.
Instead marshal any exceptions to the main thread, which asserts that no
exceptions were thrown.
2020-09-15 16:50:50 +02:00
Manuel de la Pena 5a9139bcd6
[AudioToolbox] Update API to xcode 12 beta 6. (#9603)
The most important changes in the API are ignored until we fix issue https://github.com/xamarin/xamarin-macios/issues/9602
2020-09-11 10:36:54 -04:00
Rolf Bjarne Kvinge 93b5c223d6
[tests] Provide an ignore reason for Ignore attributes. (#9091)
Newer versions of NUnit[Lite] require this.
2020-07-15 14:50:54 +02:00
Rolf Bjarne Kvinge 952037b7a3
[tests] Remove Classic code from all tests. (#8707) 2020-05-29 16:43:06 +02:00
Rolf Bjarne Kvinge 2b2f1d08dc
[tests] Remove Classic code from all tests. (#8702) 2020-05-28 16:35:09 +02:00
Rolf Bjarne Kvinge 9703f17c91 [monotouch-test] Fix versions checks.
* Fix many version checks to be based on Xcode version instead of iOS version.
* Added/fixed a few expected values according to platform version to match behavior in older macOS versions.
2018-07-03 20:47:14 +02:00
Sebastien Pouliot 984d4e2ab6 [generator] Allow basic support of nullable inside our trampolines. Fixes #42699 (#1820)
We cannot use generics in native signatures but, with some care (and
generator work), we can still expose nullable on our public delegate API.

AUImplementorStringFromValueCallback is presently the only case of such
an API.

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=42699
2017-03-03 14:01:33 -05:00
Timothy Risi 687aa6f25f Port monotouch-test suite to Xamarin.Mac (#1445)
* Port the Monotouch-test suite to run on Xamarin.Mac

Adds over 1300 new API tests for XM
2017-01-12 09:13:56 -09:00
Alex Soto 69740e78ed [AudioUnit] Fix some breaking changes (#173)
commit 1f207bd3f3df363cb5a74e59b93acd8eb6e1fec2 in xamarin/maccore
introduced some breaking changes, this fixes them
2016-06-10 13:20:33 -04:00
Rolf Bjarne Kvinge ecfdea9508 [tests] Import 2016-05-26 15:06:52 +02:00