assert.carbon 697 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. // 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. // RUN: %{not} %{explorer} %s 2>&1 | %{FileCheck-strict} %s
  9. // RUN: %{not} %{explorer-trace} %s 2>&1 | %{FileCheck-allow-unmatched} %s
  10. // NOAUTOUPDATE
  11. // CHECK:RUNTIME ERROR: {{.*}}/explorer/data/prelude.carbon:{{.*}}: "HALLO WELT"
  12. package ExplorerTest api;
  13. fn Main() -> i32 {
  14. Assert(true, "HALLO WELT");
  15. Assert(false, "HALLO WELT");
  16. return 0;
  17. }