trackler 2.2.1.15 → 2.2.1.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/problem-specifications/TOPICS.txt +8 -1
  4. data/tracks/c/docs/SNIPPET.txt +11 -0
  5. data/tracks/ceylon/docs/SNIPPET.txt +3 -0
  6. data/tracks/clojure/docs/SNIPPET.txt +5 -0
  7. data/tracks/csharp/build.cake +23 -16
  8. data/tracks/csharp/build.ps1 +1 -1
  9. data/tracks/csharp/build.sh +1 -1
  10. data/tracks/csharp/exercises/pangram/PangramTest.cs +9 -18
  11. data/tracks/csharp/generators/.gitignore +2 -1
  12. data/tracks/csharp/generators/Exercise.cs +11 -12
  13. data/tracks/csharp/generators/Exercises/AllYourBase.cs +2 -2
  14. data/tracks/csharp/generators/Exercises/Allergies.cs +1 -1
  15. data/tracks/csharp/generators/Exercises/Alphametics.cs +1 -1
  16. data/tracks/csharp/generators/Exercises/Anagram.cs +1 -1
  17. data/tracks/csharp/generators/Exercises/BeerSong.cs +1 -1
  18. data/tracks/csharp/generators/Exercises/BinarySearch.cs +1 -1
  19. data/tracks/csharp/generators/Exercises/BookStore.cs +1 -1
  20. data/tracks/csharp/generators/Exercises/BracketPush.cs +1 -1
  21. data/tracks/csharp/generators/Exercises/CollatzConjecture.cs +2 -2
  22. data/tracks/csharp/generators/Exercises/CryptoSquare.cs +1 -1
  23. data/tracks/csharp/generators/Exercises/FoodChain.cs +1 -1
  24. data/tracks/csharp/generators/Exercises/Gigasecond.cs +1 -1
  25. data/tracks/csharp/generators/Exercises/Hamming.cs +1 -1
  26. data/tracks/csharp/generators/Exercises/House.cs +1 -1
  27. data/tracks/csharp/generators/Exercises/Leap.cs +1 -1
  28. data/tracks/csharp/generators/Exercises/Luhn.cs +1 -1
  29. data/tracks/csharp/generators/Exercises/NthPrime.cs +1 -1
  30. data/tracks/csharp/generators/Exercises/Pangram.cs +1 -11
  31. data/tracks/csharp/generators/Exercises/PerfectNumbers.cs +1 -1
  32. data/tracks/csharp/generators/Exercises/PhoneNumber.cs +1 -1
  33. data/tracks/csharp/generators/Exercises/RailFenceCipher.cs +1 -1
  34. data/tracks/csharp/generators/Exercises/RnaTranscription.cs +1 -1
  35. data/tracks/csharp/generators/Exercises/RomanNumerals.cs +1 -1
  36. data/tracks/csharp/generators/Exercises/RunLengthEncoding.cs +1 -1
  37. data/tracks/csharp/generators/Exercises/Say.cs +2 -7
  38. data/tracks/csharp/generators/Exercises/SecretHandshake.cs +1 -1
  39. data/tracks/csharp/generators/Exercises/Sieve.cs +1 -1
  40. data/tracks/csharp/generators/Exercises/SpaceAge.cs +1 -1
  41. data/tracks/csharp/generators/Exercises/SumOfMultiples.cs +1 -1
  42. data/tracks/csharp/generators/Exercises/Transpose.cs +1 -1
  43. data/tracks/csharp/generators/Exercises/WordCount.cs +1 -1
  44. data/tracks/csharp/generators/Exercises/Wordy.cs +1 -1
  45. data/tracks/csharp/generators/Output/FormattingExtensions.cs +4 -2
  46. data/tracks/csharp/generators/Output/ValueFormatter.cs +1 -1
  47. data/tracks/delphi/docs/SNIPPET.txt +6 -13
  48. data/tracks/ecmascript/docs/SNIPPET.txt +7 -0
  49. data/tracks/elisp/docs/SNIPPET.txt +13 -0
  50. data/tracks/elixir/config.json +2 -2
  51. data/tracks/elixir/docs/SNIPPET.txt +10 -0
  52. data/tracks/erlang/docs/SNIPPET.txt +8 -0
  53. data/tracks/fsharp/docs/SNIPPET.txt +3 -0
  54. data/tracks/go/config.json +174 -174
  55. data/tracks/go/config/maintainers.json +6 -9
  56. data/tracks/go/docs/SNIPPET.txt +6 -0
  57. data/tracks/groovy/config.json +4 -4
  58. data/tracks/groovy/docs/SNIPPET.txt +12 -0
  59. data/tracks/haskell/config.json +2 -0
  60. data/tracks/haskell/docs/SNIPPET.txt +4 -0
  61. data/tracks/java/docs/SNIPPET.txt +7 -0
  62. data/tracks/java/exercises/robot-simulator/src/example/java/GridPosition.java +21 -16
  63. data/tracks/java/exercises/robot-simulator/src/test/java/RobotTest.java +24 -24
  64. data/tracks/javascript/docs/SNIPPET.txt +10 -0
  65. data/tracks/kotlin/docs/SNIPPET.txt +3 -0
  66. data/tracks/kotlin/exercises/change/src/example/kotlin/ChangeCalculator.kt +35 -0
  67. data/tracks/kotlin/exercises/change/src/test/kotlin/ChangeCalculatorTest.kt +105 -0
  68. data/tracks/lfe/docs/SNIPPET.txt +12 -0
  69. data/tracks/lua/docs/SNIPPET.txt +7 -0
  70. data/tracks/mips/docs/SNIPPET.txt +23 -0
  71. data/tracks/ocaml/docs/SNIPPET.txt +1 -0
  72. data/tracks/purescript/config.json +1 -1
  73. data/tracks/purescript/docs/SNIPPET.txt +8 -0
  74. data/tracks/python/exercises/saddle-points/README.md +1 -1
  75. data/tracks/racket/docs/SNIPPET.txt +6 -0
  76. data/tracks/ruby/docs/SNIPPET.txt +5 -0
  77. data/tracks/rust/docs/SNIPPET.txt +3 -0
  78. data/tracks/scala/docs/SNIPPET.txt +4 -0
  79. data/tracks/scala/exercises/ocr-numbers/example.scala +17 -11
  80. data/tracks/scala/exercises/ocr-numbers/src/test/scala/OcrNumbersTest.scala +153 -0
  81. data/tracks/scala/exercises/pig-latin/example.scala +11 -6
  82. data/tracks/scala/exercises/pig-latin/src/test/scala/PigLatinTest.scala +80 -10
  83. data/tracks/scala/testgen/src/main/scala/OcrNumbersTestGenerator.scala +34 -0
  84. data/tracks/scala/testgen/src/main/scala/PigLatinTestGenerator.scala +16 -0
  85. data/tracks/scheme/docs/SNIPPET.txt +7 -0
  86. data/tracks/sml/bin/generate +277 -0
  87. data/tracks/sml/config.json +30 -0
  88. data/tracks/sml/docs/ABOUT.md +32 -0
  89. data/tracks/sml/docs/LEARNING.md +37 -0
  90. data/tracks/sml/docs/SNIPPET.txt +3 -0
  91. data/tracks/sml/exercises/bob/README.md +48 -0
  92. data/tracks/sml/exercises/bob/bob.sml +2 -0
  93. data/tracks/sml/exercises/bob/example.sml +22 -0
  94. data/tracks/sml/exercises/bob/test.sml +87 -0
  95. data/tracks/sml/exercises/bob/testlib.sml +159 -0
  96. data/tracks/sml/exercises/difference-of-squares/README.md +49 -0
  97. data/tracks/sml/exercises/difference-of-squares/difference-of-squares.sml +8 -0
  98. data/tracks/sml/exercises/difference-of-squares/example.sml +11 -0
  99. data/tracks/sml/exercises/difference-of-squares/test.sml +45 -0
  100. data/tracks/sml/exercises/difference-of-squares/testlib.sml +159 -0
  101. data/tracks/sml/exercises/hello-world/README.md +51 -0
  102. data/tracks/sml/exercises/hello-world/example.sml +1 -0
  103. data/tracks/sml/exercises/hello-world/hello-world.sml +2 -0
  104. data/tracks/sml/exercises/hello-world/test.sml +15 -0
  105. data/tracks/sml/exercises/hello-world/testlib.sml +159 -0
  106. data/tracks/sml/lib/testlib.sml +159 -0
  107. data/tracks/swift/docs/SNIPPET.txt +9 -0
  108. data/tracks/typescript/docs/SNIPPET.txt +8 -0
  109. metadata +53 -6
  110. data/tracks/csharp/generators/Generators.csproj.user +0 -6
  111. data/tracks/kotlin/exercises/change/src/example/kotlin/Change.kt +0 -70
  112. data/tracks/kotlin/exercises/change/src/test/kotlin/ChangeTest.kt +0 -55
  113. data/tracks/scala/exercises/ocr-numbers/src/test/scala/OcrTest.scala +0 -138
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 99df2b52d78a5aa4268f1eefde99a24ab1f7fe7e
4
- data.tar.gz: 0e9ee61d100bf9061d715d6d977740ace440822c
3
+ metadata.gz: e5c97fcf2d7f6d2185c61b30676dc864888a9b50
4
+ data.tar.gz: 0eeef9cbaed6ef79a64e119d2e2a6c04785bb6c1
5
5
  SHA512:
