trackler 2.1.0.27 → 2.1.0.28

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/common/CONTRIBUTING.md +9 -349
  3. data/common/exercises/forth/canonical-data.json +1 -7
  4. data/lib/trackler/version.rb +1 -1
  5. data/tracks/bash/config.json +5 -0
  6. data/tracks/bash/exercises/anagram/anagram_tests.sh +99 -0
  7. data/tracks/bash/exercises/anagram/example.sh +23 -0
  8. data/tracks/delphi/config.json +8 -1
  9. data/tracks/delphi/exercises/two-fer/twofer.dpr +60 -0
  10. data/tracks/delphi/exercises/two-fer/utwoferExample.pas +17 -0
  11. data/tracks/delphi/exercises/two-fer/utwoferTest.pas +71 -0
  12. data/tracks/dlang/README.md +9 -5
  13. data/tracks/dlang/bin/test-exercise +14 -5
  14. data/tracks/dlang/docs/INSTALLATION.md +24 -0
  15. data/tracks/dlang/docs/TESTS.md +6 -6
  16. data/tracks/dlang/exercises/bob/dub.sdl +2 -0
  17. data/tracks/dlang/exercises/bob/{bob_example.d → example/bob.d} +0 -5
  18. data/tracks/dlang/exercises/bob/{bob.d → source/bob.d} +0 -5
  19. data/tracks/dlang/exercises/circular-buffer/dub.sdl +2 -0
  20. data/tracks/dlang/exercises/circular-buffer/{circular_buffer_example.d → example/circular_buffer.d} +0 -5
  21. data/tracks/dlang/exercises/circular-buffer/{circular_buffer.d → source/circular_buffer.d} +0 -5
  22. data/tracks/dlang/exercises/crypto-square/dub.sdl +2 -0
  23. data/tracks/dlang/exercises/crypto-square/{crypto_square_example.d → example/crypto_square.d} +0 -5
  24. data/tracks/dlang/exercises/crypto-square/{crypto_square.d → source/crypto_square.d} +0 -5
  25. data/tracks/dlang/exercises/difference-of-squares/dub.sdl +2 -0
  26. data/tracks/dlang/exercises/difference-of-squares/{difference_of_squares_example.d → example/difference_of_squares.d} +0 -2
  27. data/tracks/dlang/exercises/difference-of-squares/{difference_of_squares.d → source/difference_of_squares.d} +0 -2
  28. data/tracks/dlang/exercises/etl/dub.sdl +2 -0
  29. data/tracks/dlang/exercises/etl/{etl_example.d → example/etl.d} +0 -5
  30. data/tracks/dlang/exercises/etl/{etl.d → source/etl.d} +0 -5
  31. data/tracks/dlang/exercises/gigasecond/dub.sdl +2 -0
  32. data/tracks/dlang/exercises/gigasecond/{gigasecond_example.d → example/gigasecond.d} +0 -2
  33. data/tracks/dlang/exercises/gigasecond/{gigasecond.d → source/gigasecond.d} +0 -2
  34. data/tracks/dlang/exercises/hamming/dub.sdl +2 -0
  35. data/tracks/dlang/exercises/hamming/{hamming_example.d → example/hamming.d} +0 -5
  36. data/tracks/dlang/exercises/hamming/{hamming.d → source/hamming.d} +0 -5
  37. data/tracks/dlang/exercises/hello-world/dub.sdl +2 -0
  38. data/tracks/dlang/exercises/hello-world/{hello_world_example.d → example/hello_world.d} +0 -2
  39. data/tracks/dlang/exercises/hello-world/{hello_world.d → source/hello_world.d} +0 -0
  40. data/tracks/dlang/exercises/leap/dub.sdl +2 -0
  41. data/tracks/dlang/exercises/leap/{leap_example.d → example/leap.d} +0 -2
  42. data/tracks/dlang/exercises/leap/{leap.d → source/leap.d} +0 -2
  43. data/tracks/dlang/exercises/nucleotide-count/dub.sdl +2 -0
  44. data/tracks/dlang/exercises/nucleotide-count/{nucleotide_count_example.d → example/nucleotide_count.d} +0 -4
  45. data/tracks/dlang/exercises/nucleotide-count/{nucleotide_count.d → source/nucleotide_count.d} +0 -4
  46. data/tracks/dlang/exercises/pangram/dub.sdl +2 -0
  47. data/tracks/dlang/exercises/pangram/{pangram_example.d → example/pangram.d} +0 -2
  48. data/tracks/dlang/exercises/pangram/{pangram.d → source/pangram.d} +0 -2
  49. data/tracks/dlang/exercises/raindrops/dub.sdl +2 -0
  50. data/tracks/dlang/exercises/raindrops/{raindrops_example.d → example/raindrops.d} +0 -2
  51. data/tracks/dlang/exercises/raindrops/{raindrops.d → source/raindrops.d} +0 -2
  52. data/tracks/dlang/exercises/react/dub.sdl +2 -0
  53. data/tracks/dlang/exercises/react/{react_example.d → example/react.d} +0 -2
  54. data/tracks/dlang/exercises/react/{react.d → source/react.d} +0 -2
  55. data/tracks/dlang/exercises/rna-transcription/dub.sdl +2 -0
  56. data/tracks/dlang/exercises/rna-transcription/{rna_transcription_example.d → example/rna_transcription.d} +0 -2
  57. data/tracks/dlang/exercises/rna-transcription/{rna_transcription.d → source/rna_transcription.d} +0 -2
  58. data/tracks/dlang/exercises/robot-name/dub.sdl +2 -0
  59. data/tracks/dlang/exercises/robot-name/{robot_name_example.d → example/robot_name.d} +0 -5
  60. data/tracks/dlang/exercises/robot-name/{robot_name.d → source/robot_name.d} +0 -4
  61. data/tracks/dlang/exercises/roman-numerals/dub.sdl +2 -0
  62. data/tracks/dlang/exercises/roman-numerals/{roman_numerals_example.d → example/roman_numerals.d} +0 -4
  63. data/tracks/dlang/exercises/roman-numerals/{roman_numerals.d → source/roman_numerals.d} +0 -4
  64. data/tracks/dlang/exercises/series/dub.sdl +2 -0
  65. data/tracks/dlang/exercises/series/{series_example.d → example/series.d} +0 -5
  66. data/tracks/dlang/exercises/series/{series.d → source/series.d} +0 -5
  67. data/tracks/dlang/exercises/triangle/dub.sdl +2 -0
  68. data/tracks/dlang/exercises/triangle/{triangle_example.d → example/triangle.d} +0 -5
  69. data/tracks/dlang/exercises/triangle/{triangle.d → source/triangle.d} +0 -5
  70. data/tracks/elisp/.github/stale.yml +0 -0
  71. data/tracks/elisp/exercises/grains/grains-test.el +12 -12
  72. data/tracks/elisp/exercises/robot-name/robot-name-test.el +8 -19
  73. data/tracks/elisp/exercises/word-count/word-count-test.el +27 -27
  74. data/tracks/fortran/Makefile +3 -2
  75. data/tracks/fortran/config.json +21 -2
  76. data/tracks/fortran/exercises/difference-of-squares/difference_of_squares.fun +42 -0
  77. data/tracks/fortran/exercises/difference-of-squares/example.f90 +35 -0
  78. data/tracks/fortran/exercises/{hello_world → hello-world}/example.f90 +0 -0
  79. data/tracks/fortran/exercises/{hello_world → hello-world}/hello_world.fun +0 -0
  80. data/tracks/fortran/exercises/raindrops/example.f90 +26 -0
  81. data/tracks/fortran/exercises/raindrops/raindrops.fun +78 -0
  82. data/tracks/fortran/exercises/rna-transcription/example.f90 +27 -0
  83. data/tracks/fortran/exercises/rna-transcription/rna_transcription.fun +38 -0
  84. data/tracks/go/exercises/acronym/.meta/gen.go +51 -0
  85. data/tracks/go/exercises/acronym/acronym_test.go +1 -15
  86. data/tracks/go/exercises/acronym/cases_test.go +37 -0
  87. data/tracks/go/exercises/acronym/example.go +1 -1
  88. data/tracks/go/exercises/secret-handshake/.meta/gen.go +49 -0
  89. data/tracks/go/exercises/secret-handshake/cases_test.go +24 -0
  90. data/tracks/go/exercises/secret-handshake/example.go +1 -1
  91. data/tracks/go/exercises/secret-handshake/secret_handshake_test.go +1 -17
  92. data/tracks/java/config.json +23 -23
  93. data/tracks/java/exercises/book-store/src/example/java/{Bookstore.java → BookStore.java} +5 -12
  94. data/tracks/java/exercises/book-store/src/test/java/BookStoreTest.java +113 -0
  95. data/tracks/java/exercises/saddle-points/src/example/java/Matrix.java +5 -4
  96. data/tracks/java/exercises/saddle-points/src/example/java/MatrixCoordinate.java +5 -5
  97. data/tracks/java/exercises/saddle-points/src/main/java/MatrixCoordinate.java +5 -5
  98. data/tracks/java/exercises/saddle-points/src/test/java/MatrixTest.java +10 -10
  99. data/tracks/purescript/config.json +7 -0
  100. data/tracks/purescript/exercises/hamming/bower.json +16 -0
  101. data/tracks/purescript/exercises/hamming/examples/src/Hamming.purs +14 -0
  102. data/tracks/purescript/exercises/hamming/test/Main.purs +46 -0
  103. data/tracks/scala/config.json +7 -0
  104. data/tracks/scala/exercises/bob/example.scala +3 -3
  105. data/tracks/scala/exercises/bob/src/main/scala/Bob.scala +2 -2
  106. data/tracks/scala/exercises/bob/src/test/scala/BobTest.scala +83 -53
  107. data/tracks/scala/exercises/book-store/build.sbt +3 -0
  108. data/tracks/scala/exercises/book-store/example.scala +49 -0
  109. data/tracks/scala/exercises/book-store/src/main/scala/.keep +0 -0
  110. data/tracks/scala/exercises/book-store/src/test/scala/BookStoreTest.scala +70 -0
  111. data/tracks/scala/exercises/difference-of-squares/example.scala +3 -3
  112. data/tracks/scala/exercises/difference-of-squares/src/main/scala/DifferenceOfSquares.scala +8 -0
  113. data/tracks/scala/exercises/difference-of-squares/src/test/scala/DifferenceOfSquaresTest.scala +49 -0
  114. data/tracks/scala/exercises/leap/example.scala +4 -3
  115. data/tracks/scala/exercises/leap/src/main/scala/Leap.scala +2 -2
  116. data/tracks/scala/exercises/leap/src/test/scala/LeapTest.scala +12 -20
  117. data/tracks/scala/exercises/raindrops/src/test/scala/RaindropsTest.scala +46 -35
  118. data/tracks/scala/testgen/src/main/scala/BobTestGenerator.scala +15 -0
  119. data/tracks/scala/testgen/src/main/scala/BookStoreTestGenerator.scala +15 -0
  120. data/tracks/scala/testgen/src/main/scala/DifferenceOfSquaresTestGenerator.scala +17 -0
  121. data/tracks/scala/testgen/src/main/scala/LeapTestGenerator.scala +15 -0
  122. data/tracks/scala/testgen/src/main/scala/RaindropsTestGenerator.scala +15 -0
  123. data/tracks/vimscript/config.json +5 -0
  124. data/tracks/vimscript/exercises/triangle/example.vim +28 -0
  125. data/tracks/vimscript/exercises/triangle/triangle.vader +92 -0
  126. data/tracks/vimscript/exercises/triangle/triangle.vim +24 -0
  127. metadata +93 -44
  128. data/tracks/java/exercises/book-store/src/test/java/BookstoreTest.java +0 -119
  129. data/tracks/scala/exercises/difference-of-squares/src/main/scala/Squares.scala +0 -8
  130. data/tracks/scala/exercises/difference-of-squares/src/test/scala/SquaresTest.scala +0 -56
