trackler 2.2.1.90 → 2.2.1.91

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 864f7f9fd0030d0ceacb92fe02ebc4cb64963a2f
4
- data.tar.gz: 657a52e0507d4eb1c880cbd0db58e53ccf168a51
3
+ metadata.gz: 2d0759fde5e7a0eee2f75f1c2cc9a2ed90310754
4
+ data.tar.gz: a0db10c084cadfa3d40fea32d96e5b7fce007ef0
5
5
  SHA512:
6
- metadata.gz: 4a6152d2213d3450066bbcc8f92861a023d53fdccfd0080ef04118db4844fc251e6057fdc3ebb8dd2022c8b1422bb70ef1556a66d1e8b5ed56f0fe453b5a6bf2
7
- data.tar.gz: 454d3f097d1f99585b11e8ec4a75a9df31e9f9f59a3dfb699f1bed45c995486adb320240e67e4c5ccd7e6f9b024b08970b6136572c3f3579ddca347aa83b2ba8
6
+ metadata.gz: 5ac8ed9b5e0445fb609833b2a814293490fc28b589ebd568976a4dbbb286ea596b445654be0137c6a4fa1a6c7facab26e9bc84538a4a25b25ef8855ce7b8a610
7
+ data.tar.gz: 20b3e3c11950cbc5b706586b8ca9b951b418fb6d449834042dcde60f252751dbad41b081701dec5a8a38f89cba1b9d129ae03f9306b586c9b75d6203c61695bb
@@ -1,3 +1,3 @@
1
1
  module Trackler
2
- VERSION = "2.2.1.90"
2
+ VERSION = "2.2.1.91"
3
3
  end
@@ -1,8 +1,8 @@
1
1
  package phonenumber
2
2
 
3
3
  // Source: exercism/problem-specifications
4
- // Commit: 39cba0d phone-number: Remove test using malformed input. (#772)
5
- // Problem Specifications Version: 1.2.0
4
+ // Commit: 8380763 phone-number: add missing edge cases (#1090)
5
+ // Problem Specifications Version: 1.3.0
6
6
 
7
7
  // Cleanup user-entered phone numbers
8
8
  var numberTests = []struct {
@@ -74,13 +74,23 @@ var numberTests = []struct {
74
74
  expectErr: true,
75
75
  },
76
76
  {
77
- description: "invalid if area code does not start with 2-9",
77
+ description: "invalid if area code starts with 0",
78
+ input: "(023) 456-7890",
79
+ expectErr: true,
80
+ },
81
+ {
82
+ description: "invalid if area code starts with 1",
78
83
  input: "(123) 456-7890",
79
84
  expectErr: true,
80
85
  },
81
86
  {
82
- description: "invalid if exchange code does not start with 2-9",
87
+ description: "invalid if exchange code starts with 0",
83
88
  input: "(223) 056-7890",
84
89
  expectErr: true,
85
90
  },
91
+ {
92
+ description: "invalid if exchange code starts with 1",
93
+ input: "(223) 156-7890",
94
+ expectErr: true,
95
+ },
86
96
  }
@@ -25,7 +25,7 @@ class BowlingGame {
25
25
  }
26
26
 
27
27
  int strikeBonus = strikeBonus(frameIndex);
28
- if (strikeBonus > MAXIMUM_FRAME_SCORE && !isStrike(frameIndex + 1)) {
28
+ if (strikeBonus > MAXIMUM_FRAME_SCORE && !isStrike(frameIndex + 1) || spareBonus(frameIndex) > 10) {
29
29
  throw new IllegalStateException("Pin count exceeds pins on the lane");
30
30
  }
31
31
 
@@ -0,0 +1 @@
1
+ 1.1.0
@@ -187,6 +187,19 @@ public class BowlingTest {
187
187
  game.score();
188
188
  }
189
189
 
190
+ @Ignore("Remove to run test")
191
+ @Test
192
+ public void bonusRollAfterAStrikeInTheLastFrameCanNotScoreMoreThan10Points() {
193
+ int[] rolls = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 11, 0};
194
+
195
+ playGame(rolls);
196
+
197
+ expectedException.expect(IllegalStateException.class);
198
+ expectedException.expectMessage("Pin count exceeds pins on the lane");
199
+
200
+ game.score();
201
+ }
202
+
190
203
  @Ignore("Remove to run test")
191
204
  @Test
192
205
  public void twoBonusRollsAfterAStrikeInTheLastFrameCanNotScoreMoreThan10Points() {
@@ -209,7 +222,33 @@ public class BowlingTest {
209
222
 
210
223
  assertEquals(26, game.score());
211
224
  }
225
+
226
+ @Ignore("Remove to run test")
227
+ @Test
228
+ public void theSecondBonusRollsAfterAStrikeInTheLastFrameCanNotBeAStrikeIfTheFirstOneIsNotAStrike() {
229
+ int[] rolls = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 6, 10};
212
230
 
231
+ playGame(rolls);
232
+
233
+ expectedException.expect(IllegalStateException.class);
234
+ expectedException.expectMessage("Pin count exceeds pins on the lane");
235
+
236
+ game.score();
237
+ }
238
+
239
+ @Ignore("Remove to run test")
240
+ @Test
241
+ public void secondBonusRollAfterAStrikeInTheLastFrameCanNotScoreMoreThan10Points() {
242
+ int[] rolls = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 11};
243
+
244
+ playGame(rolls);
245
+
246
+ expectedException.expect(IllegalStateException.class);
247
+ expectedException.expectMessage("Pin count exceeds pins on the lane");
248
+
249
+ game.score();
250
+ }
251
+
213
252
  @Ignore("Remove to run test")
214
253
  @Test
215
254
  public void anUnstartedGameCanNotBeScored() {
@@ -238,7 +277,7 @@ public class BowlingTest {
238
277
 
239
278
  @Ignore("Remove to run test")
240
279
  @Test
241
- public void aGameWithMoreThanTenFramesCanNotBeScored() {
280
+ public void canNotRollIfGameAlreadyHasTenFrames() {
242
281
  int[] rolls = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
243
282
 
244
283
  playGame(rolls);
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trackler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1.90
4
+ version: 2.2.1.91
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katrina Owen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-13 00:00:00.000000000 Z
11
+ date: 2018-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip
@@ -7345,6 +7345,7 @@ files:
7345
7345
  - tracks/java/exercises/book-store/src/main/java/.keep
7346
7346
  - tracks/java/exercises/book-store/src/test/java/BookStoreTest.java
7347
7347
  - tracks/java/exercises/bowling/.meta/src/reference/java/BowlingGame.java
7348
+ - tracks/java/exercises/bowling/.meta/version
7348
7349
  - tracks/java/exercises/bowling/README.md
7349
7350
  - tracks/java/exercises/bowling/build.gradle
7350
7351
  - tracks/java/exercises/bowling/src/main/java/.keep