|
|
|
|
|
|
using System; |
|
|
|
using System.Collections; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.IO; |
|
|
|
using System.Linq; |
|
|
|
using NUnit.Framework; |
|
|
|
|
|
|
using System.Text.RegularExpressions; |
|
|
|
using UnityEngine.TestTools; |
|
|
|
|
|
|
|
namespace UnityEditor.Experimental.Rendering |
|
|
|
{ |
|
|
|
|
|
|
public string name; |
|
|
|
public float threshold; |
|
|
|
public string relativePath; |
|
|
|
public int frameWait; |
|
|
|
|
|
|
|
public override string ToString() |
|
|
|
{ |
|
|
|
|
|
|
var p = new FileInfo (path); |
|
|
|
var split = s_Path.Aggregate ("", Path.Combine); |
|
|
|
split = string.Format("{0}{1}", split, Path.DirectorySeparatorChar); |
|
|
|
var splitPaths = p.FullName.Split (new [] {split}, StringSplitOptions.RemoveEmptyEntries); |
|
|
|
var splitPaths = p.FullName.Split(new[] {split}, StringSplitOptions.RemoveEmptyEntries); |
|
|
|
threshold = 0.02f |
|
|
|
threshold = 0.02f, |
|
|
|
frameWait = 10 |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
[Test, TestCaseSource(typeof(CollectScenes), "scenes")] |
|
|
|
public void TestScene(TestInfo testInfo) |
|
|
|
[UnityTest] |
|
|
|
// [TestCaseSource(typeof(CollectScenes), "scenes") ]
|
|
|
|
public IEnumerator TestScene([ValueSource(typeof(CollectScenes), "scenes")]TestInfo testInfo) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < testInfo.frameWait; ++i) |
|
|
|
{ |
|
|
|
yield return null; |
|
|
|
} |
|
|
|
|
|
|
|
var testSetup = Object.FindObjectOfType<SetupSceneForRenderPipelineTest> (); |
|
|
|
Assert.IsNotNull(testSetup, "No SetupSceneForRenderPipelineTest in scene " + testInfo.name); |
|
|
|