trace.carbon 1.1 KB

123456789101112131415161718192021222324252627282930313233
  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. // RUN: %{executable_semantics} --trace %s 2>&1 | \
  6. // RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s
  7. //
  8. // A lot of output is elided: this is only checking for a few things for simple
  9. // sanity checking on --trace output.
  10. //
  11. // NOAUTOUPDATE
  12. // CHECK: ********** source program **********
  13. // CHECK: fn Print (format_str: String) {
  14. // CHECK: ********** type checking **********
  15. // CHECK: checking pattern (format_str: String)
  16. // CHECK: values: Print: fun<Print>
  17. // CHECK: ********** type checking complete **********
  18. // CHECK: fn Print (format_str: String) {
  19. // CHECK: ********** starting execution **********
  20. // CHECK: ********** initializing globals **********
  21. // CHECK: ********** calling main function **********
  22. // CHECK: {
  23. // CHECK: stack:
  24. // CHECK: heap: fun<Print>, fun<Main>
  25. // CHECK: }
  26. // CHECK: --- step exp Main() (<Main()>:0) --->
  27. // CHECK: result: 0
  28. package ExecutableSemanticsTest api;
  29. fn Main() -> i32 {
  30. return 0;
  31. }