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.
25 lines
641 B
25 lines
641 B
9 years ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.IO;
|
||
|
using UnityEngine;
|
||
|
|
||
|
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
|
||
|
public class IntegrationTestAttribute : Attribute
|
||
|
{
|
||
|
private readonly string m_Path;
|
||
|
|
||
|
public IntegrationTestAttribute(string path)
|
||
|
{
|
||
|
if (path.EndsWith(".unity"))
|
||
|
path = path.Substring(0, path.Length - ".unity".Length);
|
||
|
m_Path = path;
|
||
|
}
|
||
|
|
||
|
public bool IncludeOnScene(string scenePath)
|
||
|
{
|
||
|
if (scenePath == m_Path) return true;
|
||
|
var fileName = Path.GetFileNameWithoutExtension(scenePath);
|
||
|
return fileName == m_Path;
|
||
|
}
|
||
|
}
|