From df9494a9481da433c63622b3b10cfe70da645f84 Mon Sep 17 00:00:00 2001 From: josh11b Date: Thu, 16 Nov 2023 10:48:39 -0800 Subject: [PATCH] Restore interface declaration parse test (#3406) The declaration test was made the same as the empty body test in #2649. This change restores it to test parsing a forward declaration of an interface. --- .../testdata/generics/interface/declaration.carbon | 10 ++++------ .../testdata/generics/interface/empty_body.carbon | 1 + 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/toolchain/parse/testdata/generics/interface/declaration.carbon b/toolchain/parse/testdata/generics/interface/declaration.carbon index 244a087d44a1..bf802f5bef79 100644 --- a/toolchain/parse/testdata/generics/interface/declaration.carbon +++ b/toolchain/parse/testdata/generics/interface/declaration.carbon @@ -4,15 +4,13 @@ // // AUTOUPDATE -interface Foo { -} +interface Foo; // CHECK:STDOUT: - filename: declaration.carbon // CHECK:STDOUT: parse_tree: [ // CHECK:STDOUT: {kind: 'FileStart', text: ''}, -// CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, -// CHECK:STDOUT: {kind: 'Name', text: 'Foo'}, -// CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 3}, -// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, +// CHECK:STDOUT: {kind: 'Name', text: 'Foo'}, +// CHECK:STDOUT: {kind: 'InterfaceDecl', text: ';', subtree_size: 3}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/generics/interface/empty_body.carbon b/toolchain/parse/testdata/generics/interface/empty_body.carbon index 2a7074ef5f62..19813ba155f9 100644 --- a/toolchain/parse/testdata/generics/interface/empty_body.carbon +++ b/toolchain/parse/testdata/generics/interface/empty_body.carbon @@ -3,6 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE + interface Foo { }