|
1 | | -local Darts = require 'darts' |
| 1 | +local Darts = require('darts') |
2 | 2 |
|
3 | 3 | describe('darts', function() |
4 | | - it('Missed target', function() |
| 4 | + it('missed target', function() |
5 | 5 | assert.equal(0, Darts.score(-9, 9)) |
6 | 6 | end) |
7 | 7 |
|
8 | | - it('On the outer circle', function() |
| 8 | + it('on the outer circle', function() |
9 | 9 | assert.equal(1, Darts.score(0, 10)) |
10 | 10 | end) |
11 | 11 |
|
12 | | - it('On the middle circle', function() |
| 12 | + it('on the middle circle', function() |
13 | 13 | assert.equal(5, Darts.score(-5, 0)) |
14 | 14 | end) |
15 | 15 |
|
16 | | - it('On the inner circle', function() |
| 16 | + it('on the inner circle', function() |
17 | 17 | assert.equal(10, Darts.score(0, -1)) |
18 | 18 | end) |
19 | 19 |
|
20 | | - it('Exactly on center', function() |
| 20 | + it('exactly on center', function() |
21 | 21 | assert.equal(10, Darts.score(0, 0)) |
22 | 22 | end) |
23 | 23 |
|
24 | | - it('Near the center', function() |
| 24 | + it('near the center', function() |
25 | 25 | assert.equal(10, Darts.score(-0.1, -0.1)) |
26 | 26 | end) |
27 | 27 |
|
28 | | - it('Just within the inner circle', function() |
| 28 | + it('just within the inner circle', function() |
29 | 29 | assert.equal(10, Darts.score(0.7, 0.7)) |
30 | 30 | end) |
31 | 31 |
|
32 | | - it('Just outside the inner circle', function() |
| 32 | + it('just outside the inner circle', function() |
33 | 33 | assert.equal(5, Darts.score(0.8, -0.8)) |
34 | 34 | end) |
35 | 35 |
|
36 | | - it('Just within the middle circle', function() |
| 36 | + it('just within the middle circle', function() |
37 | 37 | assert.equal(5, Darts.score(-3.5, 3.5)) |
38 | 38 | end) |
39 | 39 |
|
40 | | - it('Just outside the middle circle', function() |
| 40 | + it('just outside the middle circle', function() |
41 | 41 | assert.equal(1, Darts.score(-3.6, -3.6)) |
42 | 42 | end) |
43 | 43 |
|
44 | | - it('Just within the outer circle', function() |
| 44 | + it('just within the outer circle', function() |
45 | 45 | assert.equal(1, Darts.score(-7.0, 7.0)) |
46 | 46 | end) |
47 | 47 |
|
48 | | - it('Just outside the outer circle', function() |
| 48 | + it('just outside the outer circle', function() |
49 | 49 | assert.equal(0, Darts.score(7.1, -7.1)) |
50 | 50 | end) |
51 | 51 |
|
52 | | - it('Asymmetric position between the inner and middle circles', function() |
| 52 | + it('asymmetric position between the inner and middle circles', function() |
53 | 53 | assert.equal(5, Darts.score(0.5, -4)) |
54 | 54 | end) |
55 | 55 | end) |
0 commit comments