6
- metadata.gz: a827ac8f757cf694258e62f135d6c06e1ad0bfd44801cb8f3ce2f4b551aa876254c6f37a04173a43ba46eaacbd99d69bc2811fec894985e2abca8b322704ceaf
7
- data.tar.gz: 34570f37ab0d07431fc589be29c96a9422538945f7eb2daa0c63b1187018673095ff6d1d24d30d6ab8c3bd560a0dbe052c364e17ab61a8e3466075d921eda1ed
6
+ metadata.gz: 668da44c9adb98cd58873dee0948cb9f7c8a7f891169d56f3b2b6b7dded8a5905645ec7b59941254d1dfc2e221fb92fe19dbf4985977bf6b2bdf2e2d603fc3c1
7
+ data.tar.gz: 3a7468c948c4e9ea3823b3e9186ebcd7c7b9fa87c3650a828fa535ec0a0018c8a8254c9356150f59cb3da6c14718698a04772df47a8686b667a6d0c9e43d559e
@@ -1,3 +1,3 @@
1
1
  module Trackler
2
- VERSION = "2.2.1.15"
2
+ VERSION = "2.2.1.16"
3
3
  end
@@ -63,7 +63,6 @@ Parsing
63
63
  Pattern recognition
64
64
  Performance
65
65
  Randomness
66
- Reactive programming
67
66
  Refactoring
68
67
  Regular Expressions
69
68
  Searching
@@ -71,3 +70,11 @@ Security
71
70
  Sorting
72
71
  Text formatting
73
72
  Transforming
73
+
74
+ Programming Style
75
+ ---
76
+ Behavior-driven development
77
+ Functional programming
78
+ Object-oriented programming
79
+ Reactive programming
80
+ Test-driven development
@@ -0,0 +1,11 @@
1
+ #include <stdio.h>
2
+ #include <stddef.h>
3
+ #include "hello_world.h"
4
+
5
+ void hello(char *buffer, const char *name)
6
+ {
7
+ if (name == NULL)
8
+ name = "World";
9
+
10
+ sprintf(buffer, "Hello, %s!", name);
11
+ }
@@ -0,0 +1,3 @@
1
+ Boolean leapYear(Integer year) {
2
+ return year % 4 == 0 && year % 100 != 0 || year % 400 == 0;
3
+ }
@@ -0,0 +1,5 @@
1
+ (ns hello-world)
2
+
3
+ (defn hello
4
+ ([] (hello "World"))
5
+ ([name] (str "Hello, " name "!")))
@@ -1,16 +1,30 @@
1
1
  using System.IO;
2
2
  using System.Text.RegularExpressions;
