Skip to content

Commit

Permalink
Sync tests for practice exercise matching brackets (#2629)
Browse files Browse the repository at this point in the history
  • Loading branch information
manumafe98 authored Jan 9, 2024
1 parent 49b79c4 commit 8953587
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
22 changes: 19 additions & 3 deletions exercises/practice/matching-brackets/.meta/tests.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# This is an auto-generated file. Regular comments will be removed when this
# file is regenerated. Regenerating will not touch any manually added keys,
# so comments can be added in a "comment" key.
# This is an auto-generated file.
#
# Regenerating this file via `configlet sync` will:
# - Recreate every `description` key/value pair
# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
# - Preserve any other key/value pair
#
# As user-added comments (using the # character) will be removed when this file
# is regenerated, comments can be added via a `comment` key.

[81ec11da-38dd-442a-bcf9-3de7754609a5]
description = "paired square brackets"
Expand Down Expand Up @@ -41,12 +48,21 @@ description = "unpaired and nested brackets"
[a0205e34-c2ac-49e6-a88a-899508d7d68e]
description = "paired and wrong nested brackets"

[1d5c093f-fc84-41fb-8c2a-e052f9581602]
description = "paired and wrong nested brackets but innermost are correct"

[ef47c21b-bcfd-4998-844c-7ad5daad90a8]
description = "paired and incomplete brackets"

[a4675a40-a8be-4fc2-bc47-2a282ce6edbe]
description = "too many closing brackets"

[a345a753-d889-4b7e-99ae-34ac85910d1a]
description = "early unexpected brackets"

[21f81d61-1608-465a-b850-baa44c5def83]
description = "early mismatched brackets"

[99255f93-261b-4435-a352-02bdecc9bdf2]
description = "math expression"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ public void testPairedAndWrongNestedBrackets() {
assertThat(bracketChecker.areBracketsMatchedAndNestedCorrectly()).isFalse();
}

@Ignore("Remove to run test")
@Test
public void testPairedAndWrongNestedBracketsButInnermostAreCorrect() {
BracketChecker bracketChecker = new BracketChecker("[({}])");
assertThat(bracketChecker.areBracketsMatchedAndNestedCorrectly()).isFalse();
}

@Ignore("Remove to run test")
@Test
public void testPairedAndIncompleteBrackets() {
Expand All @@ -109,6 +116,20 @@ public void testTooManyClosingBrackets() {
assertThat(bracketChecker.areBracketsMatchedAndNestedCorrectly()).isFalse();
}

@Ignore("Remove to run test")
@Test
public void testEarlyUnexpectedBrackets() {
BracketChecker bracketChecker = new BracketChecker(")()");
assertThat(bracketChecker.areBracketsMatchedAndNestedCorrectly()).isFalse();
}

@Ignore("Remove to run test")
@Test
public void testEarlyMismatchedBrackets() {
BracketChecker bracketChecker = new BracketChecker("{)()");
assertThat(bracketChecker.areBracketsMatchedAndNestedCorrectly()).isFalse();
}

@Ignore("Remove to run test")
@Test
public void testMathExpression() {
Expand Down

0 comments on commit 8953587

Please sign in to comment.