Skip to content

Commit 945acdd

Browse files
committed
Removed GIT conflict markers and commented-out code
1 parent 6f9d147 commit 945acdd

File tree

3 files changed

+2
-241
lines changed

3 files changed

+2
-241
lines changed

RubberduckTests/Inspections/AssignedByValParameterMakeLocalCopyQuickFixTests.cs

Lines changed: 0 additions & 178 deletions
Original file line numberDiff line numberDiff line change
@@ -226,183 +226,5 @@ private string GetModuleContent(IVBE vbe, string componentName = "")
226226
? project.VBComponents[componentName].CodeModule : project.VBComponents[0].CodeModule;
227227
return module.Content();
228228
}
229-
/*//<<<<<<< HEAD
230-
//=======
231-
232-
internal class TestComponentSpecification
233-
{
234-
private string _name;
235-
private string _content;
236-
private ComponentType _componentType;
237-
public TestComponentSpecification(string componentName, string componentContent, ComponentType componentType)
238-
{
239-
_name = componentName;
240-
_content = componentContent;
241-
_componentType = componentType;
242-
}
243-
244-
public string Name { get { return _name; } }
245-
public string Content { get { return _content; } }
246-
public ComponentType ModuleType { get { return _componentType; } }
247-
}
248-
249-
private string GetQuickFixResult(string userEnteredNames, TestComponentSpecification resultsComponent, TestComponentSpecification[] testComponents)
250-
{
251-
var vbe = BuildProject("TestProject", testComponents.ToList());
252-
var state = MockParser.CreateAndParse(vbe.Object);
253-
254-
var mockDialogFactory = BuildMockDialogFactory(userEnteredNames);
255-
var inspection = new AssignedByValParameterInspection(state, mockDialogFactory.Object);
256-
var inspectionResults = inspection.GetInspectionResults();
257-
258-
inspectionResults.First().QuickFixes.Single(s => s is AssignedByValParameterMakeLocalCopyQuickFix).Fix();
259-
260-
return GetModuleContent(vbe.Object, resultsComponent.Name);
261-
}
262-
263-
private Mock<IVBE> BuildProject(string projectName, List<TestComponentSpecification> testComponents)
264-
{
265-
var builder = new MockVbeBuilder();
266-
var enclosingProjectBuilder = builder.ProjectBuilder(projectName, ProjectProtection.Unprotected);
267-
268-
testComponents.ForEach(c => enclosingProjectBuilder.AddComponent(c.Name, c.ModuleType, c.Content));
269-
var enclosingProject = enclosingProjectBuilder.Build();
270-
builder.AddProject(enclosingProject);
271-
return builder.Build();
272-
}
273-
274-
private string GetNameAlreadyAccessibleWithinClass_FirstClassBody()
275-
{
276-
return
277-
@"
278-
Private memberString As String
279-
Private memberLong As Long
280-
281-
Private Sub Class_Initialize()
282-
memberLong = 6
283-
memberString = ""No Value""
284-
End Sub
285-
286-
Public Sub Foo(ByVal arg1 As String, theSecondArg As Long)
287-
Let arg1 = ""test""
288-
End Sub
289-
290-
Private Sub FooFight(ByRef arg1 As String)
291-
xArg1 = 6
292-
Let arg1 = ""test""
293-
End Sub
294-
";
295-
296-
}
297-
private string GetRespectsDeclarationsAccessibilityRules_FirstClassBody()
298-
{
299-
return
300-
@"
301-
Private memberString As String
302-
Private memberLong As Long
303-
Private myEggo as String
304-
305-
Public Sub Foo(ByVal arg1 As String)
306-
Dim localVar as Long
307-
localVar = 7
308-
Let arg1 = ""test""
309-
memberString = arg1 & ""Foo""
310-
End Sub
311-
312-
Public Function KungFooFighting(ByRef arg1 As String, theSecondArg As Long) As String
313-
Let arg1 = ""test""
314-
Dim result As String
315-
result = arg1 & theSecondArg
316-
KungFooFighting = result
317-
End Function
318-
319-
Property Let GoMyEggo(newValue As String)
320-
myEggo = newValue
321-
End Property
322-
323-
Property Get GoMyEggo()
324-
GoMyEggo = myEggo
325-
End Property
326-
327-
Private Sub FooFight(ByRef arg1 As String)
328-
xArg1 = 6
329-
Let arg1 = ""test""
330-
End Sub
331-
";
332-
}
333-
private string GetRespectsDeclarationsAccessibilityRules_SecondClassBody()
334-
{
335-
return
336-
@"
337-
Private memberString As String
338-
Private memberLong As Long
339-
Public mySecondEggo as String
340-
341-
342-
Public Sub Foo2( arg1 As String, theSecondArg As Long)
343-
Let arg1 = ""test""
344-
memberString = arg1 & ""Foo""
345-
End Sub
346-
347-
Public Function KungFooFighting(ByRef arg1 As String, theSecondArg As Long) As String
348-
Let arg1 = ""test""
349-
Dim result As String
350-
result = arg1 & theSecondArg
351-
KungFooFighting = result
352-
End Function
353-
354-
Property Let GoMyOtherEggo(newValue As String)
355-
mySecondEggo = newValue
356-
End Property
357-
358-
Property Get GoMyOtherEggo()
359-
GoMyOtherEggo = mySecondEggo
360-
End Property
361-
362-
Private Sub FooFighters(ByRef arg1 As String)
363-
xArg1 = 6
364-
Let arg1 = ""test""
365-
End Sub
366-
367-
Sub Bar()
368-
Dim st As String
369-
st = ""Test""
370-
Dim v As Long
371-
v = 5
372-
result = KungFooFighting(st, v)
373-
End Sub
374-
";
375-
}
376-
private string GetRespectsDeclarationsAccessibilityRules_FirstModuleBody()
377-
{
378-
return
379-
@"
380-
Option Explicit
381-
382-
383-
Public Const CantTouchThis As String = ""Can't Touch this""
384-
Public THE_FILENAME As String
385-
386-
Sub SetFilename(filename As String)
387-
THE_FILENAME = filename
388-
End Sub
389-
";
390-
}
391-
private string GetRespectsDeclarationsAccessibilityRules_SecondModuleBody()
392-
{
393-
return
394-
@"
395-
Option Explicit
396-
397-
398-
Public BigNumber as Long
399-
Public ShortStory As String
400-
401-
Public Sub DoSomething(filename As String)
402-
ShortStory = filename
403-
End Sub
404-
";
405-
}
406-
//>>>>>>> rubberduck-vba/next*/
407229
}
408230
}

