()
| 201 | |
| 202 | // line -> pc: lowest address attributed to the line. |
| 203 | assert_eq!(out.addr_for_source("a.hll", 10), Some(4)); |
| 204 | assert_eq!(out.addr_for_source("a.hll", 11), Some(12)); |
| 205 | assert_eq!(out.addr_for_source("a.hll", 99), None); |
| 206 | assert_eq!(out.addr_for_source("other.hll", 10), None); |
| 207 | } |
| 208 | |
| 209 | #[test] |
| 210 | fn line_markers_emit_no_bytes() { |
| 211 | let with_markers = Assembler::assemble(&[loc("a.hll", 1), nop(), loc("a.hll", 2), nop()]) |
| 212 | .expect("assemble"); |
| 213 | let without = Assembler::assemble(&[nop(), nop()]).expect("assemble"); |
| 214 | assert_eq!(with_markers.text_bytes(), without.text_bytes()); |
| 215 | } |
| 216 |
nothing calls this directly
no test coverage detected