-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix dictionary deserializer #189
Conversation
ousttrue
commented
Feb 12, 2019
- JsonDictionaryValidator.Deserialize is not implemented
- Fix dictionary member serialization
@@ -219,10 +219,32 @@ public void HumanoidTest() | |||
[Test] | |||
public void MaterialTest() | |||
{ | |||
var model = new glTF_VRM_Material(); | |||
var model = new glTF_VRM_Material |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add this test case as a new unit tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simple case is 0eff571#diff-1967e80b396b0aed6d6a20cb02357f56R162
Addition of MaterialTest is extra.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. It is OK if you can say that the test case previously checked is not affected by changes in this PR.
// deserialize | ||
var deserialized = default(glTF_VRM_Material); | ||
json.ParseAsJson().Deserialize(ref deserialized); | ||
Assert.AreEqual(1, deserialized.floatProperties.Count); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that element values should be checked not only checking number of elements. Same comments for other fields.
DeserializeValue(HogeFuga.Fuga, "1"); | ||
|
||
DeserializeValue(new EnumTest(), "{\"EnumDefault\":0,\"EnumAsInt\":0,\"EnumAsString\":\"Hoge\",\"EnumAsLowerString\":\"hoge\"}"); | ||
DeserializeValue(new DictionaryValue(), "{\"Dict\": {}}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simple case is here
@@ -219,10 +219,32 @@ public void HumanoidTest() | |||
[Test] | |||
public void MaterialTest() | |||
{ | |||
var model = new glTF_VRM_Material(); | |||
var model = new glTF_VRM_Material |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simple case is 0eff571#diff-1967e80b396b0aed6d6a20cb02357f56R162
Addition of MaterialTest is extra.
以後、日本語で。 |