RubberduckTests/Refactoring/RenameTests.cs

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -16,52 +16,6 @@ namespace RubberduckTests.Refactoring
1616
[TestClass]
1717
public class RenameTests
1818
{
19-
/*<<<<<<< HEAD
20-
=======
21-
[TestMethod]
22-
public void RenameRefactoring_RenameSub_Issue2727()
23-
{
24-
//Input
25-
string inputCode = GetIssue2727ExampleCode();
26-
27-
Selection selection = Select2727Variable();
28-
29-
//New name provided by the user - no conflicts
30-
var userEnteredName = "Value";
31-
32-
//Expectation
33-
//Expecation is that the messageBox.Show() is not invoked
34-
35-
IVBComponent component;
36-
var vbe = MockVbeBuilder.BuildFromSingleStandardModule(inputCode, out component, selection);
37-
var state = MockParser.CreateAndParse(vbe.Object);
38-
39-
var qualifiedSelection = new QualifiedSelection(new QualifiedModuleName(component), selection);
40-
41-
var msgbox = new Mock<IMessageBox>();
42-
msgbox.Setup(m => m.Show(It.IsAny<string>(), It.IsAny<string>(), MessageBoxButtons.YesNo, It.IsAny<MessageBoxIcon>()))
43-
.Returns(DialogResult.Yes);
44-
45-
var vbeWrapper = vbe.Object;
46-
var model = new RenameModel(vbeWrapper, state, qualifiedSelection, msgbox.Object) { NewName = userEnteredName };
47-
48-
//SetupFactory
49-
var factory = SetupFactory(model);
50-
51-
var refactoring = new RenameRefactoring(vbeWrapper, factory.Object, msgbox.Object, state);
52-
refactoring.Refactor(qualifiedSelection);
53-
54-
//#2727 bug describes a scenario where a declaration collision is detected where none exists.
55-
//The result of detecting one or more collisions is that the messagebox is presented to the user
56-
//To see if he wants to continue with the Renaming process.
57-
//To pass this test, FindDeclarationForIdentifier() should find zero collisions and therefore
58-
//skips the logic that presents the message box to the user.
59-
string failMsg = "RenameRefactoring found a conflicting declaration where none exists.";
60-
msgbox.Verify(m => m.Show(It.IsAny<string>(), It.IsAny<string>(), MessageBoxButtons.YesNo, It.IsAny<MessageBoxIcon>()), Times.Never, failMsg);
61-
}
62-
63-
>>>>>>> rubberduck-vba/next */
64-
6519
[TestMethod]
6620
public void RenameRefactoring_RenameSub()
6721
{

RubberduckTests/Symbols/DeclarationFinderTests.cs

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,23 @@
1-
/*<<<<<<< HEAD
2-
=======*/
3-
using System.Collections.Generic;
4-
using System.Linq;
5-
using System.Threading;
6-
using Antlr4.Runtime;
7-
//>>>>>>> rubberduck-vba/next
1+
82
using Microsoft.VisualStudio.TestTools.UnitTesting;
93
using Rubberduck.Parsing.Grammar;
104
using Rubberduck.Parsing.Symbols;
115
using Rubberduck.Parsing.VBA;
12-
//<<<<<<< HEAD
136
using Rubberduck.VBEditor.SafeComWrappers;
147
using Rubberduck.VBEditor.SafeComWrappers.Abstract;
158
using RubberduckTests.Mocks;
169
using System.Collections.Generic;
1710
using System.Linq;
1811
using System.Threading;
19-
using Rubberduck.Parsing.Grammar;
2012
using Rubberduck.VBEditor;
2113
using Antlr4.Runtime;
2214
using Rubberduck.Inspections;
23-
/*=======
24-
using Rubberduck.VBEditor;
25-
using Rubberduck.VBEditor.SafeComWrappers;
26-
using RubberduckTests.Mocks;
27-
>>>>>>> rubberduck-vba/next */
2815

2916
namespace RubberduckTests.Symbols
3017
{
3118
[TestClass]
3219
public class DeclarationFinderTests
3320
{
34-
//<<<<<<< HEAD
3521
private AccessibilityTestsDataObject _tdo;
3622

3723
[TestMethod]
@@ -359,7 +345,7 @@ End Sub
359345
";
360346
}
361347
#endregion
362-
//=======
348+
363349
[TestMethod]
364350
[Ignore] // ref. https://github.com/rubberduck-vba/Rubberduck/issues/2330
365351
public void FiendishlyAmbiguousNameSelectsSmallestScopedDeclaration()
@@ -415,7 +401,6 @@ End Sub
415401

416402
Assert.AreEqual(expected, actual, "Expected {0}, resolved to {1}", expected.DeclarationType, actual.DeclarationType);
417403
}
418-
//>>>>>>> rubberduck-vba/next
419404

420405
[TestCategory("Resolver")]
421406
[TestMethod]

0 commit comments

Comments
 (0)