wildfire chat server source initial submit

This commit is contained in:
heavyrain2012
2019-03-16 17:04:23 +08:00
parent e59217bd10
commit cab3ca0916
1466 changed files with 528862 additions and 15919 deletions
+21
View File
@@ -0,0 +1,21 @@
var tape = require("tape");
var protobuf = require("..");
var proto = "message Something {}";
tape.test("reflected classes", function(test) {
var root = protobuf.parse(proto).root,
Something = root.lookup("Something");
test.throws(function() {
protobuf.Class("a");
}, TypeError, "Class should throw if first argument is not a Type");
test.throws(function() {
protobuf.Class(Something, "a");
}, TypeError, "Class should throw if second argument is not a function");
test.end();
});