// File: chuckwolber[P]Cube/test/test_algorithm.cpp
// Function: test_skip()
void test_skip() {
    std::cout << "Testing skip... ";

    Algorithm alg;
    std::vector<Turn> results;
    std::vector<Turn> expected = {
        {Layer::F, true},  {Layer::D, false}, {Layer::F, true},  {Layer::U, true},
        {Layer::F, true},  {Layer::L, false}, {Layer::F, false}, {Layer::R, true},
        {Layer::F, false}, {Layer::B, false}, {Layer::U, true},  {Layer::D, true},
        {Layer::U, false}, {Layer::F, false}, {Layer::U, false}, {Layer::L, true},
        {Layer::R, true},  {Layer::U, false}, {Layer::R, true},  {Layer::B, true},
        {Layer::R, false}, {Layer::R, false}, {Layer::D, true},  {Layer::F, true},
        {Layer::D, true},  {Layer::D, false}, {Layer::D, false}, {Layer::U, true},
        {Layer::D, false}, {Layer::L, false}, {Layer::L, true},  {Layer::R, true},
        {Layer::L, true},  {Layer::B, false}, {Layer::L, false}, {Layer::D, true},
        {Layer::B, true},  {Layer::F, false}, {Layer::B, true},  {Layer::L, true},
        {Layer::B, false}, {Layer::U, false}, {Layer::B, false}, {Layer::B, true},
        {Layer::F, true},  {Layer::F, true},  {Layer::R, false}, {Layer::F, true},
        {Layer::F, false}, {Layer::F, true}
    };

    for (int i = 0; i < 25; i++) {
        for (Turn t : alg.getAlgorithm())
            results.push_back(t);
        alg += 7;
    }
    verify_turns(results, expected);

    std::cout << "Passed" << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x290, %rsp            # imm = 0x290
movq 0xb236(%rip), %rdi      # 0x15fd8
leaq 0x56de(%rip), %rsi      # 0x10487
callq 0x2190
leaq -0x28(%rbp), %rdi
callq 0x2420
leaq -0x40(%rbp), %rdi
callq 0x50a0
leaq 0x5d81(%rip), %rsi      # 0x10b48
leaq -0x1f8(%rbp), %rdi
movq %rdi, -0x288(%rbp)
movl $0x190, %edx            # imm = 0x190
callq 0x2150
movq -0x288(%rbp), %rax
movq %rax, -0x68(%rbp)
movq $0x32, -0x60(%rbp)
leaq -0x1f9(%rbp), %rdi
movq %rdi, -0x280(%rbp)
callq 0x51f0
movq -0x280(%rbp), %rcx
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
leaq -0x58(%rbp), %rdi
callq 0xf130
jmp 0xae1f
leaq -0x1f9(%rbp), %rdi
callq 0x54d0
movl $0x0, -0x210(%rbp)
cmpl $0x19, -0x210(%rbp)
jge 0xaf6e
leaq -0x230(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x33e0
jmp 0xae54
leaq -0x230(%rbp), %rax
movq %rax, -0x218(%rbp)
movq -0x218(%rbp), %rdi
callq 0x7830
movq %rax, -0x238(%rbp)
movq -0x218(%rbp), %rdi
callq 0x7680
movq %rax, -0x240(%rbp)
leaq -0x238(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0xf1b0
testb $0x1, %al
jne 0xaeea
leaq -0x230(%rbp), %rdi
callq 0x4920
jmp 0xaf48
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
leaq -0x1f9(%rbp), %rdi
callq 0x54d0
jmp 0xb05b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
jmp 0xb052
leaq -0x238(%rbp), %rdi
callq 0x7ac0
movq (%rax), %rax
movq %rax, -0x248(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0xf1f0
jmp 0xaf12
jmp 0xaf14
leaq -0x238(%rbp), %rdi
callq 0xf260
jmp 0xae88
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
leaq -0x230(%rbp), %rdi
callq 0x4920
jmp 0xb052
leaq -0x28(%rbp), %rdi
movl $0x7, %esi
callq 0x2bd0
jmp 0xaf58
jmp 0xaf5a
movl -0x210(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x210(%rbp)
jmp 0xae35
leaq -0x260(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x4830
jmp 0xaf80
leaq -0x278(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x4830
jmp 0xaf92
leaq -0x260(%rbp), %rdi
leaq -0x278(%rbp), %rsi
callq 0xecb0
jmp 0xafa7
leaq -0x278(%rbp), %rdi
callq 0x4920
leaq -0x260(%rbp), %rdi
callq 0x4920
movq 0xb012(%rip), %rdi      # 0x15fd8
leaq 0x53e9(%rip), %rsi      # 0x103b6
callq 0x2190
movq %rax, -0x290(%rbp)
jmp 0xafdb
movq -0x290(%rbp), %rdi
movq 0xafdf(%rip), %rsi      # 0x15fc8
callq 0x21c0
jmp 0xaff0
leaq -0x58(%rbp), %rdi
callq 0x4920
leaq -0x40(%rbp), %rdi
callq 0x4920
leaq -0x28(%rbp), %rdi
callq 0x4bd0
addq $0x290, %rsp            # imm = 0x290
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
jmp 0xb046
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
leaq -0x278(%rbp), %rdi
callq 0x4920
leaq -0x260(%rbp), %rdi
callq 0x4920
leaq -0x58(%rbp), %rdi
callq 0x4920
leaq -0x40(%rbp), %rdi
callq 0x4920
leaq -0x28(%rbp), %rdi
callq 0x4bd0
movq -0x208(%rbp), %rdi
callq 0x22a0
nopl (%rax)