mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-30 14:53:09 -05:00
add test
This commit is contained in:
@@ -159,6 +159,7 @@ namespace UniGLTF
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("UnityPath")]
|
||||
public void UnityPathTest()
|
||||
{
|
||||
// 不正なパス
|
||||
@@ -215,6 +216,32 @@ namespace UniGLTF
|
||||
//var children = root.TraverseDir().ToArray();
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("UnityPath")]
|
||||
[TestCase("", PathType.Unsuported)]
|
||||
[TestCase("Assets", PathType.Unsuported)]
|
||||
[TestCase("Assets/存在するフォルダ", PathType.Assets)]
|
||||
[TestCase("Packages", PathType.Unsuported)]
|
||||
[TestCase("Packages/存在するローカルパッケージ", PathType.Packages)]
|
||||
public void UnityPathPathType(string path, PathType pathType)
|
||||
{
|
||||
var assets = UnityPath.FromUnityPath(path);
|
||||
Assert.AreEqual(pathType, assets.PathType);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("UnityPath")]
|
||||
[TestCase("", false)]
|
||||
[TestCase("Assets", false)]
|
||||
[TestCase("Assets/存在するフォルダ", true)]
|
||||
[TestCase("Packages", false)]
|
||||
[TestCase("Packages/存在するローカルパッケージ", true)]
|
||||
public void UnityPathWritableTest(string path, bool expected)
|
||||
{
|
||||
var assets = UnityPath.FromUnityPath(path);
|
||||
Assert.AreEqual(expected, assets.IsUnderWritableFolder);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void VersionChecker()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user