directiveTest :: Assertion
directiveTest = assertEqual "Parse directives" expected $ lexer source
    where source   = "global _start\n" ++
                     "global somefunc:function\n" ++
                     "extern printf"
          expected = [Line {sourceCode = "global _start",
                            lineNumber = 1,
                            tokens     = [TWord  "global",
                                          TWord  "_start"]},
                      Line {sourceCode = "global somefunc:function",
                            lineNumber = 2,
                            tokens     = [TWord  "global",
                                          TLabel "somefunc",
                                          TWord  "function"]},
                      Line {sourceCode = "extern printf",
                            lineNumber = 3,
                            tokens     = [TWord  "extern",
                                          TWord  "printf"]}]
directiveTest :: Assertion
directiveTest = assertEqual "Parse directives" expected $ lexer source
    where source   = "global _start\n" ++
                     "global somefunc:function\n" ++
                     "extern printf"
          expected = [Line {sourceCode = "global _start",
                            lineNumber = 1,
                            tokens     = [TWord  "global",
                                          TWord  "_start"]},
                      Line {sourceCode = "global somefunc:function",
                            lineNumber = 2,
                            tokens     = [TWord  "global",
                                          TLabel "somefunc",
                                          TWord  "function"]},
                      Line {sourceCode = "extern printf",
                            lineNumber = 3,
                            tokens     = [TWord  "extern",
                                          TWord  "printf"]}]
directiveTest = assertEqual "Parse directives" expected $ lexer source
    where source   = "global _start\n" ++
                     "global somefunc:function\n" ++
                     "extern printf"
          expected = [Line {sourceCode = "global _start",
                            lineNumber = 1,
                            tokens     = [TWord  "global",
                                          TWord  "_start"]},
                      Line {sourceCode = "global somefunc:function",
                            lineNumber = 2,
                            tokens     = [TWord  "global",
                                          TLabel "somefunc",
                                          TWord  "function"]},
                      Line {sourceCode = "extern printf",
                            lineNumber = 3,
                            tokens     = [TWord  "extern",
                                          TWord  "printf"]}]