Skip to content

Commit

Permalink
Add linker test for M records of length 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Timotej Lazar committed Apr 6, 2024
1 parent 1244a20 commit 3edd289
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/linker/LinkerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,24 @@ public void testAbsolute() {
}
}

@Test
public void testModification3() {
System.out.println("running testModification3");
List<String> inputs = new ArrayList<>();
inputs.add("tests/linker/mod3/mod3.obj");
Options options = new Options();
options.setOutputName("out.obj");
options.setOutputPath("tests/linker/mod3/out.obj");

Linker test = new Linker(inputs, options);
try {
Section out = test.link();

} catch (LinkerError le) {
Assert.fail("LinkerError: " + le.getMessage());
}
}


// private functions for testing
// -----------------------------------------------------------------
Expand Down
5 changes: 5 additions & 0 deletions tests/linker/mod3/mod3.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mod3 START 0
main LDA x
ORG 4000
x WORD 0x12345
END mod3
5 changes: 5 additions & 0 deletions tests/linker/mod3/mod3.obj
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Hmod3 000000000FA3
T00000003030FA0
T000FA003012345
M00000103
E000000

0 comments on commit 3edd289

Please sign in to comment.