mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-12 21:45:06 -05:00
Add deserializer tests
This commit is contained in:
parent
d2eff422b9
commit
07b4da51a9
|
|
@ -252,6 +252,17 @@ namespace VRM
|
|||
Assert.AreEqual(@"{}",json2);
|
||||
}
|
||||
|
||||
// TODO: Move to another suitable location
|
||||
[Test]
|
||||
public void MetaDeserializeTest()
|
||||
{
|
||||
var json = @"{}";
|
||||
|
||||
var model = deserialize<glTF_VRM_Meta>(json);
|
||||
|
||||
Assert.AreEqual(-1, model.texture);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SecondaryAnimationColliderTest()
|
||||
{
|
||||
|
|
@ -381,5 +392,11 @@ namespace VRM
|
|||
// NOTE: New serializer outputs values which will not be used...
|
||||
Assert.AreEqual(json,json2);
|
||||
}
|
||||
|
||||
// TODO: Move to another suitable location
|
||||
T deserialize<T>(string json)
|
||||
{
|
||||
return JsonUtility.FromJson<T>(json);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user