rust/tests/debuginfo/empty-string.rs
Martin Nordholts 5b57d02e9f compiletest: Use //@ prefixes also for debuginfo test directives
So that when we later add support for revisions we can use the same
syntax for revisions as elsewhere.

This also prevents people from making typos for commands since
`src/tools/compiletest/src/directives/directive_names.rs` will catch such
typos now.

Note that we one FIXME for a non-trivial change for later:
```
// FIXME(148097): Change `// cdb-checksimple_closure` to `//@ cdb-check:simple_closure`
```
2025-11-25 06:13:45 +01:00

34 lines
732 B
Rust

//@ ignore-windows-gnu: #128981
//@ ignore-android: FIXME(#10381)
//@ compile-flags:-g
//@ ignore-backends: gcc
// === GDB TESTS ===================================================================================
//@ gdb-command: run
//@ gdb-command: print empty_string
//@ gdb-check:$1 = ""
//@ gdb-command: print empty_str
//@ gdb-check:$2 = ""
// === LLDB TESTS ==================================================================================
//@ lldb-command:run
//@ lldb-command:fr v empty_string
//@ lldb-check:[...] empty_string = ""
//@ lldb-command:fr v empty_str
//@ lldb-check:[...] empty_str = ""
fn main() {
let empty_string = String::new();
let empty_str = "";
zzz(); // #break
}
fn zzz() {}