2021-08-11 11:06:46 +03:00
|
|
|
//
|
2018-06-14 20:44:45 +03:00
|
|
|
// Unit tests for ARAnchor
|
|
|
|
//
|
|
|
|
// Authors:
|
|
|
|
// Vincent Dondain <vidondai@microsoft.com>
|
|
|
|
//
|
|
|
|
// Copyright 2018 Microsoft. All rights reserved.
|
|
|
|
//
|
|
|
|
|
2021-02-24 00:48:45 +03:00
|
|
|
#if HAS_ARKIT
|
2018-06-14 20:44:45 +03:00
|
|
|
|
|
|
|
using System;
|
|
|
|
using ARKit;
|
|
|
|
using Foundation;
|
2020-06-26 21:02:44 +03:00
|
|
|
using ObjCRuntime;
|
2018-06-14 20:44:45 +03:00
|
|
|
using NUnit.Framework;
|
|
|
|
|
|
|
|
using MatrixFloat4x4 = global::OpenTK.NMatrix4;
|
|
|
|
|
|
|
|
namespace MonoTouchFixtures.ARKit {
|
|
|
|
|
|
|
|
[TestFixture]
|
|
|
|
[Preserve (AllMembers = true)]
|
|
|
|
public class ARAnchorTest {
|
|
|
|
|
2020-12-15 15:16:07 +03:00
|
|
|
[SetUp]
|
|
|
|
public void Setup ()
|
|
|
|
{
|
|
|
|
TestRuntime.AssertXcodeVersion (10, 0);
|
2021-01-21 15:50:10 +03:00
|
|
|
// The API here was introduced to Mac Catalyst later than for the other frameworks, so we have this additional check
|
|
|
|
TestRuntime.AssertSystemVersion (PlatformName.MacCatalyst, 14, 0, throwIfOtherPlatform: false);
|
2020-12-15 15:16:07 +03:00
|
|
|
}
|
|
|
|
|
2018-06-14 20:44:45 +03:00
|
|
|
[Test]
|
|
|
|
public void MarshallingTest ()
|
|
|
|
{
|
|
|
|
var faceAnchor = new ARAnchor ("My Anchor", MatrixFloat4x4.Identity);
|
|
|
|
Assert.AreEqual (MatrixFloat4x4.Identity, faceAnchor.Transform, "Transform");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-02-24 00:48:45 +03:00
|
|
|
#endif // HAS_ARKIT
|