Add JSON schema to model dump. (#5660)

This commit is contained in:
Jiaming Yuan
2020-05-15 10:18:43 +08:00
committed by fis
parent c42f533ae9
commit 66690f3d07
4 changed files with 118 additions and 26 deletions

View File

@@ -151,6 +151,10 @@ TEST(Tree, DumpJson) {
str = tree.DumpModel(fmap, false, "json");
ASSERT_EQ(str.find("cover"), std::string::npos);
auto j_tree = Json::Load({str.c_str(), str.size()});
ASSERT_EQ(get<Array>(j_tree["children"]).size(), 2);
}
TEST(Tree, DumpText) {