()
| 158 | |
| 159 | fn loc(file: &str, line: u32) -> RvInstruction { |
| 160 | RvInstruction::SourceLoc { |
| 161 | file: file.to_owned(), |
| 162 | line, |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | #[test] |
| 167 | fn line_table_maps_addresses_to_source_both_ways() { |
| 168 | // One leading unattributed instruction at 0x0, then two lines of code. |
| 169 | let tokens = vec![ |
| 170 | RvInstruction::Label("_start".to_owned()), |
| 171 | nop(), // @0: before any marker |
| 172 | loc("a.hll", 10), // line 10 covers @4, @8 |
nothing calls this directly
no test coverage detected