@@ -0,0 +1,24 @@
1
+ "
2
+ " Determine if a triangle is equilateral, isosceles, or scalene.
3
+ "
4
+ " An equilateral triangle has all three sides the same length.
5
+ "
6
+ " An isosceles triangle has at least two sides the same length.
7
+ " (It is sometimes specified as having exactly two sides the
8
+ " same length, but for the purposes of this exercise we'll say
9
+ " at least two.)
10
+ "
11
+ " A scalene triangle has all sides of different lengths.
12
+ "
13
+
14
+ function! Equilateral(triangle) abort
15
+ " your code goes here
16
+ endfunction
17
+
18
+ function! Isosceles(triangle) abort
19
+ " your code goes here
20
+ endfunction
21
+
22
+ function! Scalene(triangle) abort
23
+ " your code goes here
24
+ endfunction
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.1.0.27
4
+ version: 2.1.0.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katrina Owen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-03 00:00:00.000000000 Z
11
+ date: 2017-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip
@@ -556,6 +556,8 @@ files:
556
556
  - tracks/bash/docs/LEARNING.md
557
557
  - tracks/bash/docs/RESOURCES.md
558
558
  - tracks/bash/docs/TESTS.md
559
+ - tracks/bash/exercises/anagram/anagram_tests.sh
560
+ - tracks/bash/exercises/anagram/example.sh
559
561
  - tracks/bash/exercises/bob/bob_test.sh
