comments.carbon 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. // TIP: To test this file alone, run:
  7. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/format/testdata/basics/comments.carbon
  8. // TIP: To dump output, run:
  9. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/format/testdata/basics/comments.carbon
  10. // --- test.carbon
  11. // A comment
  12. fn F() {}
  13. // Another comment
  14. // Block
  15. // comment
  16. class C {
  17. // Internal comment
  18. }
  19. // Another
  20. // Block
  21. //
  22. // Comment
  23. // --- AUTOUPDATE-SPLIT
  24. // CHECK:STDOUT: // A comment
  25. // CHECK:STDOUT: fn F () {}
  26. // CHECK:STDOUT: // Another comment
  27. // CHECK:STDOUT: // Block
  28. // CHECK:STDOUT: // comment
  29. // CHECK:STDOUT: class C {
  30. // CHECK:STDOUT: // Internal comment
  31. // CHECK:STDOUT: }
  32. // CHECK:STDOUT: // Another
  33. // CHECK:STDOUT: // Block
  34. // CHECK:STDOUT: //
  35. // CHECK:STDOUT: // Comment