text: var compiler = require('../lib/compiler.js');
  
  exports.test_dec_zp = function (test) {
      var tokens = compiler.lexical('DEC $00');
      test.equal(2, tokens.length);
      test.equal('T_INSTRUCTION', tokens[0].type);
      test.equal('T_ADDRESS', tokens[1].type);
      var ast = compiler.syntax(tokens);
      test.equal(1, ast.length);
      test.equal('S_ZEROPAGE', ast[0].type);
      var code = compiler.semantic(ast);
      test.deepEqual(code, [0xc6, 0x00]);
      test.done();
  };
  
  exports.test_dec_zpx = function (test) {
      var tokens = compiler.lexical('DEC $10,X');
      test.equal(4, tokens.length);
      test.equal('T_INSTRUCTION', tokens[0].type);
      test.equal('T_ADDRESS', tokens[1].type);
      test.equal('T_SEPARATOR', tokens[2].type);
      test.equal('T_REGISTER', tokens[3].type);
      var ast = compiler.syntax(tokens);
      test.equal(1, ast.length);
      test.equal('S_ZEROPAGE_X', ast[0].type);
      var code = compiler.semantic(ast);
      test.deepEqual(code, [0xd6, 0x10]);
      test.done();
  };
  
  exports.test_dec_abs = function (test) {
      var tokens = compiler.lexical('DEC $1234');
      test.equal(2, tokens.length);
      test.equal('T_INSTRUCTION', tokens[0].type);
      test.equal('T_ADDRESS', tokens[1].type);
      test.equal('$1234', tokens[1].value);
      var ast = compiler.syntax(tokens);
      test.equal(1, ast.length);
      test.equal('S_ABSOLUTE', ast[0].type);
      var code = compiler.semantic(ast);
      test.deepEqual(code, [0xce, 0x34, 0x12]);
      test.done();
  };
  
  exports.test_dec_absx = function (test) {
      var tokens = compiler.lexical('DEC $1234,X');
      test.equal(4, tokens.length);
      test.equal('T_INSTRUCTION', tokens[0].type);
      test.equal('T_ADDRESS', tokens[1].type);
      test.equal('$1234', tokens[1].value);
      test.equal('T_SEPARATOR', tokens[2].type);
      test.equal('T_REGISTER', tokens[3].type);
      var ast = compiler.syntax(tokens);
      test.equal(1, ast.length);
      test.equal('S_ABSOLUTE_X', ast[0].type);
      var code = compiler.semantic(ast);
      test.deepEqual(code, [0xde, 0x34, 0x12]);
      test.done();
  };
  