560
562
  - tracks/bash/exercises/bob/example.sh
561
563
  - tracks/bash/exercises/gigasecond/example.sh
@@ -2074,6 +2076,9 @@ files:
2074
2076
  - tracks/delphi/exercises/triangle/Triangle.dpr
2075
2077
  - tracks/delphi/exercises/triangle/uTestTriangle.pas
2076
2078
  - tracks/delphi/exercises/triangle/uTriangleExample.pas
2079
+ - tracks/delphi/exercises/two-fer/twofer.dpr
2080
+ - tracks/delphi/exercises/two-fer/utwoferExample.pas
2081
+ - tracks/delphi/exercises/two-fer/utwoferTest.pas
2077
2082
  - tracks/delphi/img/.keep
2078
2083
  - tracks/delphi/img/icon.png
2079
2084
  - tracks/dlang/.git
@@ -2091,42 +2096,60 @@ files:
2091
2096
  - tracks/dlang/docs/LEARNING.md
2092
2097
  - tracks/dlang/docs/RESOURCES.md
2093
2098
  - tracks/dlang/docs/TESTS.md
2094
- - tracks/dlang/exercises/bob/bob.d
2095
- - tracks/dlang/exercises/bob/bob_example.d
2096
- - tracks/dlang/exercises/circular-buffer/circular_buffer.d
2097
- - tracks/dlang/exercises/circular-buffer/circular_buffer_example.d
2098
- - tracks/dlang/exercises/crypto-square/crypto_square.d
2099
- - tracks/dlang/exercises/crypto-square/crypto_square_example.d
2100
- - tracks/dlang/exercises/difference-of-squares/difference_of_squares.d
2101
- - tracks/dlang/exercises/difference-of-squares/difference_of_squares_example.d
2102
- - tracks/dlang/exercises/etl/etl.d
2103
- - tracks/dlang/exercises/etl/etl_example.d
2104
- - tracks/dlang/exercises/gigasecond/gigasecond.d
2105
- - tracks/dlang/exercises/gigasecond/gigasecond_example.d
2106
- - tracks/dlang/exercises/hamming/hamming.d
2107
- - tracks/dlang/exercises/hamming/hamming_example.d
2108
- - tracks/dlang/exercises/hello-world/hello_world.d
2109
- - tracks/dlang/exercises/hello-world/hello_world_example.d
2110
- - tracks/dlang/exercises/leap/leap.d
2111
- - tracks/dlang/exercises/leap/leap_example.d
2112
- - tracks/dlang/exercises/nucleotide-count/nucleotide_count.d
2113
- - tracks/dlang/exercises/nucleotide-count/nucleotide_count_example.d
2114
- - tracks/dlang/exercises/pangram/pangram.d
2115
- - tracks/dlang/exercises/pangram/pangram_example.d
2116
- - tracks/dlang/exercises/raindrops/raindrops.d
2117
- - tracks/dlang/exercises/raindrops/raindrops_example.d
2118
- - tracks/dlang/exercises/react/react.d
2119
- - tracks/dlang/exercises/react/react_example.d
2120
- - tracks/dlang/exercises/rna-transcription/rna_transcription.d
2121
- - tracks/dlang/exercises/rna-transcription/rna_transcription_example.d
2122
- - tracks/dlang/exercises/robot-name/robot_name.d
2123
- - tracks/dlang/exercises/robot-name/robot_name_example.d
2124
- - tracks/dlang/exercises/roman-numerals/roman_numerals.d
2125
- - tracks/dlang/exercises/roman-numerals/roman_numerals_example.d
2126
- - tracks/dlang/exercises/series/series.d
2127
- - tracks/dlang/exercises/series/series_example.d
2128
- - tracks/dlang/exercises/triangle/triangle.d
2129
- - tracks/dlang/exercises/triangle/triangle_example.d
2099
+ - tracks/dlang/exercises/bob/dub.sdl
2100
+ - tracks/dlang/exercises/bob/example/bob.d
2101
+ - tracks/dlang/exercises/bob/source/bob.d
2102
+ - tracks/dlang/exercises/circular-buffer/dub.sdl
2103
+ - tracks/dlang/exercises/circular-buffer/example/circular_buffer.d
2104
+ - tracks/dlang/exercises/circular-buffer/source/circular_buffer.d
2105
+ - tracks/dlang/exercises/crypto-square/dub.sdl
2106
+ - tracks/dlang/exercises/crypto-square/example/crypto_square.d
2107
+ - tracks/dlang/exercises/crypto-square/source/crypto_square.d
2108
+ - tracks/dlang/exercises/difference-of-squares/dub.sdl
2109
+ - tracks/dlang/exercises/difference-of-squares/example/difference_of_squares.d
2110
+ - tracks/dlang/exercises/difference-of-squares/source/difference_of_squares.d
2111
+ - tracks/dlang/exercises/etl/dub.sdl
2112
+ - tracks/dlang/exercises/etl/example/etl.d
2113
+ - tracks/dlang/exercises/etl/source/etl.d
2114
+ - tracks/dlang/exercises/gigasecond/dub.sdl
2115
+ - tracks/dlang/exercises/gigasecond/example/gigasecond.d
2116
+ - tracks/dlang/exercises/gigasecond/source/gigasecond.d
2117
+ - tracks/dlang/exercises/hamming/dub.sdl
2118
+ - tracks/dlang/exercises/hamming/example/hamming.d
2119
+ - tracks/dlang/exercises/hamming/source/hamming.d
2120
+ - tracks/dlang/exercises/hello-world/dub.sdl
2121
+ - tracks/dlang/exercises/hello-world/example/hello_world.d
2122
+ - tracks/dlang/exercises/hello-world/source/hello_world.d
2123
+ - tracks/dlang/exercises/leap/dub.sdl
2124
+ - tracks/dlang/exercises/leap/example/leap.d
2125
+ - tracks/dlang/exercises/leap/source/leap.d
2126
+ - tracks/dlang/exercises/nucleotide-count/dub.sdl
2127
+ - tracks/dlang/exercises/nucleotide-count/example/nucleotide_count.d
2128
+ - tracks/dlang/exercises/nucleotide-count/source/nucleotide_count.d
2129
+ - tracks/dlang/exercises/pangram/dub.sdl
2130
+ - tracks/dlang/exercises/pangram/example/pangram.d
2131
+ - tracks/dlang/exercises/pangram/source/pangram.d
2132
+ - tracks/dlang/exercises/raindrops/dub.sdl
2133
+ - tracks/dlang/exercises/raindrops/example/raindrops.d
2134
+ - tracks/dlang/exercises/raindrops/source/raindrops.d
2135
+ - tracks/dlang/exercises/react/dub.sdl
2136
+ - tracks/dlang/exercises/react/example/react.d
2137
+ - tracks/dlang/exercises/react/source/react.d
2138
+ - tracks/dlang/exercises/rna-transcription/dub.sdl
2139
+ - tracks/dlang/exercises/rna-transcription/example/rna_transcription.d
2140
+ - tracks/dlang/exercises/rna-transcription/source/rna_transcription.d
2141
+ - tracks/dlang/exercises/robot-name/dub.sdl
2142
+ - tracks/dlang/exercises/robot-name/example/robot_name.d
2143
+ - tracks/dlang/exercises/robot-name/source/robot_name.d
2144
+ - tracks/dlang/exercises/roman-numerals/dub.sdl
2145
+ - tracks/dlang/exercises/roman-numerals/example/roman_numerals.d
2146
+ - tracks/dlang/exercises/roman-numerals/source/roman_numerals.d
2147
+ - tracks/dlang/exercises/series/dub.sdl
2148
+ - tracks/dlang/exercises/series/example/series.d
2149
+ - tracks/dlang/exercises/series/source/series.d
2150
+ - tracks/dlang/exercises/triangle/dub.sdl
2151
+ - tracks/dlang/exercises/triangle/example/triangle.d
2152
+ - tracks/dlang/exercises/triangle/source/triangle.d
2130
2153
  - tracks/dlang/img/icon.png
