forked from xamarin/xamarin-macios
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SceneKit] Adds NullAllowed to ISCNSceneRenderer.OverlayScene (xamari…
…n#3410) Fixes xamarin#3392 It seems swift has this property listed as an optional[0] and an Apple sample[1] sets this to null so `ISCNSceneRenderer.OverlayScene` needs to have `[NullAllowed]` even if ObjC headers do not have nullability information. [0]: https://developer.apple.com/documentation/scenekit/scnscenerenderer/1524051-overlayskscene [1]: xamarin#3392
- Loading branch information
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// | ||
// SCNViewTests.cs | ||
// | ||
// Authors: | ||
// Alex Soto <alexsoto@microsoft.com> | ||
// | ||
// | ||
// Copyright 2018 Xamarin Inc. All rights reserved. | ||
// | ||
|
||
#if !__WATCHOS__ | ||
using System; | ||
using NUnit.Framework; | ||
|
||
#if XAMCORE_2_0 | ||
using Foundation; | ||
using SceneKit; | ||
using CoreGraphics; | ||
#else | ||
using MonoTouch.Foundation; | ||
using MonoTouch.SceneKit; | ||
using CGRect = System.Drawing.RectangleF; | ||
#endif | ||
|
||
namespace MonoTouchFixtures.SceneKit { | ||
|
||
[TestFixture] | ||
[Preserve (AllMembers = true)] | ||
public class SCNViewTests { | ||
|
||
[Test] | ||
public void NullOverlaySceneTest () | ||
{ | ||
// Issue: https://github.com/xamarin/xamarin-macios/issues/3392 | ||
TestRuntime.AssertXcodeVersion (6,0); | ||
|
||
var view = new SCNView (new CGRect (), (NSDictionary) null); | ||
Assert.NotNull (view, "View not null"); | ||
Assert.DoesNotThrow (() => view.OverlayScene = null, "Should not throw"); | ||
} | ||
} | ||
} | ||
#endif |