Skip to content

Commit

Permalink
reverse-string: Sync tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderploegsma committed Mar 30, 2024
1 parent b80848f commit 76c75a6
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 3 deletions.
1 change: 1 addition & 0 deletions exercises/practice/reverse-string/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"msomji",
"muzimuzhi",
"ppiliar",
"sanderploegsma",
"sjwarner",
"sjwarner-bp",
"SleeplessByte",
Expand Down
22 changes: 19 additions & 3 deletions exercises/practice/reverse-string/.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.

[c3b7d806-dced-49ee-8543-933fd1719b1c]
description = "an empty string"
Expand All @@ -19,3 +26,12 @@ description = "a palindrome"

[b9e7dec1-c6df-40bd-9fa3-cd7ded010c4c]
description = "an even-sized word"

[1bed0f8a-13b0-4bd3-9d59-3d0593326fa2]
description = "wide characters"

[93d7e1b8-f60f-4f3c-9559-4056e10d2ead]
description = "grapheme cluster with pre-combined form"

[1028b2c1-6763-4459-8540-2da47ca512d9]
description = "grapheme clusters"
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,22 @@ public void testAPalindrome() {
public void testAnEvenSizedWord() {
assertThat(new ReverseString().reverse("drawer")).isEqualTo("reward");
}

@Disabled("Remove to run test")
@Test
public void testWideCharacters() {
assertThat(new ReverseString().reverse("子猫")).isEqualTo("猫子");
}

@Disabled("Remove to run test")
@Test
public void testGraphemeClusterWithPreCombinedForm() {
assertThat(new ReverseString().reverse("Würstchenstand")).isEqualTo("dnatsnehctsrüW");
}

@Disabled("Remove to run test")
@Test
public void testGraphemeCluster() {
assertThat(new ReverseString().reverse("ผู้เขียนโปรแกรม")).isEqualTo("มรกแรปโนยขีเผู้");
}
}

0 comments on commit 76c75a6

Please sign in to comment.