2131
2154
  - tracks/ecmascript/.editorconfig
2132
2155
  - tracks/ecmascript/.git
@@ -2355,6 +2378,7 @@ files:
2355
2378
  - tracks/ecmascript/package.json
2356
2379
  - tracks/ecmascript/yarn.lock
2357
2380
  - tracks/elisp/.git
2381
+ - tracks/elisp/.github/stale.yml
2358
2382
  - tracks/elisp/.gitignore
2359
2383
  - tracks/elisp/.travis.yml
2360
2384
  - tracks/elisp/LICENSE
@@ -3154,10 +3178,16 @@ files:
3154
3178
  - tracks/fortran/exercises/TRACK_HINTS.md
3155
3179
  - tracks/fortran/exercises/bob/bob.fun
3156
3180
  - tracks/fortran/exercises/bob/example.f90
3181
+ - tracks/fortran/exercises/difference-of-squares/difference_of_squares.fun
3182
+ - tracks/fortran/exercises/difference-of-squares/example.f90
3157
3183
  - tracks/fortran/exercises/hamming/example.f90
3158
3184
  - tracks/fortran/exercises/hamming/hamming.fun
3159
- - tracks/fortran/exercises/hello_world/example.f90
3160
- - tracks/fortran/exercises/hello_world/hello_world.fun
3185
+ - tracks/fortran/exercises/hello-world/example.f90
3186
+ - tracks/fortran/exercises/hello-world/hello_world.fun
3187
+ - tracks/fortran/exercises/raindrops/example.f90
3188
+ - tracks/fortran/exercises/raindrops/raindrops.fun
3189
+ - tracks/fortran/exercises/rna-transcription/example.f90
3190
+ - tracks/fortran/exercises/rna-transcription/rna_transcription.fun
3161
3191
  - tracks/fortran/img/.keep
