Consolidate line

This commit is contained in:
Jordan Eldredge 2019-07-11 20:57:18 -07:00
parent 10fa928c1e
commit e4ae01291c

View file

@ -168,268 +168,22 @@ describe("standardframe.maki", () => {
// [opcode, size] as output by the Perl decompiler
// TODO: Get rid of the size values here, they are not used any more
const expectedCommands = [
[1],
[1],
[24],
[48],
[2],
[1],
[1],
[24],
[48],
[2],
[1],
[1],
[1],
[1],
[1],
[24],
[48],
[2],
[1],
[1],
[1],
[1],
[1],
[24],
[48],
[2],
[1],
[1],
[1],
[1],
[1],
[24],
[48],
[2],
[1],
[1],
[1],
[1],
[1],
[24],
[48],
[2],
[1],
[1],
[1],
[1],
[1],
[24],
[48],
[2],
[1],
[1],
[1],
[1],
[1],
[24],
[48],
[2],
[1],
[1],
[1],
[1],
[1],
[24],
[48],
[2],
[1],
[1],
[1],
[1],
[1],
[24],
[48],
[2],
[1],
[33],
[3],
[3],
[1],
[1],
[8],
[16],
[1],
[25],
[2],
[1],
[1],
[1],
[24],
[48],
[2],
[1],
[1],
[9],
[16],
[1],
[1],
[1],
[24],
[48],
[2],
[1],
[1],
[8],
[1],
[1],
[8],
[81],
[16],
[1],
[1],
[9],
[16],
[1],
[1],
[1],
[24],
[2],
[1],
[1],
[8],
[16],
[1],
[1],
[9],
[16],
[1],
[1],
[1],
[64],
[1],
[24],
[2],
[18],
[1],
[1],
[1],
[1],
[1],
[24],
[2],
[1],
[33],
[3],
[3],
[3],
[3],
[1],
[1],
[1],
[1],
[1],
[24],
[48],
[2],
[1],
[1],
[1],
[1],
[1],
[24],
[48],
[2],
[1],
[1],
[8],
[1],
[1],
[8],
[81],
[1],
[1],
[8],
[81],
[1],
[1],
[8],
[81],
[16],
[1],
[1],
[1],
[24],
[2],
[1],
[33],
[3],
[1],
[1],
[1],
[24],
[48],
[2],
[1],
[1],
[8],
[16],
[1],
[1],
[1],
[1],
[1],
[1],
[64],
[1],
[64],
[24],
[2],
[1],
[33],
[1],
[1],
[1],
[24],
[2],
[1],
[1],
[1],
[24],
[2],
[1],
[1],
[1],
[24],
[2],
[1],
[1],
[1],
[24],
[2],
[1],
[1],
[1],
[24],
[2],
[1],
[1],
[1],
[24],
[2],
[1],
[1],
[1],
[24],
[2],
[1],
[1],
[1],
[24],
[2],
[1],
[1],
[24],
[2],
[1],
[33],
// prettier-ignore
const expectedCommands = [1, 1, 24, 48, 2, 1, 1, 24, 48, 2, 1, 1, 1, 1, 1, 24, 48, 2,
1, 1, 1, 1, 1, 24, 48, 2, 1, 1, 1, 1, 1, 24, 48, 2, 1, 1, 1, 1, 1, 24, 48, 2, 1, 1,
1, 1, 1, 24, 48, 2, 1, 1, 1, 1, 1, 24, 48, 2, 1, 1, 1, 1, 1, 24, 48, 2, 1, 1, 1, 1,
1, 24, 48, 2, 1, 33, 3, 3, 1, 1, 8, 16, 1, 25, 2, 1, 1, 1, 24, 48, 2, 1, 1, 9, 16, 1,
1, 1, 24, 48, 2, 1, 1, 8, 1, 1, 8, 81, 16, 1, 1, 9, 16, 1, 1, 1, 24, 2, 1, 1, 8, 16, 1,
1, 9, 16, 1, 1, 1, 64, 1, 24, 2, 18, 1, 1, 1, 1, 1, 24, 2, 1, 33, 3, 3, 3, 3, 1, 1, 1,
1, 1, 24, 48, 2, 1, 1, 1, 1, 1, 24, 48, 2, 1, 1, 8, 1, 1, 8, 81, 1, 1, 8, 81, 1, 1, 8,
81, 16, 1, 1, 1, 24, 2, 1, 33, 3, 1, 1, 1, 24, 48, 2, 1, 1, 8, 16, 1, 1, 1, 1, 1, 1, 64,
1, 64, 24, 2, 1, 33, 1, 1, 1, 24, 2, 1, 1, 1, 24, 2, 1, 1, 1, 24, 2, 1, 1, 1, 24, 2, 1, 1,
1, 24, 2, 1, 1, 1, 24, 2, 1, 1, 1, 24, 2, 1, 1, 1, 24, 2, 1, 1, 24, 2, 1, 33,
];
test("can read commands", () => {
maki.commands.forEach((command, i) => {
const [expectedOpcode] = expectedCommands[i];
const expectedOpcode = expectedCommands[i];
if (expectedOpcode !== command.opcode) {
throw new Error(
`Command ${i} reported opcode ${