THRIFT-3122 Javascript struct constructor should properly initialize struct and container members from plain js arguments
Patch: Igor Tkach
This closes #519
diff --git a/lib/nodejs/test/test-cases.js b/lib/nodejs/test/test-cases.js
index c396ca9..7872295 100644
--- a/lib/nodejs/test/test-cases.js
+++ b/lib/nodejs/test/test-cases.js
@@ -107,6 +107,22 @@
})]
});
+var crazy2 = new ttypes.Insanity({
+ "userMap":{ "5":5, "8":8 },
+ "xtructs":[{
+ "string_thing":"Goodbye4",
+ "byte_thing":4,
+ "i32_thing":4,
+ "i64_thing":4
+ }, {
+ "string_thing":"Hello2",
+ "byte_thing":2,
+ "i32_thing":2,
+ "i64_thing":2
+ }]
+});
+
+
var insanity = {
"1":{ "2": crazy, "3": crazy },
"2":{ "6":{ "userMap":{}, "xtructs":[] } }
@@ -119,4 +135,5 @@
module.exports.out = out;
module.exports.out2 = out2;
module.exports.crazy = crazy;
+module.exports.crazy2 = crazy2;
module.exports.insanity = insanity;