mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-27 22:02:33 +01:00
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.
24 lines
838 B
Plaintext
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: ...
|