Skip to content

Commit bc6cdf0

Browse files
authored
Syncing test.toml and updating the test code (#2642)
1 parent e0df589 commit bc6cdf0

File tree

3 files changed

+40
-24
lines changed

3 files changed

+40
-24
lines changed

exercises/practice/queen-attack/.meta/config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"BoDaly",
99
"ErikSchierboom",
1010
"IndelicateArgot",
11+
"jagdish-15",
1112
"javaeeeee",
1213
"rchavarria",
1314
"ryanplusplus",
Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,49 @@
1-
# This is an auto-generated file. Regular comments will be removed when this
2-
# file is regenerated. Regenerating will not touch any manually added keys,
3-
# so comments can be added in a "comment" key.
1+
# This is an auto-generated file.
2+
#
3+
# Regenerating this file via `configlet sync` will:
4+
# - Recreate every `description` key/value pair
5+
# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
6+
# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
7+
# - Preserve any other key/value pair
8+
#
9+
# As user-added comments (using the # character) will be removed when this file
10+
# is regenerated, comments can be added via a `comment` key.
411

512
[3ac4f735-d36c-44c4-a3e2-316f79704203]
6-
description = "queen with a valid position"
13+
description = "Test creation of Queens with valid and invalid positions -> queen with a valid position"
714

815
[4e812d5d-b974-4e38-9a6b-8e0492bfa7be]
9-
description = "queen must have positive row"
16+
description = "Test creation of Queens with valid and invalid positions -> queen must have positive row"
1017

1118
[f07b7536-b66b-4f08-beb9-4d70d891d5c8]
12-
description = "queen must have row on board"
19+
description = "Test creation of Queens with valid and invalid positions -> queen must have row on board"
1320

1421
[15a10794-36d9-4907-ae6b-e5a0d4c54ebe]
15-
description = "queen must have positive column"
22+
description = "Test creation of Queens with valid and invalid positions -> queen must have positive column"
1623

1724
[6907762d-0e8a-4c38-87fb-12f2f65f0ce4]
18-
description = "queen must have column on board"
25+
description = "Test creation of Queens with valid and invalid positions -> queen must have column on board"
1926

2027
[33ae4113-d237-42ee-bac1-e1e699c0c007]
21-
description = "can not attack"
28+
description = "Test the ability of one queen to attack another -> cannot attack"
2229

2330
[eaa65540-ea7c-4152-8c21-003c7a68c914]
24-
description = "can attack on same row"
31+
description = "Test the ability of one queen to attack another -> can attack on same row"
2532

2633
[bae6f609-2c0e-4154-af71-af82b7c31cea]
27-
description = "can attack on same column"
34+
description = "Test the ability of one queen to attack another -> can attack on same column"
2835

2936
[0e1b4139-b90d-4562-bd58-dfa04f1746c7]
30-
description = "can attack on first diagonal"
37+
description = "Test the ability of one queen to attack another -> can attack on first diagonal"
3138

3239
[ff9b7ed4-e4b6-401b-8d16-bc894d6d3dcd]
33-
description = "can attack on second diagonal"
40+
description = "Test the ability of one queen to attack another -> can attack on second diagonal"
3441

3542
[0a71e605-6e28-4cc2-aa47-d20a2e71037a]
36-
description = "can attack on third diagonal"
43+
description = "Test the ability of one queen to attack another -> can attack on third diagonal"
3744

3845
[0790b588-ae73-4f1f-a968-dd0b34f45f86]
39-
description = "can attack on fourth diagonal"
46+
description = "Test the ability of one queen to attack another -> can attack on fourth diagonal"
47+
48+
[543f8fd4-2597-4aad-8d77-cbdab63619f8]
49+
description = "Test the ability of one queen to attack another -> cannot attack if falling diagonals are only the same when reflected across the longest falling diagonal"

exercises/practice/queen-attack/queen-attack.spec.js

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,50 +40,55 @@ describe('Queens', () => {
4040
});
4141

4242
describe('Test the ability of one queen to attack another', () => {
43-
xtest('queens cannot attack', () => {
43+
xtest('cannot attack', () => {
4444
const queens = new QueenAttack({ white: [2, 4], black: [6, 6] });
4545
expect(queens.canAttack).toEqual(false);
4646
});
4747

48-
xtest('queens can attack when they are on the same row', () => {
48+
xtest('can attack on same row', () => {
4949
const queens = new QueenAttack({ white: [2, 4], black: [2, 6] });
5050
expect(queens.canAttack).toEqual(true);
5151
});
5252

53-
xtest('queens can attack when they are on the same column', () => {
53+
xtest('can attack on same column', () => {
5454
const queens = new QueenAttack({ white: [4, 5], black: [2, 5] });
5555
expect(queens.canAttack).toEqual(true);
5656
});
5757

58-
xtest('queens can attack diagonally', () => {
58+
xtest('can attack on first diagonal', () => {
5959
const queens = new QueenAttack({ white: [2, 2], black: [0, 4] });
6060
expect(queens.canAttack).toEqual(true);
6161
});
6262

63-
xtest('queens can attack another diagonally', () => {
63+
xtest('can attack on second diagonal', () => {
6464
const queens = new QueenAttack({ white: [2, 2], black: [3, 1] });
6565
expect(queens.canAttack).toEqual(true);
6666
});
6767

68-
xtest('queens can attack yet another diagonally', () => {
68+
xtest('can attack on third diagonal', () => {
6969
const queens = new QueenAttack({ white: [2, 2], black: [1, 1] });
7070
expect(queens.canAttack).toEqual(true);
7171
});
7272

73-
xtest('queens can attack diagonally, really', () => {
73+
xtest('can attack on fourth diagonal', () => {
7474
const queens = new QueenAttack({ white: [1, 7], black: [0, 6] });
7575
expect(queens.canAttack).toEqual(true);
7676
});
7777

78-
xtest('queens can attack on a north-east/south-west diagonal', () => {
78+
xtest('can attack on fifth diagonal', () => {
7979
const queens = new QueenAttack({ white: [7, 0], black: [0, 7] });
8080
expect(queens.canAttack).toEqual(true);
8181
});
8282

83-
xtest('queens can attack on another ne/sw diagonal', () => {
83+
xtest('can attack on sixth diagonal', () => {
8484
const queens = new QueenAttack({ white: [2, 6], black: [5, 3] });
8585
expect(queens.canAttack).toEqual(true);
8686
});
87+
88+
xtest('cannot attack if falling diagonals are only the same when reflected across the longest falling diagonal', () => {
89+
const queens = new QueenAttack({ white: [4, 1], black: [2, 5] });
90+
expect(queens.canAttack).toEqual(false);
91+
});
8792
});
8893

8994
describe('Test the board visualisation', () => {

0 commit comments

Comments
 (0)