From fd4650c3fbbe44b295fc1cef3b5cbc6266e1708b Mon Sep 17 00:00:00 2001 From: Fabien Houlmann Date: Thu, 15 Oct 2020 10:26:42 -0400 Subject: [PATCH] remove XRSystemTests --- .../CHANGELOG.md | 1 + .../Tests/Editor/XRSystemTests.cs | 78 ------------------- .../Tests/Editor/XRSystemTests.cs.meta | 11 --- 3 files changed, 1 insertion(+), 89 deletions(-) delete mode 100644 com.unity.render-pipelines.high-definition/Tests/Editor/XRSystemTests.cs delete mode 100644 com.unity.render-pipelines.high-definition/Tests/Editor/XRSystemTests.cs.meta diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 0610721b359..ade7322d042 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -205,6 +205,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Move System Generated Values semantics out of VaryingsMesh structure. - Other forms of FSAA are silently deactivated, when path tracing is on. - Disable field of view UI settings when XR is enabled on the camera. +- Removed XRSystemTests. The GC verification is now done during playmode tests (case 1285012). ## [10.0.0] - 2019-06-10 diff --git a/com.unity.render-pipelines.high-definition/Tests/Editor/XRSystemTests.cs b/com.unity.render-pipelines.high-definition/Tests/Editor/XRSystemTests.cs deleted file mode 100644 index 989b9712505..00000000000 --- a/com.unity.render-pipelines.high-definition/Tests/Editor/XRSystemTests.cs +++ /dev/null @@ -1,78 +0,0 @@ -using NUnit.Framework; -using UnityEngine.TestTools.Constraints; -using Is = UnityEngine.TestTools.Constraints.Is; - -namespace UnityEngine.Rendering.HighDefinition.Tests -{ - class XRSystemTests - { - XRSystem xrSystem; - Camera[] cameras; - - // Simulate multiple frames with many cameras, passes and views - const int k_FrameCount = 90; - const int k_CameraCount = 3; - const int k_PassCount = 4; - const int k_ViewCount = 2; - - [SetUp] - public void SetUp() - { - xrSystem = new XRSystem(null); - TextureXR.maxViews = k_ViewCount; - cameras = new Camera[k_CameraCount]; - for (int cameraIndex = 0; cameraIndex < k_CameraCount; ++cameraIndex) - { - var cameraGameObject = new GameObject(); - cameras[cameraIndex] = cameraGameObject.AddComponent(); - } - - SimulateOneFrame(); - } - - [TearDown] - public void TearDown() - { - xrSystem = null; - cameras = null; - } - - public void SimulateOneFrame() - { - foreach (var camera in cameras) - { - for (int passIndex = 0; passIndex < k_PassCount; ++passIndex) - { - var passCreateInfo = new XRPassCreateInfo - { - multipassId = 0, - cullingPassId = 0, - cullingParameters = new ScriptableCullingParameters(), - renderTarget = camera.targetTexture, - customMirrorView = null - }; - - var xrPass = XRPass.Create(passCreateInfo); - - for (int viewIndex = 0; viewIndex < k_ViewCount; ++viewIndex) - { - xrPass.AddViewInternal(new XRView()); - } - - xrSystem.AddPassToFrame(camera, xrPass); - } - } - - xrSystem.ReleaseFrame(); - } - - [Test] - public void ZeroGCMemoryPerFrame() - { - for (int i = 0; i < k_FrameCount; ++i) - { - Assert.That(() => SimulateOneFrame(), Is.Not.AllocatingGCMemory()); - } - } - } -} diff --git a/com.unity.render-pipelines.high-definition/Tests/Editor/XRSystemTests.cs.meta b/com.unity.render-pipelines.high-definition/Tests/Editor/XRSystemTests.cs.meta deleted file mode 100644 index 245c525f350..00000000000 --- a/com.unity.render-pipelines.high-definition/Tests/Editor/XRSystemTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d5dcdb8572b8a1d43903f36f2ae6debb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: