diff --git a/config.json b/config.json index 4dbd62516..feb85f6d7 100644 --- a/config.json +++ b/config.json @@ -1035,7 +1035,7 @@ ] }, { - "slug": "bracket-push", + "slug": "matching-brackets", "uuid": "677ca063-70fe-4cfc-8112-c5d78bd1ea44", "core": false, "unlocked_by": "kindergarten-garden", diff --git a/exercises/bracket-push/Example.fs b/exercises/matching-brackets/Example.fs similarity index 95% rename from exercises/bracket-push/Example.fs rename to exercises/matching-brackets/Example.fs index fccfd87f9..32dfced71 100644 --- a/exercises/bracket-push/Example.fs +++ b/exercises/matching-brackets/Example.fs @@ -1,4 +1,4 @@ -module BracketPush +module MatchingBrackets open System diff --git a/exercises/bracket-push/BracketPush.fs b/exercises/matching-brackets/MatchingBrackets.fs similarity index 71% rename from exercises/bracket-push/BracketPush.fs rename to exercises/matching-brackets/MatchingBrackets.fs index 702d6a5a0..b1a72a211 100644 --- a/exercises/bracket-push/BracketPush.fs +++ b/exercises/matching-brackets/MatchingBrackets.fs @@ -1,3 +1,3 @@ -module BracketPush +module MatchingBrackets let isPaired input = failwith "You need to implement this function." \ No newline at end of file diff --git a/exercises/bracket-push/BracketPush.fsproj b/exercises/matching-brackets/MatchingBrackets.fsproj similarity index 84% rename from exercises/bracket-push/BracketPush.fsproj rename to exercises/matching-brackets/MatchingBrackets.fsproj index c876f363b..9496b6860 100644 --- a/exercises/bracket-push/BracketPush.fsproj +++ b/exercises/matching-brackets/MatchingBrackets.fsproj @@ -7,8 +7,8 @@ - - + + diff --git a/exercises/bracket-push/BracketPushTest.fs b/exercises/matching-brackets/MatchingBracketsTest.fs similarity index 89% rename from exercises/bracket-push/BracketPushTest.fs rename to exercises/matching-brackets/MatchingBracketsTest.fs index 40a18f02c..1dc6ce3f1 100644 --- a/exercises/bracket-push/BracketPushTest.fs +++ b/exercises/matching-brackets/MatchingBracketsTest.fs @@ -1,11 +1,11 @@ -// This file was auto-generated based on version 1.4.0 of the canonical data. +// This file was auto-generated based on version 2.0.0 of the canonical data. -module BracketPushTest +module MatchingBracketsTest open FsUnit.Xunit open Xunit -open BracketPush +open MatchingBrackets [] let ``Paired square brackets`` () = @@ -63,6 +63,10 @@ let ``Paired and wrong nested brackets`` () = let ``Paired and incomplete brackets`` () = isPaired "{}[" |> should equal false +[] +let ``Too many closing brackets`` () = + isPaired "[]]" |> should equal false + [] let ``Math expression`` () = isPaired "(((185 + 223.85) * 15) - 543)/2" |> should equal true diff --git a/exercises/bracket-push/README.md b/exercises/matching-brackets/README.md similarity index 96% rename from exercises/bracket-push/README.md rename to exercises/matching-brackets/README.md index 58986e4b5..f5c5e1c17 100644 --- a/exercises/bracket-push/README.md +++ b/exercises/matching-brackets/README.md @@ -1,4 +1,4 @@ -# Bracket Push +# Matching Brackets Given a string containing brackets `[]`, braces `{}`, parentheses `()`, or any combination thereof, verify that any and all pairs are matched diff --git a/generators/Generators.fs b/generators/Generators.fs index 2e5802b60..513744dbd 100644 --- a/generators/Generators.fs +++ b/generators/Generators.fs @@ -185,9 +185,6 @@ type Bowling() = value |> Option.ofNonErrorObject |> Option.renderParenthesized - -type BracketPush() = - inherit GeneratorExercise() type Change() = inherit GeneratorExercise() @@ -792,6 +789,9 @@ type Markdown() = override this.PropertiesWithIdentifier canonicalDataCase = this.Properties canonicalDataCase +type MatchingBrackets() = + inherit GeneratorExercise() + type Matrix() = inherit GeneratorExercise()