SW 중심대학 OSS GIT 서버 박건태, 이승준, 고기완, 이준호 새로운 배포
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.1 KiB

4 years ago
  1. using NUnit.Framework;
  2. using Unity.Collections;
  3. namespace UnityEngine.XR.ARSubsystems.Tests
  4. {
  5. public class XRDepthSubsystemImpl : XRDepthSubsystem
  6. {
  7. protected override Provider CreateProvider() => new TestProvider();
  8. class TestProvider : Provider
  9. {
  10. public override TrackableChanges<XRPointCloud> GetChanges(XRPointCloud defaultPointCloud, Allocator allocator) => default;
  11. public override XRPointCloudData GetPointCloudData(TrackableId trackableId, Allocator allocator) => default;
  12. }
  13. }
  14. [TestFixture]
  15. public class XRDepthSubsystemTestFixture
  16. {
  17. [Test]
  18. public void RunningStateTests()
  19. {
  20. XRDepthSubsystem subsystem = new XRDepthSubsystemImpl();
  21. // Initial state is not running
  22. Assert.That(subsystem.running == false);
  23. // After start subsystem is running
  24. subsystem.Start();
  25. Assert.That(subsystem.running == true);
  26. // After start subsystem is running
  27. subsystem.Stop();
  28. Assert.That(subsystem.running == false);
  29. }
  30. }
  31. }