3162
3192
  - tracks/fsharp/.git
3163
3193
  - tracks/fsharp/.gitignore
@@ -3443,8 +3473,10 @@ files:
3443
3473
  - tracks/go/exercises/accumulate/accumulate.go
3444
3474
  - tracks/go/exercises/accumulate/accumulate_test.go
3445
3475
  - tracks/go/exercises/accumulate/example.go
3476
+ - tracks/go/exercises/acronym/.meta/gen.go
3446
3477
  - tracks/go/exercises/acronym/acronym.go
3447
3478
  - tracks/go/exercises/acronym/acronym_test.go
3479
+ - tracks/go/exercises/acronym/cases_test.go
3448
3480
  - tracks/go/exercises/acronym/example.go
3449
3481
  - tracks/go/exercises/all-your-base/all_your_base_test.go
3450
3482
  - tracks/go/exercises/all-your-base/example.go
@@ -3655,6 +3687,8 @@ files:
3655
3687
  - tracks/go/exercises/scrabble-score/cases_test.go
3656
3688
  - tracks/go/exercises/scrabble-score/example.go
3657
3689
  - tracks/go/exercises/scrabble-score/scrabble_score_test.go
3690
+ - tracks/go/exercises/secret-handshake/.meta/gen.go
3691
+ - tracks/go/exercises/secret-handshake/cases_test.go
3658
3692
  - tracks/go/exercises/secret-handshake/example.go