3
+ using System.Threading.Tasks;
3
4
 
4
5
  var target = Argument("target", "Default");
5
6
 
6
7
  var sourceDir = "./exercises";
7
8
  var buildDir = "./build";
8
9
 
9
- var defaultSln = buildDir + "/Exercises.Default.sln";
10
10
  var allSln = buildDir + "/Exercises.All.sln";
11
11
  var refactoringSln = buildDir + "/Exercises.Refactoring.sln";
12
12
 
13
- var dotNetCoreBuildSettings = new DotNetCoreBuildSettings { NoIncremental = true };
13
+ var dotNetCoreMSBuildSettings = new DotNetCoreMSBuildSettings
14
+ {
15
+ MaxCpuCount = 0
16
+ };
17
+
18
+ var dotNetCoreBuildSettings = new DotNetCoreBuildSettings
19
+ {
20
+ NoIncremental = true,
21
+ MSBuildSettings = dotNetCoreMSBuildSettings
22
+ };
23
+
24
+ var dotNetCoreTestSettings = new DotNetCoreTestSettings
25
+ {
26
+ NoBuild = true
27
+ };
14
28
 
15
29
  Task("Clean")
16
30
  .Does(() => {
@@ -30,14 +44,8 @@ Task("RestoreNugetPackages")
30
44
  DotNetCoreRestore(allSln);
31
45
  });
32
46
 
33
- Task("BuildStubImplementations")
34
- .IsDependentOn("RestoreNugetPackages")
35
- .Does(() => {
36
- DotNetCoreBuild(defaultSln, dotNetCoreBuildSettings);
37
- });
38
-
39
47
  Task("EnableAllTests")
40
- .IsDependentOn("BuildStubImplementations")
48
+ .IsDependentOn("RestoreNugetPackages")
41
49
  .Does(() => {
42
50
  var skipRegex = new Regex(@"Skip\s*=\s*""Remove to run test""", RegexOptions.Compiled);
43
51
  var testFiles = GetFiles(buildDir + "/*/*Test.cs");
@@ -64,9 +72,7 @@ Task("TestRefactoringProjects")
64
72
  + GetFiles(buildDir + "/*/Ledger.csproj")
65
73
  + GetFiles(buildDir + "/*/Markdown.csproj");
66
74
 
67
- foreach (var refactoringProject in refactoringProjects) {
68
- DotNetCoreTest(refactoringProject.FullPath);
69
- }
75
+ Parallel.ForEach(refactoringProjects, (project) => DotNetCoreTest(project.FullPath, dotNetCoreTestSettings));
70
76
  });
71
77
 
72
78
  Task("ReplaceStubWithExample")
@@ -89,12 +95,13 @@ Task("TestUsingExampleImplementation")
89
95
  .IsDependentOn("ReplaceStubWithExample")
90
96
  .Does(() => {
91
97
  DotNetCoreBuild(allSln, dotNetCoreBuildSettings);
98
+ var parallelOptions = new ParallelOptions
99
+ {
100
+ MaxDegreeOfParallelism = System.Environment.ProcessorCount
101
+ };
92
102
 
93
103
  var allProjects = GetFiles(buildDir + "/*/*.csproj");
94
-
95
- foreach (var project in allProjects) {
96
- DotNetCoreTest(project.FullPath);
97
- }
104
+ Parallel.ForEach(allProjects, parallelOptions, (project) => DotNetCoreTest(project.FullPath, dotNetCoreTestSettings));
98
105
  });
