remove an unneeded field and add more tests
This commit is contained in:
parent
957b513c99
commit
3d56bf3bcb
2 changed files with 8 additions and 9 deletions
|
@ -1422,7 +1422,6 @@ private:
|
|||
};
|
||||
|
||||
struct NodeTextNoSchema {
|
||||
kj::StringTree outerTypeDecl;
|
||||
kj::StringTree outerTypeDef;
|
||||
kj::StringTree readerBuilderDefs;
|
||||
kj::StringTree inlineMethodDefs;
|
||||
|
@ -1531,10 +1530,8 @@ private:
|
|||
scope, name, schema,
|
||||
KJ_MAP(n, nestedTexts) { return kj::mv(n.outerTypeDef); }, indent);
|
||||
|
||||
KJ_LOG(ERROR, top.outerTypeDecl);
|
||||
|
||||
return NodeText {
|
||||
kj::mv(top.outerTypeDecl),
|
||||
kj::strTree(),
|
||||
|
||||
kj::strTree(
|
||||
kj::mv(top.outerTypeDef),
|
||||
|
@ -1588,7 +1585,6 @@ private:
|
|||
auto structNode = proto.getStruct();
|
||||
|
||||
return NodeTextNoSchema {
|
||||
kj::mv(structText.outerTypeDecl),
|
||||
kj::mv(structText.outerTypeDef),
|
||||
kj::mv(structText.readerBuilderDefs),
|
||||
kj::mv(structText.inlineMethodDefs),
|
||||
|
@ -1604,8 +1600,6 @@ private:
|
|||
auto enumerants = schema.asEnum().getEnumerants();
|
||||
|
||||
return NodeTextNoSchema {
|
||||
kj::strTree(),
|
||||
|
||||
kj::strTree(
|
||||
spaces(indent), "public enum ", name, " {\n",
|
||||
KJ_MAP(e, enumerants) {
|
||||
|
@ -1633,7 +1627,6 @@ private:
|
|||
auto constText = makeConstText(scope, name, schema.asConst());
|
||||
|
||||
return NodeTextNoSchema {
|
||||
kj::strTree(),
|
||||
kj::mv(constText.decl),
|
||||
kj::strTree(),
|
||||
kj::strTree(),
|
||||
|
@ -1653,7 +1646,6 @@ private:
|
|||
kj::strTree(),
|
||||
kj::strTree(),
|
||||
kj::strTree(),
|
||||
kj::strTree(),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,6 +34,13 @@ class EncodingSuite extends FunSuite {
|
|||
|
||||
test("Constants") {
|
||||
assert(true == TestConstants.BOOL_CONST);
|
||||
assert(-123 == TestConstants.INT8_CONST);
|
||||
assert(-12345 == TestConstants.INT16_CONST);
|
||||
assert(-12345678 == TestConstants.INT32_CONST);
|
||||
assert(-123456789012345L == TestConstants.INT64_CONST);
|
||||
|
||||
assert(1234.5f == TestConstants.FLOAT32_CONST);
|
||||
assert(-123e45 == TestConstants.FLOAT64_CONST);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue