mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 22:02:52 +01:00
Refactor YAML handling to use the llvm::yaml API. (#3337)
Provides an adapter for the llvm::yaml API because it otherwise needs a bunch of const/non-const definitions, and the traits are difficult to diagnose issues with. The current approach is pretty simple to use, even if it's not super efficient (which, yaml output is more of a debugging thing so I'm not really expecting it to be an issue). Changes the format of yaml output to provide more index information, just as reminders when seeing something like `node+0`. Note this would create more churn in deltas if we were reliant on the output yaml in tests, but we aren't so it should be okay.
This commit is contained in:
@@ -1057,7 +1057,7 @@ TEST_F(LexerTest, DiagnosticUnrecognizedChar) {
|
||||
Lex("\b", consumer);
|
||||
}
|
||||
|
||||
TEST_F(LexerTest, PrintingAsYaml) {
|
||||
TEST_F(LexerTest, PrintingOutputYaml) {
|
||||
// Test that we can parse this into YAML and verify line and indent data.
|
||||
auto buffer = Lex("\n ;\n\n\n; ;\n\n\n\n\n\n\n\n\n\n\n");
|
||||
ASSERT_FALSE(buffer.has_errors());
|
||||
|
||||
Reference in New Issue
Block a user