exercism / exercism/problem-specifications
New tests for Rectangles
- Vorherrschende Sprache
- Ruby
- Sterne
- 358
- Forks
- 563
- Ø Merge
- 18 Std. 41 Min.
- Gemergte PRs (30 T.)
- 2
Beschreibung
Suggest new tests for Rectangles, if it fits within the intent of the exercise.
The tests are for rectangles that do not share sides with other existing rectangles.
```
test('separated rectangle, same size as other rectangle ', () => {
const expected = 4;
const actual = Rectangles.count([
' +-+',
' | |',
'+-+ +-+',
'| | | |',
'+-+ +-+',
]);
expect(actual).toEqual(expected);
});
test('separated rectangles, different sizes,no overlap ', () => {
const expected = 3;
const actual = Rectangles.count([
' +-+',
' | |',
' +-+',
'+-+ ',
'+-+ ',
' +---+ ',
' | | ',
' +---+ ',
]);
expect(actual).toEqual(expected);
});
test('separated rectangles, different sizes', () => {
const expected = 4;
const actual = Rectangles.count([
' +-+',
' | |',
' +-+',
'+-+ | |',
'| | | |',
'+-+ | |',
' +-+',
]);
expect(actual).toEqual(expected);
});
```
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.