exercism / exercism/problem-specifications

New tests for Rectangles

未关闭
#1,637 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
hold
主要语言
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 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。