The test checks the actual code.

This commit is contained in:
Masataka SUMI
2021-01-27 15:41:50 +09:00
parent 17023b94b2
commit 37b6d1ca04

View File

@@ -190,16 +190,6 @@ namespace VRM
var json = model.ToJson();
Assert.AreEqual(@"{""presetName"":""neutral"",""binds"":[],""materialValues"":[],""isBinary"":false}", json);
Debug.Log(json);
// https://github.com/vrm-c/UniVRM/issues/694
// Must pass even if this computer's locale was tr-TR.
var model2 = new glTF_VRM_BlendShapeGroup()
{
presetName = "I",
};
var json2 = model2.ToJson();
Assert.AreEqual(@"{""presetName"":""i"",""binds"":[],""materialValues"":[],""isBinary"":false}", json2);
Debug.Log(json);
}
[Test]
@@ -210,6 +200,19 @@ namespace VRM
presetName = "aaaaaaaaaaaa_not_exists_",
};
}
[Test]
public void BlendShapePresetInvariantCultureTest()
{
// https://github.com/vrm-c/UniVRM/issues/694
// Must pass even if this computer's locale was tr-TR.
var clip2 = ScriptableObject.CreateInstance<BlendShapeClip>();
clip2.Preset = BlendShapePreset.I;
var model2 = clip2.Serialize(null);
var json2 = model2.ToJson();
Assert.AreEqual(@"{""presetName"":""i"",""binds"":[],""materialValues"":[],""isBinary"":false}", json2);
Debug.Log(json2);
}
[Test]
public void DegreeMapTest()