Skip to content
This repository was archived by the owner on Jul 17, 2026. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 57 additions & 1 deletion src/final2/subtests/CreateTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
* @author Annika Berger
* @author Roman Langrehr
*
*

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why my formatter keeps doing this, or which version is correct according to our formatter file…

*/
public class CreateTest extends LangtonSubtest {

Expand Down Expand Up @@ -218,4 +218,60 @@ public void allTypesCreatedTest() {
};
sessionTest(runs, Input.getFile(inputFile), ALL_TYPES_RULE, ALL_TYPES_SPEEDUP);
}

/**
* Asserts that each lazy ant has its own movement counter, i.e. a lazy ant created between other lazy ants' moves
* must move in a different rhythm than the other ants.
*/
@Test
public void testCreatedLazyAntMovement() {
inputFile = new String[] {
"y000",
"0000",
"0000",
"0000"
};
runs = new Run[] {
checkPitch(inputFile),
move(1),
checkPitch(new String[] {
"0000",
"y000",
"0000",
"0000"
}),
new NoOutputRun("create z,2,2"),
checkPitch(new String[] {
"0000",
"y000",
"00z0",
"0000"

}),
move(1),
checkPitch(new String[] {
"0000",
"y000",
"0000",
"00z0"
}),
move(1),
checkPitch(new String[] {
"0000",
"3y00",
"0000",
"00z0"
}),
move(1),
checkPitch(new String[] {
"0000",
"3y00",
"0000",
"003z"
}),
quit()
};
sessionTest(runs, Input.getFile(inputFile), "rule=270-270-270-270-270", "speedup=2");
}

}