コード例 #1
0
        public void BuildWhenCalledOnLabelReferenceOperandBuilderSetsNextWordOnOperandToZero()
        {
            var builder = new LabelReferenceOperandBuilder();

            var operand = builder.Build(new LabelToken());

            Assert.That(operand.NextWord == 0);
        }
コード例 #2
0
        public void BuildWhenCalledOnLabelReferenceOperandBuilderCreatesNextWordOperand()
        {
            var builder = new LabelReferenceOperandBuilder();

            var token = new LabelToken { Content = "label" };

            var operand = builder.Build(token);

            Assert.That(operand, Is.TypeOf(typeof(NextWordOperand)));
        }
コード例 #3
0
        public void BuildWhenCalledOnLabelReferenceOperandBuilderSetsLabelToTokenContent()
        {
            var builder = new LabelReferenceOperandBuilder();

            var token = new LabelToken { Content = "label" };

            var operand = builder.Build(token);

            Assert.That(operand.Label == "label");
        }