Skip to content

Commit f346ed2

Browse files
Remove unused
1 parent bf03e28 commit f346ed2

File tree

3 files changed

+6
-17
lines changed

3 files changed

+6
-17
lines changed

generators.new/Formatting.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,6 @@ internal static string FormatCode(string code) =>
1414

1515
private static SyntaxNode Parse(string code) =>
1616
CSharpSyntaxTree.ParseText(code).GetRoot();
17+
18+
// SymbolDisplay.FormatLiteral(Convert.ToString(first, CultureInfo.InvariantCulture)!, first is string))
1719
}

generators.new/Naming.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,4 @@ private static string NumberToWord(string str)
2121
var word = Convert.ToInt32(parts[0]).ToWords();
2222
return string.Join(" ", [word, ..parts[1..]]);
2323
}
24-
25-
internal static string ToTestClassName(Exercise exercise) => $"{exercise.Name}Tests";
26-
internal static string ToTestedClassName(Exercise exercise) => exercise.Name;
2724
}

generators.new/Templates.cs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,11 @@ private static class TemplateData
4242
internal static Dictionary<string, object> ForCanonicalData(CanonicalData canonicalData)
4343
{
4444
var testCases = canonicalData.TestCases.Select(Create).ToArray();
45-
46-
return new Dictionary<string, object>
45+
46+
return new()
4747
{
48-
{"exercise", Create(canonicalData.Exercise)},
49-
{"test_cases", testCases.ToArray()},
50-
{"test_cases_by_property", GroupTestCasesByProperty(testCases)}
48+
{ "test_cases", testCases.ToArray() },
49+
{ "test_cases_by_property", GroupTestCasesByProperty(testCases) }
5150
};
5251
}
5352

@@ -60,15 +59,6 @@ private static ExpandoObject Create(JToken testCase)
6059
return testData;
6160
}
6261

63-
private static Dictionary<string, object> Create(Exercise exercise) =>
64-
new()
65-
{
66-
["slug"] = exercise.Slug,
67-
["name"] = exercise.Name,
68-
["test_class_name"] = Naming.ToTestClassName(exercise),
69-
["tested_class_name"] = Naming.ToTestedClassName(exercise)
70-
};
71-
7262
private static Dictionary<string, dynamic[]> GroupTestCasesByProperty(IEnumerable<dynamic> testCases) =>
7363
testCases
7464
.GroupBy(testCase => (string)testCase.property)

0 commit comments

Comments
 (0)