示例#1
0
        public void GetValueForExpressionPathFailure()
        {
            RemoteValueFake remoteValue = RemoteValueFakeUtil.CreateSimpleArray(
                "test", "int", RemoteValueFakeUtil.CreateSimpleInt, 4);
            var varInfo = CreateVarInfo(remoteValue, "remoteValue");

            var result =
                varInfo.GetValueForExpressionPath(new VsExpression("[1]", FormatSpecifier.EMPTY));

            Assert.That(result.Error, Is.True);
        }
示例#2
0
        public async Task GetValueForExpressionPathSuccessAsync()
        {
            RemoteValueFake remoteValue = RemoteValueFakeUtil.CreateSimpleArray(
                "test", "int", RemoteValueFakeUtil.CreateSimpleInt, 4, 7, 74, 47);
            var varInfo = CreateVarInfo(remoteValue, "remoteValue");

            var result =
                varInfo.GetValueForExpressionPath(new VsExpression("[0]", FormatSpecifier.EMPTY));

            Assert.That(result.Error, Is.False);
            Assert.That(await result.ValueAsync(), Is.EqualTo("4"));
            Assert.That(result.DisplayName, Is.EqualTo("[0]"));
        }
示例#3
0
        void SetupRegisters()
        {
            var registerSet1 = RemoteValueFakeUtil.CreateSimpleIntArray(
                "General Purpose Registers", 0x01, 0x02);
            var registerSet2 = RemoteValueFakeUtil.CreateSimpleArray(
                "Floating Point Registers", "Register Set",
                (_, value) => new RemoteValueFake($"xmm{value}", "0x00"),
                0, 1);

            _mockRemoteFrame.GetRegisters().Returns(
                new List <RemoteValue> {
                registerSet1, registerSet2
            });
        }