3659
3693
  - tracks/go/exercises/secret-handshake/secret_handshake_test.go
3660
3694
  - tracks/go/exercises/series/asktoomuch_test.go
@@ -4436,10 +4470,10 @@ files:
4436
4470
  - tracks/java/exercises/bob/src/test/java/BobTest.java
4437
4471
  - tracks/java/exercises/book-store/build.gradle
4438
4472
  - tracks/java/exercises/book-store/src/example/java/.keep
4439
- - tracks/java/exercises/book-store/src/example/java/Bookstore.java
4473
+ - tracks/java/exercises/book-store/src/example/java/BookStore.java
4440
4474
  - tracks/java/exercises/book-store/src/main/java/.keep
4441
4475
  - tracks/java/exercises/book-store/src/test/java/.keep
4442
- - tracks/java/exercises/book-store/src/test/java/BookstoreTest.java
4476
+ - tracks/java/exercises/book-store/src/test/java/BookStoreTest.java
4443
4477
  - tracks/java/exercises/bracket-push/build.gradle
4444
4478
  - tracks/java/exercises/bracket-push/src/example/java/BracketChecker.java
4445
4479
  - tracks/java/exercises/bracket-push/src/main/java/BracketChecker.java
@@ -6855,6 +6889,9 @@ files:
6855
6889
  - tracks/purescript/exercises/etl/examples/src/Etl.purs
6856
6890
  - tracks/purescript/exercises/etl/src/Etl.purs
6857
6891
  - tracks/purescript/exercises/etl/test/Main.purs
6892
+ - tracks/purescript/exercises/hamming/bower.json
6893
+ - tracks/purescript/exercises/hamming/examples/src/Hamming.purs
6894
+ - tracks/purescript/exercises/hamming/test/Main.purs
6858
6895
  - tracks/purescript/exercises/hello-world/bower.json
6859
6896
  - tracks/purescript/exercises/hello-world/examples/src/HelloWorld.purs
6860
6897
  - tracks/purescript/exercises/hello-world/src/HelloWorld.purs
@@ -8119,6 +8156,10 @@ files:
8119
8156
  - tracks/scala/exercises/bob/example.scala
8120
8157
  - tracks/scala/exercises/bob/src/main/scala/Bob.scala
8121
8158
  - tracks/scala/exercises/bob/src/test/scala/BobTest.scala
8159
+ - tracks/scala/exercises/book-store/build.sbt
8160
+ - tracks/scala/exercises/book-store/example.scala
8161
+ - tracks/scala/exercises/book-store/src/main/scala/.keep
8162
+ - tracks/scala/exercises/book-store/src/test/scala/BookStoreTest.scala
8122
8163
  - tracks/scala/exercises/bowling/Example.scala
8123
8164
  - tracks/scala/exercises/bowling/build.sbt
8124
8165
  - tracks/scala/exercises/bowling/src/main/scala/Bowling.scala
@@ -8151,8 +8192,8 @@ files:
8151
8192
  - tracks/scala/exercises/custom-set/src/test/scala/CustomSetTest.scala
8152
8193
  - tracks/scala/exercises/difference-of-squares/build.sbt
8153
8194
  - tracks/scala/exercises/difference-of-squares/example.scala
8154
- - tracks/scala/exercises/difference-of-squares/src/main/scala/Squares.scala
8155
- - tracks/scala/exercises/difference-of-squares/src/test/scala/SquaresTest.scala
8195
+ - tracks/scala/exercises/difference-of-squares/src/main/scala/DifferenceOfSquares.scala
8196
+ - tracks/scala/exercises/difference-of-squares/src/test/scala/DifferenceOfSquaresTest.scala
8156
8197
  - tracks/scala/exercises/dominoes/Example.scala
8157
8198
  - tracks/scala/exercises/dominoes/build.sbt
8158
8199
  - tracks/scala/exercises/dominoes/src/main/scala/Dominoes.scala
@@ -8431,15 +8472,20 @@ files:
8431
8472
  - tracks/scala/testgen/src/main/scala/AllYourBaseTestGenerator.scala
