public void SetUp()
        {
            _compRoot       = new MediumTestDebugEngineFactoryCompRoot(new JoinableTaskContext());
            _varInfoFactory = _compRoot.GetLldbVariableInformationFactory();

            _nLogSpy = _compRoot.GetNatvisDiagnosticLogSpy();
            _nLogSpy.Attach();

            _evaluator = _compRoot.GetNatvisExpressionEvaluator();
        }
        public void SetUp()
        {
            _compRoot = new MediumTestDebugEngineFactoryCompRoot(new JoinableTaskContext());
            ((OptionPageGrid)_compRoot.GetVsiService().Options).ExpressionEvaluationEngine =
                ExpressionEvaluationEngineFlag.LLDB;

            _varInfoFactory = _compRoot.GetLldbVariableInformationFactory();

            _nLogSpy = _compRoot.GetNatvisDiagnosticLogSpy();
            _nLogSpy.Attach();

            _evaluator = _compRoot.GetNatvisExpressionEvaluator();
        }
        IVSFake CreateVsFake(IGameletClientFactory gameletClientFactory)
        {
            var serviceManager = new MediumTestServiceManager(_taskContext, CreateVsiOptions());

            _compRoot = new MediumTestDebugEngineFactoryCompRoot(
                serviceManager, _taskContext, gameletClientFactory,
                TestDummyGenerator.Create <IWindowsRegistry>());

            IDebugEngine2 CreateDebugEngine() =>
            _compRoot.CreateDebugEngineFactory().Create(null);

            InitVsFakeCompRoot(serviceManager, gameletClientFactory);
            return(_vsFakeCompRoot.Create(CreateDebugEngine));
        }
        public void TestDebugEngineConstructor()
        {
            var lldbShell             = TestDummyGenerator.Create <SLLDBShell>();
            var vsiService            = new YetiVSIService(OptionPageGrid.CreateForTesting());
            var metrics               = TestDummyGenerator.Create <IMetrics>();
            var vsOutputWindow        = new OutputWindowStub();
            var symbolSettingsManager = Substitute.For <IVsDebuggerSymbolSettingsManager120A>();
            var serviceManager        = new ServiceManagerStub(metrics, lldbShell, vsiService,
                                                               vsOutputWindow, symbolSettingsManager);
            var compRoot = new MediumTestDebugEngineFactoryCompRoot(
                serviceManager, new JoinableTaskContext(), new GameletClientStub.Factory(),
                TestDummyGenerator.Create <IWindowsRegistry>());

            var factory = compRoot.CreateDebugEngineFactory();

            factory.Create(null);
        }
Example #5
0
        public void SetUp()
        {
            _traceLogSpy = new LogSpy();
            _traceLogSpy.Attach();

            var compRoot = new MediumTestDebugEngineFactoryCompRoot(
                null, new JoinableTaskContext(), new GameletClientStub.Factory(),
                Substitute.For <IWindowsRegistry>());

            _natvisScanner = compRoot.GetNatvisVisualizerScanner();
            _natvisLoader  = compRoot.GetNatvisLoader();

            _nLogSpy = compRoot.GetNatvisDiagnosticLogSpy();
            _nLogSpy.Attach();

            _natvisLogger   = compRoot.GetNatvisDiagnosticLogger();
            _mockRegistry   = compRoot.GetWindowsRegistry();
            _mockFileSystem = (MockFileSystem)compRoot.GetFileSystem();
        }
        public void SetUp()
        {
            _optionPageGrid = OptionPageGrid.CreateForTesting();
            _optionPageGrid.NatvisLoggingLevel = NatvisLoggingLevelFeatureFlag.VERBOSE;

            var taskContext    = new JoinableTaskContext();
            var serviceManager = new FakeServiceManager(taskContext);

            serviceManager.AddService(typeof(YetiVSIService), new YetiVSIService(_optionPageGrid));
            _compRoot = new MediumTestDebugEngineFactoryCompRoot(
                serviceManager, taskContext, new GameletClientStub.Factory(),
                TestDummyGenerator.Create <IWindowsRegistry>());

            _varInfoFactory = _compRoot.GetLldbVariableInformationFactory();

            _nLogSpy = _compRoot.GetNatvisDiagnosticLogSpy();
            _nLogSpy.Attach();

            _evaluator = _compRoot.GetNatvisExpressionEvaluator();
        }
Example #7
0
        public void SetUp()
        {
            _compRoot = new MediumTestDebugEngineFactoryCompRoot(new JoinableTaskContext());

            _childValues = new int[] { 20, 21, 22, 23, 24 };
            _remoteValue = RemoteValueFakeUtil.CreateSimpleIntArray("myArray", _childValues);

            ulong elementSize = 4;
            var   pointeeType = new SbTypeStub("int", TypeFlags.IS_INTEGER);

            pointeeType.SetByteSize(elementSize);
            var pointerType = new SbTypeStub("int*", TypeFlags.IS_POINTER, pointeeType);

            _pointerValue =
                RemoteValueFakeUtil.CreatePointer("int*", "myPtr", $"{_pointerAddress}");
            _pointerValue.SetTypeInfo(pointerType);

            for (uint i = 0; i < 5; i++)
            {
                _pointerValue.SetCreateValueFromAddress(
                    _pointerAddress + i * elementSize,
                    RemoteValueFakeUtil.CreateSimpleInt($"[{i}]", (int)(i) + 20));
            }
        }
 public void SetUp()
 {
     _compRoot = new MediumTestDebugEngineFactoryCompRoot(new JoinableTaskContext());
     _logSpy   = new LogSpy();
     _logSpy.Attach();
 }