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

20 Коммитов

Автор SHA1 Сообщение Дата
TJ Lambert 717b141f16
[gameplaykit] Add nullability to (generated and manual) bindings (#14615)
* adding Nullability

* throw better null exceptions

* use is null

* Added test

Co-authored-by: tj_devel709 <antlambe@microsoft.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
2022-04-28 11:26:18 -05:00
Stephane Delcroix f36606e654
[C] Clear OpenTK namespace (#13767)
fixes #13160

- remove unused types
- use System.Numerics when possible
- move own created types from OpenTK namespace to CoreGraphics
- create missing types in CoreGraphics namespace

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-02-14 18:50:23 +01:00
Rolf Bjarne Kvinge 6674e83bec
[GameplayKit] Adopt XAMCORE_4_0 changes in .NET. (#13972) 2022-01-31 17:51:08 +01: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 0a5b72d64b [tests] Update attributes in tests according to breaking changes in NUnit[Lite]. 2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 2995cd086a
[tests] Update tests to make native type vs normal type comparison explicit (#9097)
We've modified our NUnitLite to special-case the native types, so that they
can easily be compared with the standard types, but that doesn't work anymore
when switching to the official NUnit[Lite], so change all asserts to
explicitly convert whenever needed.
2020-07-17 08:48:09 +02:00
Rolf Bjarne Kvinge e344698612
[tests] Use Assert.Throws instead of the ExpectedException attribute. (#9092)
* [tests] Use Assert.Throws instead of the ExpectedException attribute.

The ExpectedExceptionAttribute doesn't exist in newer versions of NUnit[Lite] anymore.

* [monotouch-test] Rework some CaptiveNetwork tests.

They need permissions, and entitlements, and something else I couldn't figure
out, so just assert they're returning null instead.
2020-07-16 08:19:33 +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
Rolf Bjarne Kvinge 1a260e542b
[tests] Build the native test library for macOS and create a binding project for it. (#3373)
* [tests] Build the native test library for macOS and create a binding project for it.

Also add the new binding project to the xammac and link all XM test projects,
which allows us to stop excluding tests that require the native library and
the corresponding bindings.

* [tests] Include more tests in xammac_tests.

* [tests] Correctly ignore the ObjC exception tests in release mode.
2018-02-02 11:14:44 +01:00
Sebastien Pouliot 07c24949c0
[tests][macos] Enable more tests to be executed on macOS (XM) (#3191)
Largely related to somewhat recent frameworks/API additions to XM

ExternalAccessory was added to macOS 10.13 (Xcode9) and can't be run before that (including on the jenkins sierra bots). Also enable that test on tvOS (which added support in Xcode8)
2018-01-10 20:58:49 -05:00
Timothy Risi 2926a13f7e
[test] Change monotouch-test and xammac_tests to use all .cs files in monotouch-test/ Fixes #60290 (#2930)
Exclude the registrar/trampoline generated files from xammac_tests
Remove CoreLocation.LocationTest since is covered by introspection
2017-10-31 08:09:21 -08:00
Rolf Bjarne Kvinge 64c3ea2cae [monotouch-test] Fix 2 issues when running on iOS 9. (#2934)
* [monotouch-test][GameplayKit] GKAgent3D isn't available on iOS 9.

Fixes this test failure:

> [FAIL] GKAgent3DTest.RotationTest : ObjCRuntime.RuntimeException : Wrapper type 'GameplayKit.GKAgent3D' is missing its native ObjectiveC class 'GKAgent3D'.

* [monotouch-test][MPS] MPSImageHistogram.HistogramSizeForSourceFormat doesn't seem to work on iOS 9.

Calling MPSImageHistogram.HistogramSizeForSourceFormat seems to abort on iOS 9
due to invalid arguments no matter which pixel format I use:

> /BuildRoot/Library/Caches/com.apple.xbs/Sources/MetalImage/MetalImage-39.3/MetalImage/Filters/MIHistogram.mm:103: failed assertion `[MPSImageHistogram histogramSizeForSourceFormat:] unsupported texture format: 114'

So only call this method on iOS 10+.
2017-10-27 17:06:02 -04:00
Sebastien Pouliot 90bc97c35b [tests] Add a better version check for PR2733 GKAgent3D test (#2747) 2017-09-22 07:15:32 +02:00
Sebastien Pouliot 9bdb7643c9 [tests][monotouch] Fix GKAgent3D not to run before iOS 9 (#2733) 2017-09-20 22:19:57 -04:00
Rolf Bjarne Kvinge 7a674ec490 Tweak the Simd-compatible matrices and vectors (#2668)
* Rename them to be OpenTK.NMatrix# (instead of Simd.MatrixFloat#x#).
* Remove the Vector2 and Vector4 variants, we'll use the OpenTK types instead (but we'll keep the NVector3 variant, since it's not identical to the OpenTK version).
* Update the API to match their OpenTK counterparts better:
    * NMatrix2 and NMatrix3 have a 0-based R#C# scheme for their fields.
    * NMatrix4 has a 1-based M## scheme for its fields (i.e. no change).
2017-09-13 11:08:39 -04:00
Alex Soto fdf67c6645 [GameplayKit] Incorrect GKPath.FromPoints (Vector3[], float, cyclical) implementation, Fixes bug 59380 (#2644)
* [GameplayKit] Incorrect GKPath.FromPoints (Vector3[], float, cyclical) implementation, Fixes bug 59380

https://bugzilla.xamarin.com/show_bug.cgi?id=59380

vector_float3 is 16 bytes, which means the binding is incorrect,
because Vector3 is 12 bytes, and our code does not that difference into account.

* Add tests
2017-09-11 13:13:45 -05:00
Rolf Bjarne Kvinge 5303155836 [GameplayKit] Use the new Simd-compatible matrix types, and deprecate the old API. 2017-08-31 14:03:12 +02:00
Alex Soto 209f4f3709 [GameplayKit] Update from Xcode8 Beta 1 to Beta 6 (#689)
Runtime
- Added support for Vector2d, Vector3d and Vector4d SIMD types
- Added support for GKBox, GKQuad and GKTriangle SIMD types

GameplayKit
- Apple introduced GKQuadTreeNode and GKQuadTree in Xcode 7.1 and
  removed those types in a later Xcode (7.2?) but we kept them around.
  Now apple introduced again both types but renamed them to GKQuadtreeNode
  and GKQuadtree (lowercase t), this is a breaking change and since we do
  care about binary compat we are just changing the registration name and
  keeping the same managed name deprecating old methods and introducing
  the new ones.
- Added tests for new SIMD types
2016-08-30 15:32:46 -04:00
Rolf Bjarne Kvinge ecfdea9508 [tests] Import 2016-05-26 15:06:52 +02:00