コード例 #1
0
        public void OperationTypeLDR()
        {
            OpCodeLexToken token = new OpCodeLexToken("LDR");

            Assert.Equal("ldr", token.Value());
            Assert.Equal(OperationType.LDR, token.OperationType);
        }
コード例 #2
0
        public void OperationTypeBNE()
        {
            OpCodeLexToken token = new OpCodeLexToken("BNE");

            Assert.Equal("bne", token.Value());
            Assert.Equal(OperationType.BNE, token.OperationType);
        }
コード例 #3
0
        public void OperationTypeCMPI()
        {
            OpCodeLexToken token = new OpCodeLexToken("CMPI");

            Assert.Equal("cmpi", token.Value());
            Assert.Equal(OperationType.CMPI, token.OperationType);
        }
コード例 #4
0
        public void OperationTypeBEQ()
        {
            OpCodeLexToken token = new OpCodeLexToken("BEQ");

            Assert.Equal("beq", token.Value());
            Assert.Equal(OperationType.BEQ, token.OperationType);
        }
コード例 #5
0
        public void OperationTypeBL()
        {
            OpCodeLexToken token = new OpCodeLexToken("BL");

            Assert.Equal("bl", token.Value());
            Assert.Equal(OperationType.BL, token.OperationType);
        }
コード例 #6
0
        public void OperationTypeADDI()
        {
            OpCodeLexToken token = new OpCodeLexToken("ADDI");

            Assert.Equal("addi", token.Value());
            Assert.Equal(OperationType.ADDI, token.OperationType);
        }
コード例 #7
0
        public void OperationTypeANDS()
        {
            OpCodeLexToken token = new OpCodeLexToken("ANDS");

            Assert.Equal("ands", token.Value());
            Assert.Equal(OperationType.ANDS, token.OperationType);
        }
コード例 #8
0
        public void OperationTypeMOVT()
        {
            OpCodeLexToken token = new OpCodeLexToken("MOVT");

            Assert.Equal("movt", token.Value());
            Assert.Equal(OperationType.MOVT, token.OperationType);
        }
コード例 #9
0
        public void OperationTypeSUBS()
        {
            OpCodeLexToken token = new OpCodeLexToken("SUBS");

            Assert.Equal("subs", token.Value());
            Assert.Equal(OperationType.SUBS, token.OperationType);
        }
コード例 #10
0
        public void OperationTypeSTR()
        {
            OpCodeLexToken token = new OpCodeLexToken("STR");

            Assert.Equal("str", token.Value());
            Assert.Equal(OperationType.STR, token.OperationType);
        }
コード例 #11
0
        public void OperationTypePUSH()
        {
            OpCodeLexToken token = new OpCodeLexToken("PUSH");

            Assert.Equal("push", token.Value());
            Assert.Equal(OperationType.PUSH, token.OperationType);
        }
コード例 #12
0
        public void OperationTypePOP()
        {
            OpCodeLexToken token = new OpCodeLexToken("POP");

            Assert.Equal("pop", token.Value());
            Assert.Equal(OperationType.POP, token.OperationType);
        }
コード例 #13
0
 public void OperationTypeNONE()
 {
     Assert.Throws<SyntaxException>(() =>
     {
         OpCodeLexToken token = new OpCodeLexToken("NONE");
     });
 }