99
106
 
100
107
  Task("Default")
@@ -1,4 +1,4 @@
1
- $CakeVersion = "0.20.0"
1
+ $CakeVersion = "0.21.1"
2
2
  $DotNetVersion = "1.0.4";
3
3
  $DotNetInstallerUri = "https://dot.net/v1/dotnet-install.ps1";
4
4
 
@@ -3,7 +3,7 @@
3
3
  # Define directories.
4
4
  SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
5
5
  TOOLS_DIR=$SCRIPT_DIR/tools
6
- CAKE_VERSION=0.20.0
6
+ CAKE_VERSION=0.21.1
7
7
  CAKE_DLL=$TOOLS_DIR/Cake.CoreCLR.$CAKE_VERSION/Cake.dll
8
8
  DOTNET_VERSION=1.0.4
9
9
 
@@ -7,63 +7,54 @@ public class PangramTest
7
7
  [Fact]
8
8
  public void Sentence_empty()
9
9
  {
10
- var input = "";
11
- Assert.False(Pangram.IsPangram(input));
10
+ Assert.False(Pangram.IsPangram(""));
12
11
  }
13
12
 
14
13
  [Fact(Skip = "Remove to run test")]
15
14
  public void Pangram_with_only_lower_case()
16
15
  {
17
- var input = "the quick brown fox jumps over the lazy dog";
18
- Assert.True(Pangram.IsPangram(input));
16
+ Assert.True(Pangram.IsPangram("the quick brown fox jumps over the lazy dog"));
19
17
  }
20
18
 
21
19
  [Fact(Skip = "Remove to run test")]
22
20
  public void Missing_character_x()
23
21
  {
24
- var input = "a quick movement of the enemy will jeopardize five gunboats";
25
- Assert.False(Pangram.IsPangram(input));
22
+ Assert.False(Pangram.IsPangram("a quick movement of the enemy will jeopardize five gunboats"));
26
23
  }
27
24
 
28
25
  [Fact(Skip = "Remove to run test")]
29
26
  public void Another_missing_character_x()
30
27
  {
31
- var input = "the quick brown fish jumps over the lazy dog";
32
- Assert.False(Pangram.IsPangram(input));
28
+ Assert.False(Pangram.IsPangram("the quick brown fish jumps over the lazy dog"));
33
29
  }
34
30
 
35
31
  [Fact(Skip = "Remove to run test")]
36
32
  public void Pangram_with_underscores()
37
33
  {
38
- var input = "the_quick_brown_fox_jumps_over_the_lazy_dog";
39
- Assert.True(Pangram.IsPangram(input));
34
+ Assert.True(Pangram.IsPangram("the_quick_brown_fox_jumps_over_the_lazy_dog"));
40
35
  }
41
36
 
42
37
  [Fact(Skip = "Remove to run test")]
43
38
  public void Pangram_with_numbers()
44
39
  {
45
- var input = "the 1 quick brown fox jumps over the 2 lazy dogs";
46
- Assert.True(Pangram.IsPangram(input));
40
+ Assert.True(Pangram.IsPangram("the 1 quick brown fox jumps over the 2 lazy dogs"));
47
41
  }
48
42
 
49
43
  [Fact(Skip = "Remove to run test")]
50
44
  public void Missing_letters_replaced_by_numbers()
51
45
  {
52
- var input = "7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog";
53
- Assert.False(Pangram.IsPangram(input));
46
+ Assert.False(Pangram.IsPangram("7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog"));
54
47
  }
55
48
 
56
49
  [Fact(Skip = "Remove to run test")]
57
50
  public void Pangram_with_mixed_case_and_punctuation()
