MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / parser_branch_bne

Function parser_branch_bne

crates/asm-to-binary/src/assembler/mod.rs:203–213  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

parse_oneFunction · 0.85

Tested by

no test coverage detected