Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New tests for Rectangles #1637

Open
remrobem opened this issue Feb 14, 2020 · 1 comment
Open

New tests for Rectangles #1637

remrobem opened this issue Feb 14, 2020 · 1 comment
Labels

Comments

@remrobem
Copy link

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);
 });
@sshine sshine transferred this issue from exercism/exercism Feb 14, 2020
@sshine sshine added the hold label Feb 14, 2020
@sshine
Copy link
Contributor

sshine commented Feb 14, 2020

Due to #1560, I've put the suggestion on hold.

Until then we can discuss the merit of these additional tests here.

If you have a particular language track in mind (I can't guess exactly what language the examples are written in), feel free to open an issue or a pull request in that particular language track repo instead, or declare the language here; for example, if it had been Java, mentioning @exercism/java would ping current Java maintainers. Individual tracks are free to diverge from the canonical tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants