mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-10 20:53:31 -05:00
Add tests for serializer of VRM Meta
This commit is contained in:
parent
fa72052f03
commit
cef2f3f92a
|
|
@ -214,5 +214,23 @@ namespace VRM
|
|||
// NOTE: New serializer outputs values which will not be used...
|
||||
Assert.AreEqual(json,json2);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void MetaTest()
|
||||
{
|
||||
var model = new glTF_VRM_Meta();
|
||||
|
||||
var json = model.ToJson();
|
||||
Assert.AreEqual(@"{""texture"":-1}", json);
|
||||
Debug.Log(json);
|
||||
|
||||
var c = new JsonSchemaValidationContext("")
|
||||
{
|
||||
EnableDiagnosisForNotRequiredFields = true,
|
||||
};
|
||||
var json2 = JsonSchema.FromType<glTF_VRM_Meta>().Serialize(model, c);
|
||||
// NOTE: New serializer outputs values which will not be used...
|
||||
Assert.AreEqual(json,json2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user