fail_assert.carbon 719 B

1234567891011121314151617181920
  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. // This won't auto-update because it uses a regex for the prelude line number,
  6. // so that it doesn't need to be updated on every prelude change.
  7. //
  8. // This can't be autoupdated because the error line comes form a different file.
  9. // NOAUTOUPDATE
  10. // RUN: %{not} %{explorer-run}
  11. // RUN: %{not} %{explorer-run-trace}
  12. // CHECK:STDERR: RUNTIME ERROR: {{.*}}/explorer/data/prelude.carbon:{{.*}}: "HALLO WELT"
  13. package ExplorerTest api;
  14. fn Main() -> i32 {
  15. Assert(true, "HALLO WELT");
  16. Assert(false, "HALLO WELT");
  17. return 0;
  18. }