Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions exercises/practice/flower-field/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ description = "cross"

[dd9d4ca8-9e68-4f78-a677-a2a70fd7a7b8]
description = "large garden"

[6e4ac13a-3e43-4728-a2e3-3551d4b1a996]
description = "multiple adjacent flowers"
13 changes: 12 additions & 1 deletion exercises/practice/flower-field/source/flower_field.d
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ unittest
assert(annotate(garden) == expected);
}

// garden with only flowers
// Garden full of flowers
{
immutable string[] garden = [
"***",
Expand Down Expand Up @@ -190,5 +190,16 @@ unittest
];
assert(annotate(garden) == expected);
}

// Multiple adjacent flowers
{
immutable string[] garden = [
" ** ",
];
string[] expected = [
"1**1",
];
assert(annotate(garden) == expected);
}
}
}
6 changes: 6 additions & 0 deletions exercises/practice/isbn-verifier/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ description = "invalid character in isbn is not treated as zero"
[28025280-2c39-4092-9719-f3234b89c627]
description = "X is only valid as a check digit"

[8005b57f-f194-44ee-88d2-a77ac4142591]
description = "only one check digit is allowed"

[fdb14c99-4cf8-43c5-b06d-eb1638eff343]
description = "X is not substituted by the value 10"

[f6294e61-7e79-46b3-977b-f48789a4945b]
description = "valid isbn without separating dashes"

Expand Down
6 changes: 6 additions & 0 deletions exercises/practice/isbn-verifier/source/isbn_verifier.d
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ unittest
// X is only valid as a check digit
assert(!isValid("3-598-2X507-9"));

// Only one check digit is allowed
assert(!isValid("3-598-21508-96"));

// X is not substituted by the value 10
assert(!isValid("3-598-2X507-5"));

// Valid isbn without separating dashes
assert(isValid("3598215088"));

Expand Down
6 changes: 3 additions & 3 deletions exercises/practice/line-up/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Yaʻqūb expects to use numbers from 1 up to 999.

Rules:

- Numbers ending in 1 (except for 11) → `"st"`
- Numbers ending in 2 (except for 12) → `"nd"`
- Numbers ending in 3 (except for 13) → `"rd"`
- Numbers ending in 1 (unless ending in 11) → `"st"`
- Numbers ending in 2 (unless ending in 12) → `"nd"`
- Numbers ending in 3 (unless ending in 13) → `"rd"`
- All other numbers → `"th"`

Examples:
Expand Down
6 changes: 6 additions & 0 deletions exercises/practice/triangle/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ A _scalene_ triangle has all sides of different lengths.

For a shape to be a triangle at all, all sides have to be of length > 0, and the sum of the lengths of any two sides must be greater than or equal to the length of the third side.

~~~~exercism/note
_Degenerate triangles_ are triangles where the sum of the length of two sides is **equal** to the length of the third side, e.g. `1, 1, 2`.
We opted to not include tests for degenerate triangles in this exercise.
You may handle those situations if you wish to do so, or safely ignore them.
~~~~

In equations:

Let `a`, `b`, and `c` be sides of the triangle.
Expand Down