8432
8473
  - tracks/scala/testgen/src/main/scala/BeerSongTestGenerator.scala
8433
8474
  - tracks/scala/testgen/src/main/scala/BinarySearchTestGenerator.scala
8475
+ - tracks/scala/testgen/src/main/scala/BobTestGenerator.scala
8476
+ - tracks/scala/testgen/src/main/scala/BookStoreTestGenerator.scala
8434
8477
  - tracks/scala/testgen/src/main/scala/BowlingTestGenerator.scala
8435
8478
  - tracks/scala/testgen/src/main/scala/BracketPushTestGenerator.scala
8436
8479
  - tracks/scala/testgen/src/main/scala/CustomSetTestGenerator.scala
8480
+ - tracks/scala/testgen/src/main/scala/DifferenceOfSquaresTestGenerator.scala
8437
8481
  - tracks/scala/testgen/src/main/scala/FoodChainTestGenerator.scala
8438
8482
  - tracks/scala/testgen/src/main/scala/HelloWorldTestGenerator.scala
8439
8483
  - tracks/scala/testgen/src/main/scala/IsogramTestGenerator.scala
8484
+ - tracks/scala/testgen/src/main/scala/LeapTestGenerator.scala
8440
8485
  - tracks/scala/testgen/src/main/scala/NucleotideCountTestGenerator.scala
8441
8486
  - tracks/scala/testgen/src/main/scala/PangramsTestGenerator.scala
8442
8487
  - tracks/scala/testgen/src/main/scala/RailFenceCipherTestGenerator.scala
8488
+ - tracks/scala/testgen/src/main/scala/RaindropsTestGenerator.scala
8443
8489
  - tracks/scala/testgen/src/main/scala/SumOfMultiplesTestGenerator.scala
8444
8490
  - tracks/scala/testgen/src/main/scala/TestBuilder.scala
8445
8491
  - tracks/scala/testgen/src/main/scala/VariableLengthQuantityTestGenerator.scala
@@ -9256,6 +9302,9 @@ files:
9256
9302
  - tracks/vimscript/exercises/scrabble-score/example.vim
9257
9303
  - tracks/vimscript/exercises/scrabble-score/scrabble_score.vader
9258
9304
  - tracks/vimscript/exercises/scrabble-score/scrabble_score.vim
9305
+ - tracks/vimscript/exercises/triangle/example.vim
9306
+ - tracks/vimscript/exercises/triangle/triangle.vader
9307
+ - tracks/vimscript/exercises/triangle/triangle.vim
9259
9308
  - tracks/vimscript/exercises/word-count/example.vim
9260
9309
  - tracks/vimscript/exercises/word-count/word_count.vader
9261
9310
  - tracks/vimscript/exercises/word-count/word_count.vim
