private static void TestQuickInfo(PythonEditor view, int start, int end, params string[] expected) { var snapshot = view.CurrentSnapshot; for (int i = start; i < end; i++) { var analysis = snapshot.AnalyzeExpression( view.VS.ServiceProvider, snapshot.CreateTrackingSpan(i, i == snapshot.Length ? 0 : 1, SpanTrackingMode.EdgeInclusive), false ); List <object> quickInfo = new List <object>(); ITrackingSpan span; QuickInfoSource.AugmentQuickInfoWorker( analysis, quickInfo, out span ); Assert.AreEqual(expected.Length, quickInfo.Count); for (int j = 0; j < expected.Length; j++) { Assert.AreEqual(expected[j], quickInfo[j]); } } }
private static void TestQuickInfo(PythonEditor view, int start, int end, params string[] expected) { var snapshot = view.CurrentSnapshot; for (int i = start; i < end; i++) { List <object> quickInfo = new List <object>(); ITrackingSpan span; QuickInfoSource.AugmentQuickInfoWorker( quickInfo, VsProjectAnalyzer.GetQuickInfoAsync( new SnapshotPoint(snapshot, start) ).Result, out span ); Assert.AreEqual(expected.Length, quickInfo.Count); for (int j = 0; j < expected.Length; j++) { Assert.AreEqual(expected[j], quickInfo[j]); } } }