mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-23 19:15:07 -05:00
Test 追加。Empty_extensionUsed
This commit is contained in:
@@ -3,7 +3,6 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using UniJSON;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
@@ -88,5 +88,42 @@ namespace UniGLTF
|
||||
Assert.AreEqual(new string[] { "KHR_materials_unlit" },
|
||||
parsed["extensionUsed"].ArrayItems().Select(x => x.GetString()).ToArray());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Empty_extensionUsed()
|
||||
{
|
||||
var dst = GltfJsonUtil.FindUsedExtensionsAndUpdateJson(@"{
|
||||
""asset"": {
|
||||
""generator"": ""COLLADA2GLTF"",
|
||||
""version"": ""2.0""
|
||||
},
|
||||
""scene"": 0,
|
||||
""scenes"": [
|
||||
{
|
||||
""nodes"": [
|
||||
0
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
""extensionUsed"": [""dummy""],
|
||||
""materials"": [
|
||||
{
|
||||
""pbrMetallicRoughness"": {
|
||||
""baseColorFactor"": [
|
||||
0.800000011920929,
|
||||
0.0,
|
||||
0.0,
|
||||
1.0
|
||||
],
|
||||
""metallicFactor"": 0.0
|
||||
},
|
||||
""name"": ""Red""
|
||||
}
|
||||
]
|
||||
}");
|
||||
|
||||
var parsed = dst.ParseAsJson();
|
||||
Assert.False(parsed.ContainsKey("extensionUsed"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user