trackler 2.0.6.17 → 2.0.6.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trackler/version.rb +1 -1
- data/tracks/c/exercises/leap/test/test_leap.c +1 -1
- data/tracks/coldfusion/{leap → exercises/leap}/example.cfc +0 -0
- data/tracks/coldfusion/{leap → exercises/leap}/leap.cfc +0 -0
- data/tracks/coldfusion/{leap → exercises/leap}/leap_tests.cfc +0 -0
- data/tracks/cpp/CMakeLists.txt +4 -3
- data/tracks/cpp/{anagram → exercises/anagram}/CMakeLists.txt +0 -0
- data/tracks/cpp/{anagram → exercises/anagram}/anagram_test.cpp +0 -0
- data/tracks/cpp/{anagram → exercises/anagram}/example.cpp +0 -0
- data/tracks/cpp/{anagram → exercises/anagram}/example.h +0 -0
- data/tracks/cpp/{beer-song → exercises/beer-song}/CMakeLists.txt +0 -0
- data/tracks/cpp/{beer-song → exercises/beer-song}/beer_song_test.cpp +0 -0
- data/tracks/cpp/{beer-song → exercises/beer-song}/example.cpp +0 -0
- data/tracks/cpp/{beer-song → exercises/beer-song}/example.h +0 -0
- data/tracks/cpp/{binary → exercises/binary}/CMakeLists.txt +0 -0
- data/tracks/cpp/{binary → exercises/binary}/binary_test.cpp +0 -0
- data/tracks/cpp/{binary → exercises/binary}/example.cpp +0 -0
- data/tracks/cpp/{binary → exercises/binary}/example.h +0 -0
- data/tracks/cpp/{bob → exercises/bob}/CMakeLists.txt +0 -0
- data/tracks/cpp/{bob → exercises/bob}/bob_test.cpp +0 -0
- data/tracks/cpp/{bob → exercises/bob}/example.cpp +0 -0
- data/tracks/cpp/{bob → exercises/bob}/example.h +0 -0
- data/tracks/cpp/{clock → exercises/clock}/CMakeLists.txt +0 -0
- data/tracks/cpp/{clock → exercises/clock}/clock_test.cpp +0 -0
- data/tracks/cpp/{clock → exercises/clock}/example.cpp +0 -0
- data/tracks/cpp/{clock → exercises/clock}/example.h +0 -0
- data/tracks/cpp/{crypto-square → exercises/crypto-square}/CMakeLists.txt +0 -0
- data/tracks/cpp/{crypto-square → exercises/crypto-square}/crypto_square_test.cpp +0 -0
- data/tracks/cpp/{crypto-square → exercises/crypto-square}/example.cpp +0 -0
- data/tracks/cpp/{crypto-square → exercises/crypto-square}/example.h +0 -0
- data/tracks/cpp/{difference-of-squares → exercises/difference-of-squares}/CMakeLists.txt +0 -0
- data/tracks/cpp/{difference-of-squares → exercises/difference-of-squares}/difference_of_squares_test.cpp +0 -0
- data/tracks/cpp/{difference-of-squares → exercises/difference-of-squares}/example.cpp +0 -0
- data/tracks/cpp/{difference-of-squares → exercises/difference-of-squares}/example.h +0 -0
- data/tracks/cpp/{etl → exercises/etl}/CMakeLists.txt +0 -0
- data/tracks/cpp/{etl → exercises/etl}/etl_test.cpp +0 -0
- data/tracks/cpp/{etl → exercises/etl}/example.cpp +0 -0
- data/tracks/cpp/{etl → exercises/etl}/example.h +0 -0
- data/tracks/cpp/{etl → exercises/etl}/require_equal_containers.h +0 -0
- data/tracks/cpp/{food-chain → exercises/food-chain}/CMakeLists.txt +0 -0
- data/tracks/cpp/{food-chain → exercises/food-chain}/example.cpp +0 -0
- data/tracks/cpp/{food-chain → exercises/food-chain}/example.h +0 -0
- data/tracks/cpp/{food-chain → exercises/food-chain}/food_chain_test.cpp +0 -0
- data/tracks/cpp/{gigasecond → exercises/gigasecond}/CMakeLists.txt +0 -0
- data/tracks/cpp/{gigasecond → exercises/gigasecond}/example.cpp +0 -0
- data/tracks/cpp/{gigasecond → exercises/gigasecond}/example.h +0 -0
- data/tracks/cpp/{gigasecond → exercises/gigasecond}/gigasecond_test.cpp +0 -0
- data/tracks/cpp/{grade-school → exercises/grade-school}/CMakeLists.txt +0 -0
- data/tracks/cpp/{grade-school → exercises/grade-school}/example.cpp +0 -0
- data/tracks/cpp/{grade-school → exercises/grade-school}/example.h +0 -0
- data/tracks/cpp/{grade-school → exercises/grade-school}/grade_school_test.cpp +0 -0
- data/tracks/cpp/{grade-school → exercises/grade-school}/require_equal_containers.h +0 -0
- data/tracks/cpp/{grains → exercises/grains}/CMakeLists.txt +0 -0
- data/tracks/cpp/{grains → exercises/grains}/example.cpp +0 -0
- data/tracks/cpp/{grains → exercises/grains}/example.h +0 -0
- data/tracks/cpp/{grains → exercises/grains}/grains_test.cpp +0 -0
- data/tracks/cpp/{hamming → exercises/hamming}/CMakeLists.txt +0 -0
- data/tracks/cpp/{hamming → exercises/hamming}/example.cpp +0 -0
- data/tracks/cpp/{hamming → exercises/hamming}/example.h +0 -0
- data/tracks/cpp/{hamming → exercises/hamming}/hamming_test.cpp +0 -0
- data/tracks/cpp/{hexadecimal → exercises/hexadecimal}/CMakeLists.txt +0 -0
- data/tracks/cpp/{hexadecimal → exercises/hexadecimal}/example.cpp +0 -0
- data/tracks/cpp/{hexadecimal → exercises/hexadecimal}/example.h +0 -0
- data/tracks/cpp/{hexadecimal → exercises/hexadecimal}/hexadecimal_test.cpp +0 -0
- data/tracks/cpp/{leap → exercises/leap}/CMakeLists.txt +0 -0
- data/tracks/cpp/{leap → exercises/leap}/example.h +0 -0
- data/tracks/cpp/{leap → exercises/leap}/leap_test.cpp +0 -0
- data/tracks/cpp/{meetup → exercises/meetup}/CMakeLists.txt +0 -0
- data/tracks/cpp/{meetup → exercises/meetup}/example.h +0 -0
- data/tracks/cpp/{meetup → exercises/meetup}/meetup_test.cpp +0 -0
- data/tracks/cpp/{nth-prime → exercises/nth-prime}/CMakeLists.txt +0 -0
- data/tracks/cpp/{nth-prime → exercises/nth-prime}/example.cpp +0 -0
- data/tracks/cpp/{nth-prime → exercises/nth-prime}/example.h +0 -0
- data/tracks/cpp/{nth-prime → exercises/nth-prime}/nth_prime_test.cpp +0 -0
- data/tracks/cpp/{nucleotide-count → exercises/nucleotide-count}/CMakeLists.txt +0 -0
- data/tracks/cpp/{nucleotide-count → exercises/nucleotide-count}/example.cpp +0 -0
- data/tracks/cpp/{nucleotide-count → exercises/nucleotide-count}/example.h +0 -0
- data/tracks/cpp/{nucleotide-count → exercises/nucleotide-count}/nucleotide_count_test.cpp +0 -0
- data/tracks/cpp/{nucleotide-count → exercises/nucleotide-count}/require_equal_containers.h +0 -0
- data/tracks/cpp/{phone-number → exercises/phone-number}/CMakeLists.txt +0 -0
- data/tracks/cpp/{phone-number → exercises/phone-number}/example.cpp +0 -0
- data/tracks/cpp/{phone-number → exercises/phone-number}/example.h +0 -0
- data/tracks/cpp/{phone-number → exercises/phone-number}/phone_number_test.cpp +0 -0
- data/tracks/cpp/{prime-factors → exercises/prime-factors}/CMakeLists.txt +0 -0
- data/tracks/cpp/{prime-factors → exercises/prime-factors}/example.cpp +0 -0
- data/tracks/cpp/{prime-factors → exercises/prime-factors}/example.h +0 -0
- data/tracks/cpp/{prime-factors → exercises/prime-factors}/prime_factors_test.cpp +0 -0
- data/tracks/cpp/{queen-attack → exercises/queen-attack}/CMakeLists.txt +0 -0
- data/tracks/cpp/{queen-attack → exercises/queen-attack}/example.cpp +0 -0
- data/tracks/cpp/{queen-attack → exercises/queen-attack}/example.h +0 -0
- data/tracks/cpp/{queen-attack → exercises/queen-attack}/queen_attack_test.cpp +0 -0
- data/tracks/cpp/{queen-attack → exercises/queen-attack}/require_equal_containers.h +0 -0
- data/tracks/cpp/{raindrops → exercises/raindrops}/CMakeLists.txt +0 -0
- data/tracks/cpp/{raindrops → exercises/raindrops}/example.cpp +0 -0
- data/tracks/cpp/{raindrops → exercises/raindrops}/example.h +0 -0
- data/tracks/cpp/{raindrops → exercises/raindrops}/raindrops_test.cpp +0 -0
- data/tracks/cpp/{rna-transcription → exercises/rna-transcription}/CMakeLists.txt +0 -0
- data/tracks/cpp/{rna-transcription → exercises/rna-transcription}/example.cpp +0 -0
- data/tracks/cpp/{rna-transcription → exercises/rna-transcription}/example.h +0 -0
- data/tracks/cpp/{rna-transcription → exercises/rna-transcription}/rna_transcription_test.cpp +0 -0
- data/tracks/cpp/{robot-name → exercises/robot-name}/CMakeLists.txt +0 -0
- data/tracks/cpp/{robot-name → exercises/robot-name}/example.cpp +0 -0
- data/tracks/cpp/{robot-name → exercises/robot-name}/example.h +0 -0
- data/tracks/cpp/{robot-name → exercises/robot-name}/robot_name_test.cpp +0 -0
- data/tracks/cpp/{roman-numerals → exercises/roman-numerals}/CMakeLists.txt +0 -0
- data/tracks/cpp/{roman-numerals → exercises/roman-numerals}/example.cpp +0 -0
- data/tracks/cpp/{roman-numerals → exercises/roman-numerals}/example.h +0 -0
- data/tracks/cpp/{roman-numerals → exercises/roman-numerals}/roman_numerals_test.cpp +0 -0
- data/tracks/cpp/{say → exercises/say}/CMakeLists.txt +0 -0
- data/tracks/cpp/{say → exercises/say}/example.cpp +0 -0
- data/tracks/cpp/{say → exercises/say}/example.h +0 -0
- data/tracks/cpp/{say → exercises/say}/say_test.cpp +0 -0
- data/tracks/cpp/{scrabble-score → exercises/scrabble-score}/CMakeLists.txt +0 -0
- data/tracks/cpp/{scrabble-score → exercises/scrabble-score}/example.cpp +0 -0
- data/tracks/cpp/{scrabble-score → exercises/scrabble-score}/example.h +0 -0
- data/tracks/cpp/{scrabble-score → exercises/scrabble-score}/scrabble_score_test.cpp +0 -0
- data/tracks/cpp/{series → exercises/series}/CMakeLists.txt +0 -0
- data/tracks/cpp/{series → exercises/series}/example.cpp +0 -0
- data/tracks/cpp/{series → exercises/series}/example.h +0 -0
- data/tracks/cpp/{series → exercises/series}/require_equal_containers.h +0 -0
- data/tracks/cpp/{series → exercises/series}/series_test.cpp +0 -0
- data/tracks/cpp/{sieve → exercises/sieve}/CMakeLists.txt +0 -0
- data/tracks/cpp/{sieve → exercises/sieve}/example.cpp +0 -0
- data/tracks/cpp/{sieve → exercises/sieve}/example.h +0 -0
- data/tracks/cpp/{sieve → exercises/sieve}/sieve_test.cpp +0 -0
- data/tracks/cpp/{space-age → exercises/space-age}/CMakeLists.txt +0 -0
- data/tracks/cpp/{space-age → exercises/space-age}/example.cpp +0 -0
- data/tracks/cpp/{space-age → exercises/space-age}/example.h +0 -0
- data/tracks/cpp/{space-age → exercises/space-age}/space_age_test.cpp +0 -0
- data/tracks/cpp/{sum-of-multiples → exercises/sum-of-multiples}/CMakeLists.txt +0 -0
- data/tracks/cpp/{sum-of-multiples → exercises/sum-of-multiples}/example.cpp +0 -0
- data/tracks/cpp/{sum-of-multiples → exercises/sum-of-multiples}/example.h +0 -0
- data/tracks/cpp/{sum-of-multiples → exercises/sum-of-multiples}/sum_of_multiples_test.cpp +0 -0
- data/tracks/cpp/{triangle → exercises/triangle}/CMakeLists.txt +0 -0
- data/tracks/cpp/{triangle → exercises/triangle}/example.cpp +0 -0
- data/tracks/cpp/{triangle → exercises/triangle}/example.h +0 -0
- data/tracks/cpp/{triangle → exercises/triangle}/triangle_test.cpp +0 -0
- data/tracks/cpp/{trinary → exercises/trinary}/CMakeLists.txt +0 -0
- data/tracks/cpp/{trinary → exercises/trinary}/example.cpp +0 -0
- data/tracks/cpp/{trinary → exercises/trinary}/example.h +0 -0
- data/tracks/cpp/{trinary → exercises/trinary}/trinary_test.cpp +0 -0
- data/tracks/cpp/{word-count → exercises/word-count}/CMakeLists.txt +0 -0
- data/tracks/cpp/{word-count → exercises/word-count}/example.cpp +0 -0
- data/tracks/cpp/{word-count → exercises/word-count}/example.h +0 -0
- data/tracks/cpp/{word-count → exercises/word-count}/require_equal_containers.h +0 -0
- data/tracks/cpp/{word-count → exercises/word-count}/word_count_test.cpp +0 -0
- data/tracks/csharp/exercises/error-handling/ErrorHandlingTest.cs +3 -3
- data/tracks/fsharp/exercises/linked-list/Example.fs +4 -4
- data/tracks/fsharp/exercises/linked-list/LinkedListTest.fs +35 -19
- data/tracks/groovy/docs/ABOUT.md +5 -10
- data/tracks/groovy/docs/INSTALLATION.md +7 -10
- data/tracks/groovy/docs/LEARNING.md +19 -8
- data/tracks/groovy/docs/RESOURCES.md +9 -23
- data/tracks/groovy/docs/TESTS.md +14 -51
- data/tracks/groovy/exercises/nth-prime/Example.groovy +3 -6
- data/tracks/groovy/exercises/nth-prime/PrimeSpec.groovy +27 -0
- data/tracks/haxe/{bob → exercises/bob}/.munit +0 -0
- data/tracks/haxe/{bob → exercises/bob}/Makefile +0 -0
- data/tracks/haxe/{bob → exercises/bob}/src/example.hx +0 -0
- data/tracks/haxe/{bob → exercises/bob}/test.hxml +0 -0
- data/tracks/haxe/{bob → exercises/bob}/test/BobTest.hx +0 -0
- data/tracks/haxe/{bob → exercises/bob}/test/TestMain.hx +0 -0
- data/tracks/haxe/{bob → exercises/bob}/test/TestSuite.hx +0 -0
- data/tracks/haxe/{hello-world → exercises/hello-world}/.munit +0 -0
- data/tracks/haxe/{hello-world → exercises/hello-world}/Makefile +0 -0
- data/tracks/haxe/{hello-world → exercises/hello-world}/src/example.hx +0 -0
- data/tracks/haxe/{hello-world → exercises/hello-world}/test.hxml +0 -0
- data/tracks/haxe/{hello-world → exercises/hello-world}/test/HelloWorldTest.hx +0 -0
- data/tracks/haxe/{hello-world → exercises/hello-world}/test/TestMain.hx +0 -0
- data/tracks/haxe/{hello-world → exercises/hello-world}/test/TestSuite.hx +0 -0
- data/tracks/java/exercises/luhn/src/example/java/LuhnValidator.java +43 -0
- data/tracks/java/exercises/luhn/src/test/java/LuhnValidatorTest.java +44 -0
- data/tracks/java/exercises/phone-number/src/example/java/PhoneNumber.java +12 -5
- data/tracks/java/exercises/phone-number/src/test/java/PhoneNumberTest.java +10 -12
- data/tracks/julia/config.json +2 -1
- data/tracks/julia/runtests.jl +8 -6
- data/tracks/kotlin/exercises/rna-transcription/src/main/kotlin/RnaTranscription.kt +0 -8
- data/tracks/kotlin/exercises/rna-transcription/src/test/kotlin/RnaTranscriptionTest.kt +9 -0
- data/tracks/scala/config.json +3 -0
- data/tracks/scala/exercises/meetup/build.sbt +2 -2
- data/tracks/scala/exercises/meetup/example.scala +22 -33
- data/tracks/scala/exercises/meetup/src/test/scala/MeetupTest.scala +358 -119
- data/tracks/swift/exercises/hello-world/Sources/{deleteme.swift → HelloWorld.swift} +0 -0
- metadata +163 -163
- data/tracks/groovy/exercises/nth-prime/NthPrimeTest.groovy +0 -29
- data/tracks/java/exercises/luhn/src/example/java/Luhn.java +0 -90
- data/tracks/java/exercises/luhn/src/test/java/LuhnTest.java +0 -95
@@ -11,13 +11,20 @@ public class PhoneNumber {
|
|
11
11
|
}
|
12
12
|
|
13
13
|
private String normalize(String number) {
|
14
|
-
if(number.length()
|
15
|
-
|
14
|
+
if(number.length() > 11 || number.length() < 10){
|
15
|
+
throw new IllegalArgumentException("Number must be 10 or 11 digits");
|
16
16
|
}
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
if(number.length() == 11){
|
19
|
+
if(number.startsWith("1")){
|
20
|
+
number = number.substring(1, number.length());
|
21
|
+
}
|
22
|
+
else{
|
23
|
+
throw new IllegalArgumentException("Can only have 11 digits if number starts with '1'");
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
return number;
|
21
28
|
}
|
22
29
|
|
23
30
|
public String getNumber() {
|
@@ -1,10 +1,14 @@
|
|
1
1
|
import org.junit.Test;
|
2
2
|
import org.junit.Ignore;
|
3
|
+
import org.junit.Rule;
|
4
|
+
import org.junit.rules.ExpectedException;
|
3
5
|
|
4
6
|
import static org.junit.Assert.*;
|
5
7
|
|
6
8
|
public class PhoneNumberTest {
|
7
9
|
|
10
|
+
@Rule
|
11
|
+
public ExpectedException expectedException = ExpectedException.none();
|
8
12
|
|
9
13
|
@Test
|
10
14
|
public void cleansNumber() {
|
@@ -41,23 +45,17 @@ public class PhoneNumberTest {
|
|
41
45
|
@Ignore
|
42
46
|
@Test
|
43
47
|
public void invalidWhenOnly11Digits() {
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
assertEquals(
|
48
|
-
expectedNumber, actualNumber
|
49
|
-
);
|
48
|
+
expectedException.expect(IllegalArgumentException.class);
|
49
|
+
expectedException.expectMessage("Can only have 11 digits if number starts with '1'");
|
50
|
+
new PhoneNumber("21234567890").getNumber();
|
50
51
|
}
|
51
52
|
|
52
53
|
@Ignore
|
53
54
|
@Test
|
54
55
|
public void invalidWhen9Digits() {
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
assertEquals(
|
59
|
-
expectedNumber, actualNumber
|
60
|
-
);
|
56
|
+
expectedException.expect(IllegalArgumentException.class);
|
57
|
+
expectedException.expectMessage("Number must be 10 or 11 digits");
|
58
|
+
new PhoneNumber("123456789").getNumber();
|
61
59
|
}
|
62
60
|
|
63
61
|
@Ignore
|
data/tracks/julia/config.json
CHANGED
data/tracks/julia/runtests.jl
CHANGED
@@ -16,14 +16,16 @@ for (root, dirs, files) in walkdir("exercises")
|
|
16
16
|
cp(joinpath(exercise_path, "example.jl"), joinpath(temp_path, "$exercise.jl"))
|
17
17
|
cp(joinpath(exercise_path, "runtests.jl"), joinpath(temp_path, "runtests.jl"))
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
try
|
20
|
+
# Run the tests
|
21
|
+
result = @testset "$exercise example" begin
|
22
|
+
include(joinpath(temp_path, "runtests.jl"))
|
23
|
+
end
|
24
|
+
finally
|
25
|
+
# Delete the temporary directory
|
26
|
+
rm(temp_path, recursive=true)
|
22
27
|
end
|
23
28
|
|
24
|
-
# Delete the temporary directory
|
25
|
-
rm(temp_path, recursive=true)
|
26
|
-
|
27
29
|
# Print test output (this is the default behaviour for older versions of Julia)
|
28
30
|
if VERSION > v"0.6.0-dev"
|
29
31
|
Base.Test.print_test_results(result)
|
@@ -1,9 +1 @@
|
|
1
|
-
/*
|
2
|
-
In Kotlin functions can be declared at top level in a file, meaning
|
3
|
-
you do not need to create a class to hold a function, like languages
|
4
|
-
such as Java, C# or Scala.
|
5
|
-
|
6
|
-
http://kotlinlang.org/docs/reference/functions.html#function-scope
|
7
|
-
*/
|
8
|
-
|
9
1
|
fun transcribeToRna(dna: String): String = ""
|
@@ -3,6 +3,15 @@ import org.junit.Test;
|
|
3
3
|
|
4
4
|
class RnaTranscriptionTest {
|
5
5
|
|
6
|
+
/*
|
7
|
+
In Kotlin functions can be declared at top level in a file, meaning
|
8
|
+
you do not need to create a class to hold a function, like languages
|
9
|
+
such as Java, C# or Scala.
|
10
|
+
|
11
|
+
http://kotlinlang.org/docs/reference/functions.html#function-scope
|
12
|
+
|
13
|
+
*/
|
14
|
+
|
6
15
|
@Test
|
7
16
|
fun emptyDnaIsEmptyRna() {
|
8
17
|
Assert.assertEquals("", transcribeToRna(""));
|
data/tracks/scala/config.json
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
scalaVersion := "2.
|
1
|
+
scalaVersion := "2.12.1"
|
2
2
|
|
3
|
-
libraryDependencies += "org.scalatest"
|
3
|
+
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.1" % "test"
|
@@ -1,44 +1,33 @@
|
|
1
|
-
import java.
|
1
|
+
import java.time.DayOfWeek
|
2
|
+
import java.time.LocalDate
|
2
3
|
|
3
4
|
case class Meetup(month: Int, year: Int) {
|
4
|
-
private val thirteenth =
|
5
|
-
private val first =
|
6
|
-
private val nextMonth = first.
|
5
|
+
private val thirteenth = LocalDate.of(year, month, 13)
|
6
|
+
private val first = LocalDate.of(year, month, 1)
|
7
|
+
private val nextMonth = first.plusMonths(1)
|
7
8
|
|
8
|
-
def teenth(day: Int):
|
9
|
-
def first(day: Int):
|
10
|
-
def second(day: Int):
|
11
|
-
def third(day: Int):
|
12
|
-
def fourth(day: Int):
|
13
|
-
def last(day: Int):
|
9
|
+
def teenth(day: Int): LocalDate = thirteenth.next(day)
|
10
|
+
def first(day: Int): LocalDate = first.next(day)
|
11
|
+
def second(day: Int): LocalDate = first(day).plusDays(7)
|
12
|
+
def third(day: Int): LocalDate = second(day).plusDays(7)
|
13
|
+
def fourth(day: Int): LocalDate = third(day).plusDays(7)
|
14
|
+
def last(day: Int): LocalDate = nextMonth.next(day).minusDays(7)
|
14
15
|
|
15
|
-
implicit class
|
16
|
-
def next(dayOfWeek: Int):
|
16
|
+
implicit class LocalDateOps(self: LocalDate) {
|
17
|
+
def next(dayOfWeek: Int): LocalDate = self.plusDays(daysUntil(dayOfWeek))
|
17
18
|
|
18
|
-
def
|
19
|
+
def daysUntil(dayOfWeek: Int): Int = (Meetup.Sun - this.dayOfWeek + dayOfWeek) % 7
|
19
20
|
|
20
|
-
def
|
21
|
-
|
22
|
-
def daysUntil(dayOfWeek: Int): Int = (Meetup.Sat - this.dayOfWeek + dayOfWeek) % 7
|
23
|
-
|
24
|
-
def dayOfWeek: Int = calendar.get(Calendar.DAY_OF_WEEK)
|
25
|
-
|
26
|
-
private def copy: Calendar = calendar.clone.asInstanceOf[Calendar]
|
27
|
-
|
28
|
-
private def copyAnd(f: Calendar => Unit) = {
|
29
|
-
val c = copy
|
30
|
-
f(c)
|
31
|
-
c
|
32
|
-
}
|
21
|
+
def dayOfWeek: Int = self.getDayOfWeek.getValue
|
33
22
|
}
|
34
23
|
}
|
35
24
|
|
36
25
|
object Meetup {
|
37
|
-
val Mon =
|
38
|
-
val Tue =
|
39
|
-
val Wed =
|
40
|
-
val Thu =
|
41
|
-
val Fri =
|
42
|
-
val Sat =
|
43
|
-
val Sun =
|
26
|
+
val Mon = DayOfWeek.MONDAY.getValue
|
27
|
+
val Tue = DayOfWeek.TUESDAY.getValue
|
28
|
+
val Wed = DayOfWeek.WEDNESDAY.getValue
|
29
|
+
val Thu = DayOfWeek.THURSDAY.getValue
|
30
|
+
val Fri = DayOfWeek.FRIDAY.getValue
|
31
|
+
val Sat = DayOfWeek.SATURDAY.getValue
|
32
|
+
val Sun = DayOfWeek.SUNDAY.getValue
|
44
33
|
}
|
@@ -1,221 +1,460 @@
|
|
1
|
+
import java.time.LocalDate
|
1
2
|
import org.scalatest._
|
2
|
-
import java.util.GregorianCalendar
|
3
3
|
|
4
4
|
class MeetupTest extends FunSuite with Matchers {
|
5
5
|
//Note: Java uses 0-indexed months for GregorianCalendar
|
6
6
|
test ("monteenth of may 2013") {
|
7
|
-
Meetup(5, 2013).teenth(Meetup.Mon) should be (
|
7
|
+
Meetup(5, 2013).teenth(Meetup.Mon) should be (LocalDate.of(2013, 5, 13))
|
8
8
|
}
|
9
9
|
|
10
|
-
test ("
|
10
|
+
test ("monteenth of august 2013") {
|
11
11
|
pending
|
12
|
-
Meetup(8, 2013).teenth(Meetup.Mon) should be (
|
12
|
+
Meetup(8, 2013).teenth(Meetup.Mon) should be (LocalDate.of(2013, 8, 19))
|
13
13
|
}
|
14
14
|
|
15
|
-
test ("
|
15
|
+
test ("monteenth of september 2013") {
|
16
16
|
pending
|
17
|
-
Meetup(
|
17
|
+
Meetup(9, 2013).teenth(Meetup.Mon) should be (LocalDate.of(2013, 9, 16))
|
18
18
|
}
|
19
19
|
|
20
|
-
test ("
|
20
|
+
test ("tuesteenth of march 2013") {
|
21
21
|
pending
|
22
|
-
Meetup(3, 2013).teenth(Meetup.Tue) should be (
|
22
|
+
Meetup(3, 2013).teenth(Meetup.Tue) should be (LocalDate.of(2013, 3, 19))
|
23
23
|
}
|
24
24
|
|
25
|
-
test ("
|
25
|
+
test ("tuesteenth of april 2013") {
|
26
26
|
pending
|
27
|
-
Meetup(4, 2013).teenth(Meetup.Tue) should be (
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
Meetup(
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
Meetup(
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
Meetup(
|
43
|
-
|
27
|
+
Meetup(4, 2013).teenth(Meetup.Tue) should be (LocalDate.of(2013, 4, 16))
|
28
|
+
}
|
29
|
+
|
30
|
+
test ("tuesteenth of august 2013") {
|
31
|
+
pending
|
32
|
+
Meetup(8, 2013).teenth(Meetup.Tue) should be (LocalDate.of(2013, 8, 13))
|
33
|
+
}
|
34
|
+
|
35
|
+
test ("wednesteenth of january 2013") {
|
36
|
+
pending
|
37
|
+
Meetup(1, 2013).teenth(Meetup.Wed) should be (LocalDate.of(2013, 1, 16))
|
38
|
+
}
|
39
|
+
|
40
|
+
test ("wednesteenth of february 2013") {
|
41
|
+
pending
|
42
|
+
Meetup(2, 2013).teenth(Meetup.Wed) should be (LocalDate.of(2013, 2, 13))
|
43
|
+
}
|
44
|
+
|
45
|
+
test ("wednesteenth of june 2013") {
|
46
|
+
pending
|
47
|
+
Meetup(6, 2013).teenth(Meetup.Wed) should be (LocalDate.of(2013, 6, 19))
|
48
|
+
}
|
49
|
+
|
50
|
+
test ("thursteenth of may 2013") {
|
51
|
+
pending
|
52
|
+
Meetup(5, 2013).teenth(Meetup.Thu) should be (LocalDate.of(2013, 5, 16))
|
53
|
+
}
|
54
|
+
|
55
|
+
test ("thursteenth of june 2013") {
|
56
|
+
pending
|
57
|
+
Meetup(6, 2013).teenth(Meetup.Thu) should be (LocalDate.of(2013, 6, 13))
|
58
|
+
}
|
59
|
+
|
60
|
+
test ("thursteenth of september 2013") {
|
61
|
+
pending
|
62
|
+
Meetup(9, 2013).teenth(Meetup.Thu) should be (LocalDate.of(2013, 9, 19))
|
63
|
+
}
|
64
|
+
|
65
|
+
test ("friteenth of april 2013") {
|
66
|
+
pending
|
67
|
+
Meetup(4, 2013).teenth(Meetup.Fri) should be (LocalDate.of(2013, 4, 19))
|
68
|
+
}
|
69
|
+
|
70
|
+
test ("friteenth of august 2013") {
|
71
|
+
pending
|
72
|
+
Meetup(8, 2013).teenth(Meetup.Fri) should be (LocalDate.of(2013, 8, 16))
|
73
|
+
}
|
74
|
+
|
75
|
+
test ("friteenth of september 2013") {
|
76
|
+
pending
|
77
|
+
Meetup(9, 2013).teenth(Meetup.Fri) should be (LocalDate.of(2013, 9, 13))
|
78
|
+
}
|
79
|
+
|
80
|
+
test ("saturteenth of february 2013") {
|
81
|
+
pending
|
82
|
+
Meetup(2, 2013).teenth(Meetup.Sat) should be (LocalDate.of(2013, 2, 16))
|
83
|
+
}
|
84
|
+
|
85
|
+
test ("saturteenth of april 2013") {
|
86
|
+
pending
|
87
|
+
Meetup(4, 2013).teenth(Meetup.Sat) should be (LocalDate.of(2013, 4, 13))
|
88
|
+
}
|
89
|
+
|
90
|
+
test ("saturteenth of october 2013") {
|
91
|
+
pending
|
92
|
+
Meetup(10, 2013).teenth(Meetup.Sat) should be (LocalDate.of(2013, 10, 19))
|
93
|
+
}
|
94
|
+
|
95
|
+
test ("sunteenth of may 2013") {
|
96
|
+
pending
|
97
|
+
Meetup(5, 2013).teenth(Meetup.Sun) should be (LocalDate.of(2013, 5, 19))
|
98
|
+
}
|
99
|
+
|
100
|
+
test ("sunteenth of june 2013") {
|
101
|
+
pending
|
102
|
+
Meetup(6, 2013).teenth(Meetup.Sun) should be (LocalDate.of(2013, 6, 16))
|
103
|
+
}
|
104
|
+
|
105
|
+
test ("sunteenth of october 2013") {
|
106
|
+
pending
|
107
|
+
Meetup(10, 2013).teenth(Meetup.Sun) should be (LocalDate.of(2013, 10, 13))
|
44
108
|
}
|
45
109
|
|
46
110
|
test ("first monday of march 2013") {
|
47
111
|
pending
|
48
|
-
Meetup(3, 2013).first(Meetup.Mon) should be (
|
112
|
+
Meetup(3, 2013).first(Meetup.Mon) should be (LocalDate.of(2013, 3, 4))
|
113
|
+
}
|
114
|
+
|
115
|
+
test ("first monday of april 2013") {
|
116
|
+
pending
|
117
|
+
Meetup(4, 2013).first(Meetup.Mon) should be (LocalDate.of(2013, 4, 1))
|
118
|
+
}
|
119
|
+
|
120
|
+
test ("first tuesday of may 2013") {
|
121
|
+
pending
|
122
|
+
Meetup(5, 2013).first(Meetup.Tue) should be (LocalDate.of(2013, 5, 7))
|
123
|
+
}
|
124
|
+
|
125
|
+
test ("first tuesday of june 2013") {
|
126
|
+
pending
|
127
|
+
Meetup(6, 2013).first(Meetup.Tue) should be (LocalDate.of(2013, 6, 4))
|
128
|
+
}
|
129
|
+
|
130
|
+
test ("first wednesday of july 2013") {
|
131
|
+
pending
|
132
|
+
Meetup(7, 2013).first(Meetup.Wed) should be (LocalDate.of(2013, 7, 3))
|
133
|
+
}
|
134
|
+
|
135
|
+
test ("first wednesday of august 2013") {
|
136
|
+
pending
|
137
|
+
Meetup(8, 2013).first(Meetup.Wed) should be (LocalDate.of(2013, 8, 7))
|
138
|
+
}
|
139
|
+
|
140
|
+
test ("first thursday of september 2013") {
|
141
|
+
pending
|
142
|
+
Meetup(9, 2013).first(Meetup.Thu) should be (LocalDate.of(2013, 9, 5))
|
143
|
+
}
|
144
|
+
|
145
|
+
test ("first thursday of october 2013") {
|
146
|
+
pending
|
147
|
+
Meetup(10, 2013).first(Meetup.Thu) should be (LocalDate.of(2013, 10, 3))
|
49
148
|
}
|
50
149
|
|
51
|
-
test ("first
|
150
|
+
test ("first friday of november 2013") {
|
52
151
|
pending
|
53
|
-
Meetup(
|
152
|
+
Meetup(11, 2013).first(Meetup.Fri) should be (LocalDate.of(2013, 11, 1))
|
54
153
|
}
|
55
154
|
|
56
|
-
test ("first
|
155
|
+
test ("first friday of december 2013") {
|
57
156
|
pending
|
58
|
-
Meetup(
|
157
|
+
Meetup(12, 2013).first(Meetup.Fri) should be (LocalDate.of(2013, 12, 6))
|
59
158
|
}
|
60
159
|
|
61
|
-
test ("first
|
160
|
+
test ("first saturday of january 2013") {
|
62
161
|
pending
|
63
|
-
Meetup(
|
162
|
+
Meetup(1, 2013).first(Meetup.Sat) should be (LocalDate.of(2013, 1, 5))
|
64
163
|
}
|
65
164
|
|
66
|
-
test ("first
|
165
|
+
test ("first saturday of february 2013") {
|
67
166
|
pending
|
68
|
-
Meetup(
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
Meetup(
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
167
|
+
Meetup(2, 2013).first(Meetup.Sat) should be (LocalDate.of(2013, 2, 2))
|
168
|
+
}
|
169
|
+
|
170
|
+
test ("first sunday of march 2013") {
|
171
|
+
pending
|
172
|
+
Meetup(3, 2013).first(Meetup.Sun) should be (LocalDate.of(2013, 3, 3))
|
173
|
+
}
|
174
|
+
|
175
|
+
test ("first sunday of april 2013") {
|
176
|
+
pending
|
177
|
+
Meetup(4, 2013).first(Meetup.Sun) should be (LocalDate.of(2013, 4, 7))
|
78
178
|
}
|
79
179
|
|
80
180
|
test ("second monday of march 2013") {
|
81
181
|
pending
|
82
|
-
Meetup(3, 2013).second(Meetup.Mon) should be (
|
182
|
+
Meetup(3, 2013).second(Meetup.Mon) should be (LocalDate.of(2013, 3, 11))
|
183
|
+
}
|
184
|
+
|
185
|
+
test ("second monday of april 2013") {
|
186
|
+
pending
|
187
|
+
Meetup(4, 2013).second(Meetup.Mon) should be (LocalDate.of(2013, 4, 8))
|
188
|
+
}
|
189
|
+
|
190
|
+
test ("second tuesday of may 2013") {
|
191
|
+
pending
|
192
|
+
Meetup(5, 2013).second(Meetup.Tue) should be (LocalDate.of(2013, 5, 14))
|
193
|
+
}
|
194
|
+
|
195
|
+
test ("second tuesday of june 2013") {
|
196
|
+
pending
|
197
|
+
Meetup(6, 2013).second(Meetup.Tue) should be (LocalDate.of(2013, 6, 11))
|
83
198
|
}
|
84
199
|
|
85
|
-
test ("second
|
200
|
+
test ("second wednesday of july 2013") {
|
86
201
|
pending
|
87
|
-
Meetup(
|
202
|
+
Meetup(7, 2013).second(Meetup.Wed) should be (LocalDate.of(2013, 7, 10))
|
88
203
|
}
|
89
204
|
|
90
|
-
test ("second
|
205
|
+
test ("second wednesday of august 2013") {
|
91
206
|
pending
|
92
|
-
Meetup(
|
207
|
+
Meetup(8, 2013).second(Meetup.Wed) should be (LocalDate.of(2013, 8, 14))
|
93
208
|
}
|
94
209
|
|
95
|
-
test ("second
|
210
|
+
test ("second thursday of september 2013") {
|
96
211
|
pending
|
97
|
-
Meetup(
|
212
|
+
Meetup(9, 2013).second(Meetup.Thu) should be (LocalDate.of(2013, 9, 12))
|
98
213
|
}
|
99
214
|
|
100
|
-
test ("second
|
215
|
+
test ("second thursday of october 2013") {
|
101
216
|
pending
|
102
|
-
Meetup(
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
Meetup(
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
217
|
+
Meetup(10, 2013).second(Meetup.Thu) should be (LocalDate.of(2013, 10, 10))
|
218
|
+
}
|
219
|
+
|
220
|
+
test ("second friday of november 2013") {
|
221
|
+
pending
|
222
|
+
Meetup(11, 2013).second(Meetup.Fri) should be (LocalDate.of(2013, 11, 8))
|
223
|
+
}
|
224
|
+
|
225
|
+
test ("second friday of december 2013") {
|
226
|
+
pending
|
227
|
+
Meetup(12, 2013).second(Meetup.Fri) should be (LocalDate.of(2013, 12, 13))
|
228
|
+
}
|
229
|
+
|
230
|
+
test ("second saturday of january 2013") {
|
231
|
+
pending
|
232
|
+
Meetup(1, 2013).second(Meetup.Sat) should be (LocalDate.of(2013, 1, 12))
|
233
|
+
}
|
234
|
+
|
235
|
+
test ("second saturday of february 2013") {
|
236
|
+
pending
|
237
|
+
Meetup(2, 2013).second(Meetup.Sat) should be (LocalDate.of(2013, 2, 9))
|
238
|
+
}
|
239
|
+
|
240
|
+
test ("second sunday of march 2013") {
|
241
|
+
pending
|
242
|
+
Meetup(3, 2013).second(Meetup.Sun) should be (LocalDate.of(2013, 3, 10))
|
243
|
+
}
|
244
|
+
|
245
|
+
test ("second sunday of april 2013") {
|
246
|
+
pending
|
247
|
+
Meetup(4, 2013).second(Meetup.Sun) should be (LocalDate.of(2013, 4, 14))
|
112
248
|
}
|
113
249
|
|
114
250
|
test ("third monday of march 2013") {
|
115
251
|
pending
|
116
|
-
Meetup(3, 2013).third(Meetup.Mon) should be (
|
252
|
+
Meetup(3, 2013).third(Meetup.Mon) should be (LocalDate.of(2013, 3, 18))
|
253
|
+
}
|
254
|
+
|
255
|
+
test ("third monday of april 2013") {
|
256
|
+
pending
|
257
|
+
Meetup(4, 2013).third(Meetup.Mon) should be (LocalDate.of(2013, 4, 15))
|
258
|
+
}
|
259
|
+
|
260
|
+
test ("third tuesday of may 2013") {
|
261
|
+
pending
|
262
|
+
Meetup(5, 2013).third(Meetup.Tue) should be (LocalDate.of(2013, 5, 21))
|
263
|
+
}
|
264
|
+
|
265
|
+
test ("third tuesday of june 2013") {
|
266
|
+
pending
|
267
|
+
Meetup(6, 2013).third(Meetup.Tue) should be (LocalDate.of(2013, 6, 18))
|
268
|
+
}
|
269
|
+
|
270
|
+
test ("third wednesday of july 2013") {
|
271
|
+
pending
|
272
|
+
Meetup(7, 2013).third(Meetup.Wed) should be (LocalDate.of(2013, 7, 17))
|
117
273
|
}
|
118
274
|
|
119
|
-
test ("third
|
275
|
+
test ("third wednesday of august 2013") {
|
120
276
|
pending
|
121
|
-
Meetup(
|
277
|
+
Meetup(8, 2013).third(Meetup.Wed) should be (LocalDate.of(2013, 8, 21))
|
122
278
|
}
|
123
279
|
|
124
|
-
test ("third
|
280
|
+
test ("third thursday of september 2013") {
|
125
281
|
pending
|
126
|
-
Meetup(
|
282
|
+
Meetup(9, 2013).third(Meetup.Thu) should be (LocalDate.of(2013, 9, 19))
|
127
283
|
}
|
128
284
|
|
129
|
-
test ("third
|
285
|
+
test ("third thursday of october 2013") {
|
130
286
|
pending
|
131
|
-
Meetup(
|
287
|
+
Meetup(10, 2013).third(Meetup.Thu) should be (LocalDate.of(2013, 10, 17))
|
132
288
|
}
|
133
289
|
|
134
|
-
test ("third
|
290
|
+
test ("third friday of november 2013") {
|
135
291
|
pending
|
136
|
-
Meetup(
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
Meetup(12, 2013).third(Meetup.Fri) should be (
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
292
|
+
Meetup(11, 2013).third(Meetup.Fri) should be (LocalDate.of(2013, 11, 15))
|
293
|
+
}
|
294
|
+
|
295
|
+
test ("third friday of december 2013") {
|
296
|
+
pending
|
297
|
+
Meetup(12, 2013).third(Meetup.Fri) should be (LocalDate.of(2013, 12, 20))
|
298
|
+
}
|
299
|
+
|
300
|
+
test ("third saturday of january 2013") {
|
301
|
+
pending
|
302
|
+
Meetup(1, 2013).third(Meetup.Sat) should be (LocalDate.of(2013, 1, 19))
|
303
|
+
}
|
304
|
+
|
305
|
+
test ("third saturday of february 2013") {
|
306
|
+
pending
|
307
|
+
Meetup(2, 2013).third(Meetup.Sat) should be (LocalDate.of(2013, 2, 16))
|
308
|
+
}
|
309
|
+
|
310
|
+
test ("third sunday of march 2013") {
|
311
|
+
pending
|
312
|
+
Meetup(3, 2013).third(Meetup.Sun) should be (LocalDate.of(2013, 3, 17))
|
313
|
+
}
|
314
|
+
|
315
|
+
test ("third sunday of april 2013") {
|
316
|
+
pending
|
317
|
+
Meetup(4, 2013).third(Meetup.Sun) should be (LocalDate.of(2013, 4, 21))
|
146
318
|
}
|
147
319
|
|
148
320
|
test ("fourth monday of march 2013") {
|
149
321
|
pending
|
150
|
-
Meetup(3, 2013).fourth(Meetup.Mon) should be (
|
322
|
+
Meetup(3, 2013).fourth(Meetup.Mon) should be (LocalDate.of(2013, 3, 25))
|
323
|
+
}
|
324
|
+
|
325
|
+
test ("fourth monday of april 2013") {
|
326
|
+
pending
|
327
|
+
Meetup(4, 2013).fourth(Meetup.Mon) should be (LocalDate.of(2013, 4, 22))
|
328
|
+
}
|
329
|
+
|
330
|
+
test ("fourth tuesday of may 2013") {
|
331
|
+
pending
|
332
|
+
Meetup(5, 2013).fourth(Meetup.Tue) should be (LocalDate.of(2013, 5, 28))
|
333
|
+
}
|
334
|
+
|
335
|
+
test ("fourth tuesday of june 2013") {
|
336
|
+
pending
|
337
|
+
Meetup(6, 2013).fourth(Meetup.Tue) should be (LocalDate.of(2013, 6, 25))
|
338
|
+
}
|
339
|
+
|
340
|
+
test ("fourth wednesday of july 2013") {
|
341
|
+
pending
|
342
|
+
Meetup(7, 2013).fourth(Meetup.Wed) should be (LocalDate.of(2013, 7, 24))
|
343
|
+
}
|
344
|
+
|
345
|
+
test ("fourth wednesday of august 2013") {
|
346
|
+
pending
|
347
|
+
Meetup(8, 2013).fourth(Meetup.Wed) should be (LocalDate.of(2013, 8, 28))
|
348
|
+
}
|
349
|
+
|
350
|
+
test ("fourth thursday of september 2013") {
|
351
|
+
pending
|
352
|
+
Meetup(9, 2013).fourth(Meetup.Thu) should be (LocalDate.of(2013, 9, 26))
|
151
353
|
}
|
152
354
|
|
153
|
-
test ("fourth
|
355
|
+
test ("fourth thursday of october 2013") {
|
154
356
|
pending
|
155
|
-
Meetup(
|
357
|
+
Meetup(10, 2013).fourth(Meetup.Thu) should be (LocalDate.of(2013, 10, 24))
|
156
358
|
}
|
157
359
|
|
158
|
-
test ("fourth
|
360
|
+
test ("fourth friday of november 2013") {
|
159
361
|
pending
|
160
|
-
Meetup(
|
362
|
+
Meetup(11, 2013).fourth(Meetup.Fri) should be (LocalDate.of(2013, 11, 22))
|
161
363
|
}
|
162
364
|
|
163
|
-
test ("fourth
|
365
|
+
test ("fourth friday of december 2013") {
|
164
366
|
pending
|
165
|
-
Meetup(
|
367
|
+
Meetup(12, 2013).fourth(Meetup.Fri) should be (LocalDate.of(2013, 12, 27))
|
166
368
|
}
|
167
369
|
|
168
|
-
test ("fourth
|
370
|
+
test ("fourth saturday of january 2013") {
|
169
371
|
pending
|
170
|
-
Meetup(
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
Meetup(
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
372
|
+
Meetup(1, 2013).fourth(Meetup.Sat) should be (LocalDate.of(2013, 1, 26))
|
373
|
+
}
|
374
|
+
|
375
|
+
test ("fourth saturday of february 2013") {
|
376
|
+
pending
|
377
|
+
Meetup(2, 2013).fourth(Meetup.Sat) should be (LocalDate.of(2013, 2, 23))
|
378
|
+
}
|
379
|
+
|
380
|
+
test ("fourth sunday of march 2013") {
|
381
|
+
pending
|
382
|
+
Meetup(3, 2013).fourth(Meetup.Sun) should be (LocalDate.of(2013, 3, 24))
|
383
|
+
}
|
384
|
+
|
385
|
+
test ("fourth sunday of april 2013") {
|
386
|
+
pending
|
387
|
+
Meetup(4, 2013).fourth(Meetup.Sun) should be (LocalDate.of(2013, 4, 28))
|
180
388
|
}
|
181
389
|
|
182
390
|
test ("last monday of march 2013") {
|
183
391
|
pending
|
184
|
-
Meetup(3, 2013).last(Meetup.Mon) should be (
|
392
|
+
Meetup(3, 2013).last(Meetup.Mon) should be (LocalDate.of(2013, 3, 25))
|
393
|
+
}
|
394
|
+
|
395
|
+
test ("last monday of april 2013") {
|
396
|
+
pending
|
397
|
+
Meetup(4, 2013).last(Meetup.Mon) should be (LocalDate.of(2013, 4, 29))
|
185
398
|
}
|
186
399
|
|
187
|
-
test ("last
|
400
|
+
test ("last tuesday of may 2013") {
|
188
401
|
pending
|
189
|
-
Meetup(
|
402
|
+
Meetup(5, 2013).last(Meetup.Tue) should be (LocalDate.of(2013, 5, 28))
|
190
403
|
}
|
191
404
|
|
192
|
-
test ("last
|
405
|
+
test ("last tuesday of june 2013") {
|
193
406
|
pending
|
194
|
-
Meetup(6,
|
407
|
+
Meetup(6, 2013).last(Meetup.Tue) should be (LocalDate.of(2013, 6, 25))
|
195
408
|
}
|
196
409
|
|
197
|
-
test ("last
|
410
|
+
test ("last wednesday of july 2013") {
|
198
411
|
pending
|
199
|
-
Meetup(
|
412
|
+
Meetup(7, 2013).last(Meetup.Wed) should be (LocalDate.of(2013, 7, 31))
|
200
413
|
}
|
201
414
|
|
202
|
-
test ("
|
415
|
+
test ("last wednesday of august 2013") {
|
203
416
|
pending
|
204
|
-
Meetup(
|
205
|
-
Meetup(2, 2016).last(Meetup.Mon) should be (new GregorianCalendar(2016, 1, 29))
|
417
|
+
Meetup(8, 2013).last(Meetup.Wed) should be (LocalDate.of(2013, 8, 28))
|
206
418
|
}
|
207
419
|
|
208
|
-
test ("last
|
420
|
+
test ("last thursday of september 2013") {
|
209
421
|
pending
|
210
|
-
Meetup(
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
Meetup(
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
422
|
+
Meetup(9, 2013).last(Meetup.Thu) should be (LocalDate.of(2013, 9, 26))
|
423
|
+
}
|
424
|
+
|
425
|
+
test ("last thursday of october 2013") {
|
426
|
+
pending
|
427
|
+
Meetup(10, 2013).last(Meetup.Thu) should be (LocalDate.of(2013, 10, 31))
|
428
|
+
}
|
429
|
+
|
430
|
+
test ("last friday of november 2013") {
|
431
|
+
pending
|
432
|
+
Meetup(11, 2013).last(Meetup.Fri) should be (LocalDate.of(2013, 11, 29))
|
433
|
+
}
|
434
|
+
|
435
|
+
test ("last friday of december 2013") {
|
436
|
+
pending
|
437
|
+
Meetup(12, 2013).last(Meetup.Fri) should be (LocalDate.of(2013, 12, 27))
|
438
|
+
}
|
439
|
+
|
440
|
+
test ("last saturday of january 2013") {
|
441
|
+
pending
|
442
|
+
Meetup(1, 2013).last(Meetup.Sat) should be (LocalDate.of(2013, 1, 26))
|
443
|
+
}
|
444
|
+
|
445
|
+
test ("last saturday of february 2013") {
|
446
|
+
pending
|
447
|
+
Meetup(2, 2013).last(Meetup.Sat) should be (LocalDate.of(2013, 2, 23))
|
448
|
+
}
|
449
|
+
|
450
|
+
test ("last sunday of march 2013") {
|
451
|
+
pending
|
452
|
+
Meetup(3, 2013).last(Meetup.Sun) should be (LocalDate.of(2013, 3, 31))
|
453
|
+
}
|
454
|
+
|
455
|
+
test ("last sunday of april 2013") {
|
456
|
+
pending
|
457
|
+
Meetup(4, 2013).last(Meetup.Sun) should be (LocalDate.of(2013, 4, 28))
|
220
458
|
}
|
221
459
|
}
|
460
|
+
|