private void CheckParse(String text, Boolean success, Label expected, String message)
        {
            ExecStartAddress target = OperandTest.CheckParse(ExecStartAddress.Parse, text, success, message);

            if (success)
            {
                Label actual = target.Label;
                LabelTest.Check(expected, actual, message);
            }
        }
        private void CheckParse(String str, Boolean success, R1R2Operand expected, String message)
        {
            R1R2Operand actual = OperandTest.CheckParse(
                (lexer) => R1R2Operand.Parse(lexer, Opcode), str, success, message);

            if (success)
            {
                MachineInstructionOperandTest.Check(expected, actual, Check, message);
            }
        }
Exemple #3
0
        private void CheckParse(String str, Boolean success, Constant expected, String message)
        {
            Literal literal = OperandTest.CheckParse(Literal.Parse, str, success, message);

            if (success)
            {
                Constant actual = literal.Constant;
                ConstantTest.Check(expected, actual, message);
            }
        }
        private void CheckParse(
            String str, Boolean success, Label expectedBuffer, Label expectedLength, String message)
        {
            AreaSpec actual = OperandTest.CheckParse(AreaSpec.Parse, str, success, message);

            if (success)
            {
                LabelTest.Check(expectedBuffer, actual.Buffer, message);
                LabelTest.Check(expectedLength, actual.Length, message);
            }
        }
        private void CheckParse(
            String str, Boolean success, Int32 expectedValue, String message)
        {
            WordCount actual = OperandTest.CheckParse(WordCount.Parse, str, success, message);

            if (success)
            {
                WordCount expected = WordCount.MakeForUnitTest(expectedValue);
                Check(expected, actual, message);
            }
        }