@@ -1,119 +0,0 @@
1
- import static org.junit.Assert.assertEquals;
2
-
3
- import java.util.Collections;
4
- import java.util.List;
5
- import java.util.ArrayList;
6
- import java.util.Arrays;
7
-
8
- import org.junit.Ignore;
9
- import org.junit.Test;
10
-
11
- public class BookstoreTest {
12
-
13
- // This is sufficient accuracy since we're handling currency values, which should be equal to within 2 decimal places.
14
- private static final double EQUALITY_TOLERANCE = 0.001;
15
-
16
- @Test
17
- public void onlyASingleBook() {
18
- List<Integer> books = new ArrayList<>(Collections.singletonList(1));
19
- Bookstore bookstore = new Bookstore(books);
20
- assertEquals(8, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
21
- }
22
-
23
- @Ignore("Remove to run test")
24
- @Test
25
- public void twoOfSameBook() {
26
- List<Integer> books = new ArrayList<>(Arrays.asList(1, 1));
27
- Bookstore bookstore = new Bookstore(books);
28
- assertEquals(16, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
29
- }
30
-
31
- @Ignore("Remove to run test")
32
- @Test
33
- public void emptyBasket() {
34
- List<Integer> books = new ArrayList<>();
35
- Bookstore bookstore = new Bookstore(books);
36
- assertEquals(0, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
37
- }
38
-
39
- @Ignore("Remove to run test")
40
- @Test
41
- public void twoDifferentBooks() {
42
- List<Integer> books = new ArrayList<>(Arrays.asList(1, 2));
43
- Bookstore bookstore = new Bookstore(books);
44
- assertEquals(15.20, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
45
- }
46
-
47
- @Ignore("Remove to run test")
48
- @Test
49
- public void threeDifferentBooks() {
50
- List<Integer> books = new ArrayList<>(Arrays.asList(1, 2, 3));
51
- Bookstore bookstore = new Bookstore(books);
52
- assertEquals(21.6, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
53
- }
54
-
55
- @Ignore("Remove to run test")
56
- @Test
57
- public void fourDifferentBooks() {
58
- List<Integer> books = new ArrayList<>(Arrays.asList(1, 2, 3, 4));
59
- Bookstore bookstore = new Bookstore(books);
60
- assertEquals(25.6, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
61
- }
62
-
63
- @Ignore("Remove to run test")
64
- @Test
65
- public void fiveDifferentBooks() {
66
- List<Integer> books = new ArrayList<>(Arrays.asList(1, 2, 3, 4, 5));
67
- Bookstore bookstore = new Bookstore(books);
68
- assertEquals(30, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
69
- }
70
-
71
- @Ignore("Remove to run test")
72
- @Test
73
- public void twoGroupsOfFourIsCheaperThanGroupOfFivePlusGroupOfThree() {
74
- List<Integer> books = new ArrayList<>(Arrays.asList(1, 1, 2, 2, 3, 3, 4, 5));
75
- Bookstore bookstore = new Bookstore(books);
76
- assertEquals(51.20, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
77
- }
78
-
79
- @Ignore("Remove to run test")
80
- @Test
81
- public void groupOfFourPlusGroupOfTwoIsCheaperThanTwoGroupsOfThree() {
82
- List<Integer> books = new ArrayList<>(Arrays.asList(1, 1, 2, 2, 3, 4));
83
- Bookstore bookstore = new Bookstore(books);
84
- assertEquals(40.8, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
85
- }
86
-
87
- @Ignore("Remove to run test")
88
- @Test
89
- public void twoEachOfFirst4BooksAnd1CopyEachOfRest() {
90
- List<Integer> books = new ArrayList<>(Arrays.asList(1, 1, 2, 2, 3, 3, 4, 4, 5));
91
- Bookstore bookstore = new Bookstore(books);
92
- assertEquals(55.60, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
93
- }
94
-
95
- @Ignore("Remove to run test")
96
- @Test
97
- public void twoCopiesOfEachBook() {
98
- List<Integer> books = new ArrayList<>(Arrays.asList(1, 1, 2, 2, 3, 3, 4, 4, 5, 5));
99
- Bookstore bookstore = new Bookstore(books);
100
- assertEquals(60.00, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
101
- }
102
-
103
- @Ignore("Remove to run test")
104
- @Test
105
- public void threeCopiesOfFirstBookAnd2EachOfRemaining() {
106
- List<Integer> books = new ArrayList<>(Arrays.asList(1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 1));
107
- Bookstore bookstore = new Bookstore(books);
108
- assertEquals(68.00, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
109
- }
110
-
111
- @Ignore("Remove to run test")
112
- @Test
113
- public void threeEachOFirst2BooksAnd2EachOfRemainingBooks() {
114
- List<Integer> books = new ArrayList<>(Arrays.asList(1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 1, 2));
115
- Bookstore bookstore = new Bookstore(books);
116
- assertEquals(75.20, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
117
- }
118
-
119
- }
@@ -1,8 +0,0 @@
1
- object Squares {
2
-
3
- def sumOfSquares(n: Int): Int = ???
4
-
5
- def squareOfSums(n: Int): Int = ???
6
-
7
- def difference(n: Int): Int = ???
8
- }
@@ -1,56 +0,0 @@
1
- import org.scalatest.{Matchers, FlatSpec}
2
-
3
- class SquaresTest extends FlatSpec with Matchers {
4
- it should "calc square of sums to 5" in {
5
- val result = Squares.squareOfSums(5)
6
- result should equal (225)
7
- }
8
-
9
- it should "calc sum of squares to 5" in {
10
- pending
11
- val result = Squares.sumOfSquares(5)
12
- result should equal (55)
13
- }
14
-
15
- it should "calc difference of sums to 5" in {
16
- pending
17
- val result = Squares.difference(5)
18
- result should equal (170)
19
- }
20
-
21
- it should "calc square of sums to 10" in {
22
- pending
23
- val result = Squares.squareOfSums(10)
24
- result should equal (3025)
25
- }
26
-
27
- it should "calc sum of squares to 10" in {
28
- pending
29
- val result = Squares.sumOfSquares(10)
30
- result should equal (385)
31
- }
32
-
33
- it should "calc difference of sums to 10" in {
34
- pending
35
- val result = Squares.difference(10)
36
- result should equal (2640)
37
- }
38
-
39
- it should "calc square of sums to 100" in {
40
- pending
41
- val result = Squares.squareOfSums(100)
42
- result should equal (25502500)
43
- }
44
-
45
- it should "calc sum of squares to 100" in {
46
- pending
47
- val result = Squares.sumOfSquares(100)
48
- result should equal (338350)
49
- }
50
-
51
- it should "calc difference of sums to 100" in {
52
- pending
53
- val result = Squares.difference(100)
54
- result should equal (25164150)
55
- }
56
- }