mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 20:11:12 +01:00
Update parse tree yaml for multi-file. (#3215)
Building on #3214, updates parse tree yaml to be: ``` - filename: name parse_tree: [ ... ] ```
This commit is contained in:
@@ -68,7 +68,14 @@ TEST_F(TreeTest, PrintPostorderAsYAML) {
|
||||
Yaml::MappingValue{{"kind", "FileEnd"}, {"text", ""}},
|
||||
};
|
||||
|
||||
EXPECT_THAT(Yaml::Value::FromText(print_stream.TakeStr()), ElementsAre(file));
|
||||
auto root = Yaml::SequenceValue{
|
||||
Yaml::MappingValue{
|
||||
{"filename", "test.carbon"},
|
||||
{"parse_tree", file},
|
||||
},
|
||||
};
|
||||
|
||||
EXPECT_THAT(Yaml::Value::FromText(print_stream.TakeStr()), ElementsAre(root));
|
||||
}
|
||||
|
||||
TEST_F(TreeTest, PrintPreorderAsYAML) {
|
||||
@@ -104,7 +111,14 @@ TEST_F(TreeTest, PrintPreorderAsYAML) {
|
||||
{"node_index", "5"}, {"kind", "FileEnd"}, {"text", ""}},
|
||||
};
|
||||
|
||||
EXPECT_THAT(Yaml::Value::FromText(print_stream.TakeStr()), ElementsAre(file));
|
||||
auto root = Yaml::SequenceValue{
|
||||
Yaml::MappingValue{
|
||||
{"filename", "test.carbon"},
|
||||
{"parse_tree", file},
|
||||
},
|
||||
};
|
||||
|
||||
EXPECT_THAT(Yaml::Value::FromText(print_stream.TakeStr()), ElementsAre(root));
|
||||
}
|
||||
|
||||
TEST_F(TreeTest, HighRecursion) {
|
||||
|
||||
Reference in New Issue
Block a user