exercism / exercism/problem-specifications
New tests for Rectangles
- 主要语言
- Ruby
- 星标
- 358
- 派生
- 563
- 平均合并
- 18 小时 41 分钟
- 30 天内合并 PR
- 2
描述
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);
});
```
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。