fail_missing_open_curly.carbon 1.2 KB

123456789101112131415161718192021
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // AUTOUPDATE
  6. // RUN: %{not} %{carbon-run-parser}
  7. // CHECK:STDOUT: [
  8. // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'},
  9. // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Bar'},
  10. // CHECK:STDOUT: {kind: 'InterfaceDeclaration', text: 'interface', has_error: yes, subtree_size: 3},
  11. // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'},
  12. // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'},
  13. // CHECK:STDOUT: {kind: 'InterfaceDeclaration', text: 'interface', has_error: yes, subtree_size: 3},
  14. // CHECK:STDOUT: {kind: 'FileEnd', text: ''},
  15. // CHECK:STDOUT: ]
  16. // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/generics/interface/fail_missing_open_curly.carbon:[[@LINE+1]]:15: `interface` should either end with a `;` for a declaration or have a `{ ... }` block for a definition.
  17. interface Bar Baz {}
  18. // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/generics/interface/fail_missing_open_curly.carbon:[[@LINE+1]]:14: `interface` should either end with a `;` for a declaration or have a `{ ... }` block for a definition.
  19. interface Foo