test_loop_program :: Assertion
test_loop_program =
  let
    program
      = "matrix(:rotate, 0.1, 0.2, 0.3)\n\
        \loop 3 times with i\n\
        \\tmatrix(:rotate, 0.2, 0.2, 0.2)\n\
        \\tshape(:cube, i, i, i)\n\n\n"
    expectedGfx =
      [ GA.MatrixCommand (GA.Rotate 0.1 0.2 0.3)
      , GA.MatrixCommand (GA.Rotate 0.2 0.2 0.2)
      , GA.ShapeCommand (GA.ShapeGfx "cube" 0 0 0)
      , GA.MatrixCommand (GA.Rotate 0.2 0.2 0.2)
      , GA.ShapeCommand (GA.ShapeGfx "cube" 1 1 1)
      , GA.MatrixCommand (GA.Rotate 0.2 0.2 0.2)
      , GA.ShapeCommand (GA.ShapeGfx "cube" 2 2 2)
      ]
  in
    gfxTest program expectedGfx
test_loop_program :: Assertion
test_loop_program =
  let
    program
      = "matrix(:rotate, 0.1, 0.2, 0.3)\n\
        \loop 3 times with i\n\
        \\tmatrix(:rotate, 0.2, 0.2, 0.2)\n\
        \\tshape(:cube, i, i, i)\n\n\n"
    expectedGfx =
      [ GA.MatrixCommand (GA.Rotate 0.1 0.2 0.3)
      , GA.MatrixCommand (GA.Rotate 0.2 0.2 0.2)
      , GA.ShapeCommand (GA.ShapeGfx "cube" 0 0 0)
      , GA.MatrixCommand (GA.Rotate 0.2 0.2 0.2)
      , GA.ShapeCommand (GA.ShapeGfx "cube" 1 1 1)
      , GA.MatrixCommand (GA.Rotate 0.2 0.2 0.2)
      , GA.ShapeCommand (GA.ShapeGfx "cube" 2 2 2)
      ]
  in
    gfxTest program expectedGfx
test_loop_program =
  let
    program
      = "matrix(:rotate, 0.1, 0.2, 0.3)\n\
        \loop 3 times with i\n\
        \\tmatrix(:rotate, 0.2, 0.2, 0.2)\n\
        \\tshape(:cube, i, i, i)\n\n\n"
    expectedGfx =
      [ GA.MatrixCommand (GA.Rotate 0.1 0.2 0.3)
      , GA.MatrixCommand (GA.Rotate 0.2 0.2 0.2)
      , GA.ShapeCommand (GA.ShapeGfx "cube" 0 0 0)
      , GA.MatrixCommand (GA.Rotate 0.2 0.2 0.2)
      , GA.ShapeCommand (GA.ShapeGfx "cube" 1 1 1)
      , GA.MatrixCommand (GA.Rotate 0.2 0.2 0.2)
      , GA.ShapeCommand (GA.ShapeGfx "cube" 2 2 2)
      ]
  in
    gfxTest program expectedGfx