fail_raw_block_single_line.carbon 565 B

12345678910111213141516171819
  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. // NOAUTOUPDATE
  6. package ExplorerTest api;
  7. fn CompareStr(s: String) -> i32 {
  8. // CHECK:STDERR: SYNTAX ERROR: fail_raw_block_single_line.carbon:[[@LINE+1]]: Invalid block string: Too few lines
  9. if (s == #'''raw string literal starting with '''#) {
  10. return 0;
  11. }
  12. return 1;
  13. }
  14. fn Main() -> i32 {
  15. return CompareStr("\"\"raw string literal starting with \"\"");
  16. }