58
51
  {
59
- var input = "\"Five quacking Zephyrs jolt my wax bed.\"";
60
- Assert.True(Pangram.IsPangram(input));
52
+ Assert.True(Pangram.IsPangram("\"Five quacking Zephyrs jolt my wax bed.\""));
61
53
  }
62
54
 
63
55
  [Fact(Skip = "Remove to run test")]
64
56
  public void Upper_and_lower_case_versions_of_the_same_character_should_not_be_counted_separately()
65
57
  {
66
- var input = "the quick brown fox jumps over with lazy FX";
67
- Assert.False(Pangram.IsPangram(input));
58
+ Assert.False(Pangram.IsPangram("the quick brown fox jumps over with lazy FX"));
68
59
  }
69
60
  }
@@ -1,2 +1,3 @@
1
1
  .problem-specifications/
2
- Properties/launchSettings.json
2
+ Properties/launchSettings.json
3
+ *.csproj.user
@@ -8,15 +8,14 @@ namespace Generators
8
8
  public abstract class Exercise
9
9
  {
10
10
  private static readonly ExerciseWriter ExerciseWriter = new ExerciseWriter();
11
-
11
+ private CanonicalData _canonicalData { get; set; }
12
+
12
13
  public string Name => GetType().ToExerciseName();
13
14
 
14
- protected CanonicalData CanonicalData { get; private set; }
15
-
16
15
  public void Regenerate(CanonicalData canonicalData)
17
16
  {
18
- CanonicalData = canonicalData;
19
- UpdateCanonicalData(CanonicalData);
17
+ _canonicalData = canonicalData;
18
+ UpdateCanonicalData(canonicalData);
20
19
 
21
20
  ExerciseWriter.WriteToFile(this);
22
21
  }
@@ -31,7 +30,7 @@ protected virtual void UpdateCanonicalData(CanonicalData canonicalData)
31
30
  {
32
31
  ClassName = Name.ToTestClassName(),
33
32
  Methods = RenderTestMethods(),
34
- CanonicalDataVersion = CanonicalData.Version,
33
+ CanonicalDataVersion = _canonicalData.Version,
35
34
  UsingNamespaces = GetUsingNamespaces()
36
35
  };
37
36
 
@@ -39,13 +38,13 @@ protected virtual HashSet<string> GetUsingNamespaces()
39
38
  {
40
39
  var usingNamespaces = new HashSet<string> { "Xunit" };
41
40
 
42
- foreach (var canonicalDataCase in CanonicalData.Cases.Where(canonicalDataCase => canonicalDataCase.ExceptionThrown != null))
41
+ foreach (var canonicalDataCase in _canonicalData.Cases.Where(canonicalDataCase => canonicalDataCase.ExceptionThrown != null))
43
42
  usingNamespaces.Add(canonicalDataCase.ExceptionThrown.Namespace);
44
43
 
45
44
  return usingNamespaces;
46
45
  }
47
46
 
48
- protected virtual string[] RenderTestMethods() => CanonicalData.Cases.Select(RenderTestMethod).ToArray();
47
+ protected virtual string[] RenderTestMethods() => _canonicalData.Cases.Select(RenderTestMethod).ToArray();
49
48
 
50
49
  protected virtual string RenderTestMethod(CanonicalDataCase canonicalDataCase, int index) => CreateTestMethod(canonicalDataCase, index).Render();
51
50
 
@@ -70,20 +69,20 @@ protected virtual TestMethodBody CreateTestMethodBody(CanonicalDataCase canonica
70
69
  {
71
70
  if (canonicalDataCase.ExceptionThrown != null)
72
71
  {
73
- return new TestMethodBodyWithExceptionCheck(canonicalDataCase, CanonicalData);
72
+ return new TestMethodBodyWithExceptionCheck(canonicalDataCase, _canonicalData);
74
73
  }
75
74
 
76
75
  if (canonicalDataCase.Expected is bool)
77
76
  {
78
- return new TestMethodBodyWithBooleanCheck(canonicalDataCase, CanonicalData);
77
+ return new TestMethodBodyWithBooleanCheck(canonicalDataCase, _canonicalData);
79
78
  }
80
79
 
81
80
  if (canonicalDataCase.Expected is null)
82
81
  {
83
- return new TestMethodBodyWithNullCheck(canonicalDataCase, CanonicalData);
82
+ return new TestMethodBodyWithNullCheck(canonicalDataCase, _canonicalData);
84
83
  }
85
84
 
86
- return new TestMethodBodyWithEqualityCheck(canonicalDataCase, CanonicalData);
85
+ return new TestMethodBodyWithEqualityCheck(canonicalDataCase, _canonicalData);
87
86
  }
88
87
 
89
88
  protected virtual string RenderTestMethodBodyArrange(TestMethodBody testMethodBody)
@@ -7,13 +7,13 @@ public class AllYourBase : Exercise
7
7
  {
8
8
  protected override void UpdateCanonicalData(CanonicalData canonicalData)
9
9
  {
10
- foreach (var canonicalDataCase in CanonicalData.Cases)
10
+ foreach (var canonicalDataCase in canonicalData.Cases)
11
11
  {
12
12
  canonicalDataCase.Input["input_digits"] = canonicalDataCase.Input["input_digits"].ConvertToEnumerable<int>();
13
13
 
14
14
  canonicalDataCase.ExceptionThrown = canonicalDataCase.Expected is null ? typeof(ArgumentException) : null;
15
15
  canonicalDataCase.UseVariablesForInput = true;
16
- canonicalDataCase.UseVariableForExpected = canonicalDataCase.ExceptionThrown == null;
16
+ canonicalDataCase.UseVariableForExpected = true;
17
17
  }
18
18
  }
19
19
  }
@@ -10,7 +10,7 @@ public class Allergies : Exercise
10
10
  {
11
11
  protected override void UpdateCanonicalData(CanonicalData canonicalData)
12
12
  {
13
- foreach (var canonicalDataCase in CanonicalData.Cases)
13
+ foreach (var canonicalDataCase in canonicalData.Cases)
14
14
  {
15
15
  if (canonicalDataCase.Property == "allergicTo")
16
16
  {
@@ -9,7 +9,7 @@ public class Alphametics : Exercise
9
9
  {
10
10
  protected override void UpdateCanonicalData(CanonicalData canonicalData)
11
11
  {
12
- foreach (var canonicalDataCase in CanonicalData.Cases)
12
+ foreach (var canonicalDataCase in canonicalData.Cases)
13
13
  {
14
14
  canonicalDataCase.UseVariableForExpected = true;
15
15
  canonicalDataCase.UseVariableForTested = true;
@@ -7,7 +7,7 @@ public class Anagram : Exercise
7
7
  {
8
8
  protected override void UpdateCanonicalData(CanonicalData canonicalData)
9
9
  {
10
- foreach (var canonicalDataCase in CanonicalData.Cases)
10
+ foreach (var canonicalDataCase in canonicalData.Cases)
11
11
  {
12
12
  canonicalDataCase.ConstructorInput = new Dictionary<string, object>
13
13
  {
@@ -6,7 +6,7 @@ public class BeerSong : Exercise
6
6
  {
7
7
  protected override void UpdateCanonicalData(CanonicalData canonicalData)
8
8
  {
9
- foreach (var canonicalDataCase in CanonicalData.Cases)
9
+ foreach (var canonicalDataCase in canonicalData.Cases)
10
10
  canonicalDataCase.UseVariableForExpected = true;
11
11
  }
12
12
  }
@@ -7,7 +7,7 @@ public class BinarySearch : Exercise
7
7
  {
8
8
  protected override void UpdateCanonicalData(CanonicalData canonicalData)
9
9
  {
10
- foreach (var canonicalDataCase in CanonicalData.Cases)
10
+ foreach (var canonicalDataCase in canonicalData.Cases)
11
11
  {
12
12
  canonicalDataCase.ConstructorInput = new Dictionary<string, object>
13
13
  {
@@ -7,7 +7,7 @@ public class BookStore : Exercise
7
7
  {
8
8
  protected override void UpdateCanonicalData(CanonicalData canonicalData)
9
9
  {
10
- foreach (var canonicalDataCase in CanonicalData.Cases)
10
+ foreach (var canonicalDataCase in canonicalData.Cases)
11
11
  {
12
12
  canonicalDataCase.Input = new Dictionary<string, object>
13
13
  {
@@ -6,7 +6,7 @@ public class BracketPush : Exercise
6
6
  {
7
7
  protected override void UpdateCanonicalData(CanonicalData canonicalData)
8
8
  {
9
- foreach (var canonicalDataCase in CanonicalData.Cases)
9
+ foreach (var canonicalDataCase in canonicalData.Cases)
10
10
  {
11
11
  canonicalDataCase.Input["input"] = ((string)canonicalDataCase.Input["input"]).Replace("\\", "\\\\");
12
12
  canonicalDataCase.UseVariablesForInput = true;
@@ -5,9 +5,9 @@ namespace Generators.Exercises
5
5
  {
6
6
  public class CollatzConjecture : Exercise
7
7
  {
8
- protected override void UpdateCanonicalData(CanonicalData canonical)
8
+ protected override void UpdateCanonicalData(CanonicalData canonicalData)
9
9
  {
10
- foreach (var canonicalDataCase in CanonicalData.Cases)
10
+ foreach (var canonicalDataCase in canonicalData.Cases)
11
11
  {
12
12
  canonicalDataCase.ExceptionThrown = (long)canonicalDataCase.Input["number"] <= 0 ? typeof(ArgumentException) : null;
13
13
  }
@@ -7,7 +7,7 @@ public class CryptoSquare : Exercise
7
7
  {
8
8
  protected override void UpdateCanonicalData(CanonicalData canonicalData)
9
9
  {
10
- foreach (var canonicalDataCase in CanonicalData.Cases)
10
+ foreach (var canonicalDataCase in canonicalData.Cases)
11
11
  {
12
12
  canonicalDataCase.UseVariablesForInput = true;
13
13
  canonicalDataCase.UseVariableForExpected = true;
@@ -6,7 +6,7 @@ public class FoodChain : Exercise
6
6
  {
7
7
  protected override void UpdateCanonicalData(CanonicalData canonicalData)
8
8
  {
9
- foreach (var canonicalDataCase in CanonicalData.Cases)
9
+ foreach (var canonicalDataCase in canonicalData.Cases)
10
10
  {
11
11
  canonicalDataCase.Expected = canonicalDataCase.Expected.ConvertMultiLineString();
12
12
  canonicalDataCase.UseVariableForExpected = true;
@@ -9,7 +9,7 @@ public class Gigasecond : Exercise
9
9
  {
10
10
  protected override void UpdateCanonicalData(CanonicalData canonicalData)
11
11
  {
12
- foreach (var canonicalDataCase in CanonicalData.Cases)
12
+ foreach (var canonicalDataCase in canonicalData.Cases)
13
13
  {
14
14
  // Update input
15
15
  var input = DateTime.Parse(canonicalDataCase.Input["input"].ToString());
@@ -7,7 +7,7 @@ public class Hamming : Exercise
7
7
  {
8
8
  protected override void UpdateCanonicalData(CanonicalData canonicalData)
9
9
  {
10
- foreach (var canonicalDataCase in CanonicalData.Cases)
10
+ foreach (var canonicalDataCase in canonicalData.Cases)
11
11
  {
12
12
  canonicalDataCase.ExceptionThrown = canonicalDataCase.Expected is long ? null : typeof(ArgumentException);
13
13
  }