Files
carbon-lang/toolchain/driver/testdata/dump_mem_usage.carbon
T
Geoff Romer 7f6d684b29 Add usage tips to NOAUTOUPDATE tests (#4324)
These tips are especially valuable in these cases, because you can't use
`autoupdate_testdata.py` to identify the output difference, so dumping
the output is pretty much the only option.
2024-09-19 21:00:21 +00:00

24 lines
838 B
Plaintext

// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// ARGS: compile --phase=check --dump-mem-usage %s
//
// To test this file alone, run:
// bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/driver/testdata/dump_mem_usage.carbon
// To dump output, run:
// bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/driver/testdata/dump_mem_usage.carbon
// NOAUTOUPDATE
//
// Avoid testing specific values:
// SET-CHECK-SUBSET
var x: i32 = 1;
// CHECK:STDOUT: ---
// CHECK:STDOUT: filename: dump_mem_usage.carbon
// CHECK:STDOUT: source_:
// CHECK:STDOUT: used_bytes: 0
// CHECK:STDOUT: reserved_bytes: 0
// CHECK:STDOUT: ...