Skip to content

Commit

Permalink
Build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Noggog committed Nov 16, 2024
1 parent 9569101 commit 6207115
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 110 deletions.
50 changes: 0 additions & 50 deletions Loqui.Tests/Generic/TypeGeneration_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,6 @@ await Assert.ThrowsAnyAsync<Exception>(async () =>
});
}

/* TODO figoure out how to associate the right output with the right classes
[Theory]
[InlineData("fred", "george", false, "fred.Equals(george)")]
[InlineData("fred", "george", true, "!fred.Equals(george)")]
[InlineData("fred", "george", false, "fred == george")]
[InlineData("fred", "george", true, "fred != george")]
public virtual void TestGenerateEqualsSnippet(string f1, string f2, bool negate, string expected)
{
var thing = Thing;
var a1 = new Accessor(f1);
var a2 = new Accessor(f2);
var foo = thing.GenerateEqualsSnippet(a1, a2, negate);
Assert.Equal(expected, foo);
}
*/

public static TheoryData<string, string[]> CommentData => new()
{
{ null, Array.Empty<string>() },
Expand All @@ -92,20 +76,6 @@ private T ThingWithComments(string commentString)
return thing;
}

private T ThingWithInterfaceComments(string commentString, bool getter)
{
var thing = Thing;
if (commentString is null) return thing;

var comments = (thing.Comments ??= new());
if (getter)
(comments.GetterInterface ??= new(null!)).Summary.AppendLine(commentString);
else
(comments.SetterInterface ??= new(null!)).Summary.AppendLine(commentString);

return thing;
}

[Theory]
[MemberData(nameof(CommentData))]
public async Task TestClassComments(string commentString, string[] expected)
Expand All @@ -117,24 +87,4 @@ public async Task TestClassComments(string commentString, string[] expected)

Assert.Equal(expected, sb.Where(x => x.StartsWith("//")).ToArray());
}

public static TheoryData<bool> InterfaceOptionsData => new()
{
true,
false,
};

public static MatrixTheoryData<string, string[], bool> InterfaceCommentsData => new(CommentData, InterfaceOptionsData);

[Theory]
[MemberData(nameof(InterfaceCommentsData))]
public async Task TestInterfaceComments(string commentString, string[] expected, bool getter)
{
var thing = ThingWithInterfaceComments(commentString, getter);
var sb = new StructuredStringBuilder();

thing.GenerateForInterface(sb, getter, false);

Assert.Equal(expected, sb.Where(x => x.StartsWith("//")).ToArray());
}
}
60 changes: 0 additions & 60 deletions Loqui.Tests/MartrixDataAttribute.cs

This file was deleted.

0 comments on commit 6207115

Please sign in to comment.