-
157 msDay01p1Tests
-
87 mspassedshould be able to represent a calibration value
-
4 mspassedshould be able to represent a line from the calibration document
-
15 mspassedshould be able to represent a calibration document
-
1 msCalibrationDocumentLine.toCalibrationValue() tests
-
0 mspassedgiven a calibration document line `1abc2`, when calling toCalibrationValue() it should return 12
-
0 mspassedgiven a calibration document line `pqr3stu8vwx`, when calling toCalibrationValue() it should return 38
-
1 mspassedgiven a calibration document line `a1b2c3d4e5f`, when calling toCalibrationValue() it should return 15
-
0 mspassedgiven a calibration document line `treb7uchet`, when calling toCalibrationValue() it should return 77
-
-
2 mspassedgiven the example calibration document, when calling the sumOfCalibrationValues() it should return 142
-
48 mspassedgiven the custom calibration document, when calling the sumOfCalibrationValues() it should return 55621
-
-
39 msDay01p2Tests
-
2 mspassedshould be able to represent a calibration value
-
3 mspassedshould be able to represent a line from the calibration document
-
6 mspassedshould be able to represent a calibration document
-
1 msCalibrationDocumentLine.toCalibrationValue() tests
-
0 mspassedgiven a calibration document line `1abc2`, when calling toCalibrationValue() it should return 12
-
1 mspassedgiven a calibration document line `pqr3stu8vwx`, when calling toCalibrationValue() it should return 38
-
0 mspassedgiven a calibration document line `a1b2c3d4e5f`, when calling toCalibrationValue() it should return 15
-
0 mspassedgiven a calibration document line `treb7uchet`, when calling toCalibrationValue() it should return 77
-
0 mspassedgiven a calibration document line `one`, when calling toCalibrationValue() it should return 11
-
0 mspassedgiven a calibration document line `oneone`, when calling toCalibrationValue() it should return 11
-
0 mspassedgiven a calibration document line `two1nine`, when calling toCalibrationValue() it should return 29
-
0 mspassedgiven a calibration document line `eightwothree`, when calling toCalibrationValue() it should return 83
-
0 mspassedgiven a calibration document line `abcone2threexyz`, when calling toCalibrationValue() it should return 13
-
0 mspassedgiven a calibration document line `xtwone3four`, when calling toCalibrationValue() it should return 24
-
0 mspassedgiven a calibration document line `4nineeightseven2`, when calling toCalibrationValue() it should return 42
-
0 mspassedgiven a calibration document line `zoneight234`, when calling toCalibrationValue() it should return 14
-
0 mspassedgiven a calibration document line `7pqrstsixteen`, when calling toCalibrationValue() it should return 76
-
-
2 mspassedgiven the example calibration document, when calling the sumOfCalibrationValues() it should return 142
-
25 mspassedgiven the custom calibration document, when calling the sumOfCalibrationValues() it should return 53592
-
-
25 msDay02p1Tests
-
5 msGiven: a number of red, green and blue cubes
-
5 mspassedThen: we can represent them properly
-
-
8 msGiven: a series of text representations of handful of cubes
-
4 msAnd: the text is `3 red, 5 green, 4 blue`
-
4 msWhen: we parse it
-
4 mspassedThen: it should parse as Cubes(red=3, green=5, blue=4)
-
-
-
2 msAnd: the text is `3 red`
-
2 msWhen: we parse it
-
2 mspassedThen: it should parse as Cubes(red=3, green=0, blue=0)
-
-
-
1 msAnd: the text is `3 blue, 4 red`
-
1 msWhen: we parse it
-
1 mspassedThen: it should parse as Cubes(red=4, green=0, blue=3)
-
-
-
1 msAnd: the text is `12 red, 13 green, 14 blue`
-
1 msWhen: we parse it
-
1 mspassedThen: it should parse as Cubes(red=12, green=13, blue=14)
-
-
-
-
1 msGiven: A handful and a bag of cubes
-
0 msWhen: we test if the bag can contain the handful
-
0 mspassedThen: it should return true
-
-
1 msWhen: we test if the handful can contain the bag
-
1 mspassedThen: it should return false
-
-
-
4 msGiven: a game with an id and a series of handful of cubes
-
4 mspassedThen: we can represent them properly
-
-
3 msGiven: a series of text representations of games
-
2 msAnd: the text is `Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green`
-
2 msWhen: we parse it
-
2 mspassedThen: it should parse as Game(id=1, handfuls=[Cubes(red=4, green=0, blue=3), Cubes(red=1, green=2, blue=6), Cubes(red=0, green=2, blue=0)])
-
-
-
1 msAnd: the text is `Game 14: 1 green, 3 red, 6 blue; 3 green, 6 red; 3 green, 15 blue, 14 red`
-
1 msWhen: we parse it
-
1 mspassedThen: it should parse as Game(id=14, handfuls=[Cubes(red=3, green=1, blue=6), Cubes(red=6, green=3, blue=0), Cubes(red=14, green=3, blue=15)])
-
-
-
-
2 msGiven: A game and a bag of cubes
-
2 msAnd: the bag is Cubes
-
1 msAnd: the game is Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green
-
1 msWhen: we test if the game is possible
-
1 mspassedThen: it should return true
-
-
-
1 msAnd: the game is Game 2: 1 blue, 2 green; 3 green, 4 blue, 1 red; 1 green, 1 blue
-
1 msWhen: we test if the game is possible
-
1 mspassedThen: it should return true
-
-
-
0 msAnd: the game is Game 3: 8 green, 6 blue, 20 red; 5 blue, 4 red, 13 green; 5 green, 1 red
-
0 msWhen: we test if the game is possible
-
0 mspassedThen: it should return false
-
-
-
0 msAnd: the game is Game 4: 1 green, 3 red, 6 blue; 3 green, 6 red; 3 green, 15 blue, 14 red
-
0 msWhen: we test if the game is possible
-
0 mspassedThen: it should return false
-
-
-
0 msAnd: the game is Game 5: 6 red, 1 blue, 3 green; 2 blue, 1 red, 2 green
-
0 msWhen: we test if the game is possible
-
0 mspassedThen: it should return true
-
-
-
-
-
0 msGiven: An example list of games and a bag of cubes
-
0 msWhen: we sum the ids of the games that are possible
-
0 mspassedThen: we should get the correct sum
-
-
-
2 msGiven: Our custom input list of games and a bag of cubes
-
2 msWhen: we sum the ids of the games that are possible
-
2 mspassedThen: we should get the correct sum
-
-
-
-
30 msDay02p2Tests
-
3 msGiven: a number of red, green and blue cubes
-
3 mspassedThen: we can represent them properly
-
-
8 msGiven: a series of text representations of handful of cubes
-
2 msAnd: the text is `3 red, 5 green, 4 blue`
-
2 msWhen: we parse it
-
2 mspassedThen: it should parse as Cubes(red=3, green=5, blue=4)
-
-
-
1 msAnd: the text is `3 red`
-
1 msWhen: we parse it
-
1 mspassedThen: it should parse as Cubes(red=3, green=0, blue=0)
-
-
-
1 msAnd: the text is `3 blue, 4 red`
-
1 msWhen: we parse it
-
1 mspassedThen: it should parse as Cubes(red=4, green=0, blue=3)
-
-
-
1 msAnd: the text is `12 red, 13 green, 14 blue`
-
1 msWhen: we parse it
-
1 mspassedThen: it should parse as Cubes(red=12, green=13, blue=14)
-
-
-
1 msAnd: the cubes are Cubes
-
1 msWhen: we calculate the power
-
1 mspassedThen: it should be 48
-
-
-
0 msAnd: the cubes are Cubes
-
0 msWhen: we calculate the power
-
0 mspassedThen: it should be 12
-
-
-
1 msAnd: the cubes are Cubes
-
1 msWhen: we calculate the power
-
1 mspassedThen: it should be 1560
-
-
-
0 msAnd: the cubes are Cubes
-
0 msWhen: we calculate the power
-
0 mspassedThen: it should be 630
-
-
-
1 msAnd: the cubes are Cubes
-
1 msWhen: we calculate the power
-
1 mspassedThen: it should be 36
-
-
-
-
2 msGiven: A handful and a bag of cubes
-
1 msWhen: we test if the bag can contain the handful
-
1 mspassedThen: it should return true
-
-
1 msWhen: we test if the handful can contain the bag
-
1 mspassedThen: it should return false
-
-
-
3 msGiven: a game with an id and a series of handful of cubes
-
3 mspassedThen: we can represent them properly
-
-
2 msGiven: a series of text representations of games
-
2 msAnd: the text is `Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green`
-
2 msWhen: we parse it
-
2 mspassedThen: it should parse as Game(id=1, handfuls=[Cubes(red=4, green=0, blue=3), Cubes(red=1, green=2, blue=6), Cubes(red=0, green=2, blue=0)])
-
-
-
0 msAnd: the text is `Game 14: 1 green, 3 red, 6 blue; 3 green, 6 red; 3 green, 15 blue, 14 red`
-
0 msWhen: we parse it
-
0 mspassedThen: it should parse as Game(id=14, handfuls=[Cubes(red=3, green=1, blue=6), Cubes(red=6, green=3, blue=0), Cubes(red=14, green=3, blue=15)])
-
-
-
-
4 msGiven: A game and a bag of cubes
-
4 msAnd: the bag is Cubes
-
1 msAnd: the game is Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green
-
1 msWhen: we test if the game is possible
-
1 mspassedThen: it should return true
-
-
-
1 msAnd: the game is Game 2: 1 blue, 2 green; 3 green, 4 blue, 1 red; 1 green, 1 blue
-
1 msWhen: we test if the game is possible
-
1 mspassedThen: it should return true
-
-
-
1 msAnd: the game is Game 3: 8 green, 6 blue, 20 red; 5 blue, 4 red, 13 green; 5 green, 1 red
-
1 msWhen: we test if the game is possible
-
1 mspassedThen: it should return false
-
-
-
0 msAnd: the game is Game 4: 1 green, 3 red, 6 blue; 3 green, 6 red; 3 green, 15 blue, 14 red
-
0 msWhen: we test if the game is possible
-
0 mspassedThen: it should return false
-
-
-
1 msAnd: the game is Game 5: 6 red, 1 blue, 3 green; 2 blue, 1 red, 2 green
-
1 msWhen: we test if the game is possible
-
1 mspassedThen: it should return true
-
-
-
-
-
2 msGiven: An example list of games and a bag of cubes
-
1 msWhen: we sum the ids of the games that are possible
-
1 mspassedThen: we should get the correct sum
-
-
1 msWhen: we sum the power of the minimum bags of the games
-
1 mspassedThen: we should get the correct sum
-
-
-
2 msGiven: Our custom input list of games and a bag of cubes
-
1 msWhen: we sum the ids of the games that are possible
-
1 mspassedThen: we should get the correct sum
-
-
1 msWhen: we sum the power of the minimum bags of the games
-
1 mspassedThen: we should get the correct sum
-
-
-
4 msGiven: A game
-
1 msAnd: the game is Game
-
1 msWhen: we calculate the minimum sized bag of cubes
-
1 mspassedThen: it should be Cubes(red=4, green=2, blue=6)
-
-
-
1 msAnd: the game is Game
-
1 msWhen: we calculate the minimum sized bag of cubes
-
1 mspassedThen: it should be Cubes(red=1, green=3, blue=4)
-
-
-
0 msAnd: the game is Game
-
0 msWhen: we calculate the minimum sized bag of cubes
-
0 mspassedThen: it should be Cubes(red=20, green=13, blue=6)
-
-
-
1 msAnd: the game is Game
-
1 msWhen: we calculate the minimum sized bag of cubes
-
1 mspassedThen: it should be Cubes(red=14, green=3, blue=15)
-
-
-
1 msAnd: the game is Game
-
1 msWhen: we calculate the minimum sized bag of cubes
-
1 mspassedThen: it should be Cubes(red=6, green=3, blue=2)
-
-
-
-
-
119 msDay03p1Tests
-
5 mspassedGiven a part number of 467 can be represented
-
39 mspassedGiven a schematic of `.` when parsed then it will have 0 part numbers
-
4 mspassedGiven a schematic of `467*` when parsed then it will have 1 part number
-
7 mspassedGiven a schematic of `467` when parsed then it will have 0 part numbers
-
2 mspassedGiven a schematic of `467*` and row `0` and int rage `[0, 2]` when queried then it will return adjacent
-
2 mspassedGiven a schematic of `467` and row `0` and int rage `[0, 2]` when queried then it will return not adjacent
-
2 mspassedGiven a schematic of `467.` and row `0` and int rage `[0, 2]` when queried then it will return not adjacent
-
2 mspassedGiven a schematic of `*467` and row `0` and int rage `[1, 3]` when queried then it will return adjacent
-
4 mspassedGiven a schematic of `.467` and row `0` and int rage `[1, 3]` when queried then it will return not adjacent
-
5 mspassedGiven a schematic of 467. ...* and row 0 and int range `[0, 2]` when queried then it will return adjacent
-
1 mspassedGiven a schematic of 467.. ....* and row 0 and int range `[0, 2]` when queried then it will return not adjacent
-
2 mspassedGiven a schematic of ...* 467. and row 1 and int range `[0, 2]` when queried then it will return adjacent
-
2 mspassedGiven a schematic of ....* 467.. and row 1 and int range `[0, 2]` when queried then it will return adjacent
-
6 mspassedGiven an example schematic of 467..114.. ...*...... ..35..633. ......#... 617*...... .....+.58. ..592..... ......755. ...\$.*.... .664.598.. when summing the part numbers we get 4361
-
36 mspassedGiven our custom input schematic when summing the part numbers we get 527364
-
-
142 msDay03p2Tests
-
16 mspassedGiven a part number of 467 with row 0 and range [0..2] can be represented
-
11 mspassedGiven a schematic of `.` when parsed then it will have 0 part numbers
-
10 mspassedGiven a schematic of `467*` when parsed then it will have 1 part number
-
3 mspassedGiven a schematic of `467` when parsed then it will have 0 part numbers
-
3 mspassedGiven a schematic of `467*` and row `0` and int rage `[0, 2]` when queried then it will return adjacent
-
4 mspassedGiven a schematic of `467` and row `0` and int rage `[0, 2]` when queried then it will return not adjacent
-
2 mspassedGiven a schematic of `467.` and row `0` and int rage `[0, 2]` when queried then it will return not adjacent
-
5 mspassedGiven a schematic of `*467` and row `0` and int rage `[1, 3]` when queried then it will return adjacent
-
1 mspassedGiven a schematic of `.467` and row `0` and int rage `[1, 3]` when queried then it will return not adjacent
-
3 mspassedGiven a schematic of 467. ...* and row 0 and int range `[0, 2]` when queried then it will return adjacent
-
1 mspassedGiven a schematic of 467.. ....* and row 0 and int range `[0, 2]` when queried then it will return not adjacent
-
3 mspassedGiven a schematic of ...* 467. and row 1 and int range `[0, 2]` when queried then it will return adjacent
-
3 mspassedGiven a schematic of ....* 467.. and row 1 and int range `[0, 2]` when queried then it will return adjacent
-
2 mspassedGiven an example schematic of 467..114.. ...*...... ..35..633. ......#... 617*...... .....+.58. ..592..... ......755. ...\$.*.... .664.598.. when summing the part numbers we get 4361
-
34 mspassedGiven our custom input schematic when summing the part numbers we get 527364
-
1 mspassedA char of `*` is a gear candidate
-
1 mspassedNone of `.?%!$` are gear candidates
-
7 mspassedGiven a schematic of `467*114` when parsed then it will have 1 gear
-
1 mspassedGiven an example schematic of 467..114.. ...*...... ..35..633. ......#... 617*...... .....+.58. ..592..... ......755. ...\$.*.... .664.598.. when summing the gear ratios we get 467835
-
31 mspassedGiven our custom input schematic when summing the gear ratios we get 79026871
-
-
48 msDay04p1Tests
-
4 mspassedGiven "41" as input when we parse it then it should be setOf(42)
-
1 mspassedGiven "83 86 6 31 17 9 48 53" as input when we parse it then it should be setOf(6, 9, 17, 31, 48, 53, 83, 86)
-
8 mspassedGiven "Card 12: 41 48 83 86 17 | 83 86 6 31 17 9 48 53" as input then we should parse it as expected
-
14 msGiven a series of scratchcards then the points should be calculated correctly
-
9 mspassedGiven a scratchcard of `Card 1: 41 48 83 86 17 | 83 86 6 31 17 9 48 53` then the points should be 8
-
1 mspassedGiven a scratchcard of `Card 2: 13 32 20 16 61 | 61 30 68 82 17 32 24 19` then the points should be 2
-
1 mspassedGiven a scratchcard of `Card 3: 1 21 53 59 44 | 69 82 63 72 16 21 14 1` then the points should be 2
-
1 mspassedGiven a scratchcard of `Card 4: 41 92 73 84 69 | 59 84 76 51 58 5 54 83` then the points should be 1
-
1 mspassedGiven a scratchcard of `Card 5: 87 83 26 28 32 | 88 30 70 12 93 22 82 36` then the points should be 0
-
1 mspassedGiven a scratchcard of `Card 6: 31 18 13 56 72 | 74 77 10 23 35 67 36 11` then the points should be 0
-
-
2 mspassedGiven an example pile of scratchcards then the total points should be 13
-
19 mspassedGiven our custom pile of scratchcards then the total points should be 28750
-
-
45 msDay04p2Tests
-
4 mspassedGiven "41" as input when we parse it then it should be setOf(42)
-
1 mspassedGiven "83 86 6 31 17 9 48 53" as input when we parse it then it should be setOf(6, 9, 17, 31, 48, 53, 83, 86)
-
6 mspassedGiven "Card 12: 41 48 83 86 17 | 83 86 6 31 17 9 48 53" as input then we should parse it as expected
-
5 msGiven a series of scratchcards then the num of owned winning numbers should be calculated correctly
-
1 mspassedGiven a scratchcard of `Card 1: 41 48 83 86 17 | 83 86 6 31 17 9 48 53` then the numb of owned winning numbers should be 4
-
1 mspassedGiven a scratchcard of `Card 2: 13 32 20 16 61 | 61 30 68 82 17 32 24 19` then the numb of owned winning numbers should be 2
-
0 mspassedGiven a scratchcard of `Card 3: 1 21 53 59 44 | 69 82 63 72 16 21 14 1` then the numb of owned winning numbers should be 2
-
1 mspassedGiven a scratchcard of `Card 4: 41 92 73 84 69 | 59 84 76 51 58 5 54 83` then the numb of owned winning numbers should be 1
-
1 mspassedGiven a scratchcard of `Card 5: 87 83 26 28 32 | 88 30 70 12 93 22 82 36` then the numb of owned winning numbers should be 0
-
1 mspassedGiven a scratchcard of `Card 6: 31 18 13 56 72 | 74 77 10 23 35 67 36 11` then the numb of owned winning numbers should be 0
-
-
7 mspassedGiven an example pile of scratchcards then we can properly represent it
-
2 mspassedGiven an example pile of scratchcards then the total number of owned scratchcards should be 30
-
20 mspassedGiven our custom pile of scratchcards then the total number of owned scratchcards should be 10212704
-
-
280 msDay05p1Tests
-
4 mspassedThe basic entities like seed and category can be properly represented
-
5 mspassedAn Almanac map name can be properly represented
-
4 mspassedGiven "seeds: 41" as input when we parse it then it should be setOfSeeds(41)
-
22 mspassedGiven "seeds: 83 86 6 31 17 9 48 53" as input when we parse it then it should be setOfSeeds(6, 9, 17, 31, 48, 53, 83, 86)
-
4 mspassedGiven a map name line of "seed-to-soil map:" as input when we parse it then it should be AlmanacMapName("seed", "soil")
-
6 mspassedGiven a map range line of "50 98 2" as input when we parse it then it should be AlmanacMapRange(98, 50, 2)
-
151 mspassedGiven a map as temperature-to-humidity map: 0 69 1 1 0 69 as input when we parse it then it should be an AlmanacMap with proper name and ranges
-
40 mspassedGiven an Almanac as seeds: 79 14 55 13 seed-to-soil map: 50 98 2 52 50 48 soil-to-fertilizer map: 0 15 37 37 52 2 39 0 15 fertilizer-to-water map: 49 53 8 0 11 42 42 0 7 57 7 4 water-to-light map: 88 18 7 18 25 70 light-to-temperature map: 45 77 23 81 45 19 68 64 13 temperature-to-humidity map: 0 69 1 1 0 69 humidity-to-location map: 60 56 37 56 93 4 as input when we parse it then it should be an Almanac with proper seeds and maps
-
11 msTest AlmanacMapRange mapping between category numbers
-
1 mspassedMapping 0 with AlmanacMapRange should be null
-
1 mspassedMapping 1 with AlmanacMapRange should be null
-
1 mspassedMapping 48 with AlmanacMapRange should be null
-
1 mspassedMapping 49 with AlmanacMapRange should be null
-
2 mspassedMapping 50 with AlmanacMapRange should be 52
-
1 mspassedMapping 51 with AlmanacMapRange should be 53
-
1 mspassedMapping 96 with AlmanacMapRange should be 98
-
0 mspassedMapping 97 with AlmanacMapRange should be 99
-
1 mspassedMapping 98 with AlmanacMapRange should be null
-
2 mspassedMapping 99 with AlmanacMapRange should be null
-
-
13 msTest AlmanacMap mapping between category numbers
-
3 mspassedMapping 79 with AlmanacMap should be 81
-
1 mspassedMapping 14 with AlmanacMap should be 14
-
0 mspassedMapping 55 with AlmanacMap should be 57
-
0 mspassedMapping 13 with AlmanacMap should be 13
-
1 mspassedMapping 0 with AlmanacMap should be 0
-
1 mspassedMapping 1 with AlmanacMap should be 1
-
2 mspassedMapping 48 with AlmanacMap should be 48
-
1 mspassedMapping 49 with AlmanacMap should be 49
-
0 mspassedMapping 50 with AlmanacMap should be 52
-
1 mspassedMapping 51 with AlmanacMap should be 53
-
1 mspassedMapping 96 with AlmanacMap should be 98
-
0 mspassedMapping 97 with AlmanacMap should be 99
-
1 mspassedMapping 98 with AlmanacMap should be 50
-
1 mspassedMapping 99 with AlmanacMap should be 51
-
0 mspassedMapping 100 with AlmanacMap should be 100
-
0 mspassedMapping 101 with AlmanacMap should be 101
-
-
5 msGiven the example Almanac test the chained mapping between category numbers
-
1 mspassedMapping 79 with example Almanac should be 82
-
2 mspassedMapping 14 with example Almanac should be 43
-
1 mspassedMapping 55 with example Almanac should be 86
-
1 mspassedMapping 13 with example Almanac should be 35
-
-
4 mspassedGiven the example Almanac the lowest location number should be 35
-
11 mspassedGiven our custom Almanac the lowest location number should be 199602917
-
-
142 msDay05p2Tests
-
7 mspassedThe basic entities like seed and category can be properly represented
-
9 mspassedAn Almanac map name can be properly represented
-
9 mspassedGiven "seeds: 41 3" as input when we parse it then it should be setOfSeedRanges(41..43)
-
3 mspassedGiven "seeds: seeds: 79 3 55 4" as input when we parse it then it should be setOfSeedRanges(79..81, 55..58)
-
1 mspassedGiven a CategoryNumberRange("seed", 79, 81) contains should work as expected
-
33 mspassedGiven a CategoryNumberRange("seed", 75, 82) then we should be able to compare it with other ranges
-
5 mspassedGiven a map name line of "seed-to-soil map:" as input when we parse it then it should be AlmanacMapName("seed", "soil")
-
6 mspassedGiven a map range line of "50 98 2" as input when we parse it then it should be AlmanacMapRange(98, 50, 2)
-
11 mspassedGiven a map range of "50 98 2" we should be able to map ranges
-
5 mspassedGiven a map as temperature-to-humidity map: 0 69 1 1 0 69 as input when we parse it then it should be an AlmanacMap with proper name and ranges
-
5 mspassedGiven an Almanac as seeds: 79 14 55 13 seed-to-soil map: 50 98 2 52 50 48 soil-to-fertilizer map: 0 15 37 37 52 2 39 0 15 fertilizer-to-water map: 49 53 8 0 11 42 42 0 7 57 7 4 water-to-light map: 88 18 7 18 25 70 light-to-temperature map: 45 77 23 81 45 19 68 64 13 temperature-to-humidity map: 0 69 1 1 0 69 humidity-to-location map: 60 56 37 56 93 4 as input when we parse it then it should be an Almanac with proper seeds and maps
-
5 mspassedTest AlmanacMap mapping between category number ranges
-
11 mspassedGiven the example Almanac test the chained mapping between category number ranges
-
3 mspassedGiven the example Almanac the lowest location number should be 46
-
29 mspassedGiven our custom Almanac the lowest location number should be 2254686
-
-
27 msDay06p1Tests
-
5 mspassedA Record can be properly represented
-
5 msGiven a Record(raceDuration = 7, recordDistance = 9), the distance can be calculated based on the duration the button was held
-
1 mspassedGiven a button hold time of 0, the distance travelled should be 0
-
1 mspassedGiven a button hold time of 1, the distance travelled should be 6
-
0 mspassedGiven a button hold time of 2, the distance travelled should be 10
-
1 mspassedGiven a button hold time of 3, the distance travelled should be 12
-
1 mspassedGiven a button hold time of 4, the distance travelled should be 12
-
1 mspassedGiven a button hold time of 5, the distance travelled should be 10
-
0 mspassedGiven a button hold time of 6, the distance travelled should be 6
-
0 mspassedGiven a button hold time of 7, the distance travelled should be 0
-
-
5 msGiven a list of ints with header as input (in the form of "Time: 7 15 30") then it should be properly parsed into a list of Ints
-
4 mspassedGiven Time: 7 15 30 when we parse it then it should be [7, 15, 30]
-
1 mspassedGiven Distance: 9 40 200 when we parse it then it should be [9, 40, 200]
-
-
4 mspassedGiven a records document the Record entries can be properly parsed
-
0 msGiven a Record the number of ways to beat the record can be calculated
-
0 mspassedGiven Record(raceDuration=7, recordDistance=9) the number of ways to beat the record should be 4
-
0 mspassedGiven Record(raceDuration=15, recordDistance=40) the number of ways to beat the record should be 8
-
0 mspassedGiven Record(raceDuration=30, recordDistance=200) the number of ways to beat the record should be 9
-
-
6 mspassedGiven the example records document the product of the number of ways to beat the record can be calculated
-
2 mspassedGiven the custom records document the product of the number of ways to beat the record can be calculated
-
-
250 msDay06p2Tests
-
4 mspassedA Record can be properly represented
-
6 msGiven a Record(raceDuration = 7, recordDistance = 9), the distance can be calculated based on the duration the button was held
-
1 mspassedGiven a button hold time of 0, the distance travelled should be 0
-
0 mspassedGiven a button hold time of 1, the distance travelled should be 6
-
1 mspassedGiven a button hold time of 2, the distance travelled should be 10
-
1 mspassedGiven a button hold time of 3, the distance travelled should be 12
-
1 mspassedGiven a button hold time of 4, the distance travelled should be 12
-
0 mspassedGiven a button hold time of 5, the distance travelled should be 10
-
1 mspassedGiven a button hold time of 6, the distance travelled should be 6
-
1 mspassedGiven a button hold time of 7, the distance travelled should be 0
-
-
6 msGiven a number with any number of spaced between the digits with a header as input (in the form of "Time: 7 15 30") then it should be properly parsed into a number
-
5 mspassedGiven Time: 7 15 30 when we parse it then it should be 71530
-
1 mspassedGiven Distance: 9 40 200 when we parse it then it should be 940200
-
-
3 mspassedGiven a record document the Record can be properly parsed
-
5 msGiven a Record the number of ways to beat the record can be calculated
-
3 mspassedGiven Record(raceDuration=7, recordDistance=9) the number of ways to beat the record should be 4
-
1 mspassedGiven Record(raceDuration=15, recordDistance=40) the number of ways to beat the record should be 8
-
1 mspassedGiven Record(raceDuration=30, recordDistance=200) the number of ways to beat the record should be 9
-
-
10 mspassedGiven the example record document then the number of ways to beat the record can be calculated
-
216 mspassedGiven the custom record document then the number of ways to beat the record can be calculated
-
-
233 msDay07p1Tests
-
87 msGiven cards we can compare them based on their relative strength
-
10 mspassedSmoke test card comparisons
-
2 mspassedGiven all cards when we sort them then they should be in order
-
1 mspassedAll cards should really be all cards
-
3 mspassedGiven Ace when compared to itself it should be equal
-
1 mspassedGiven Ace and King when we compare them then Ace should be greater than King
-
1 mspassedGiven Ace and Queen when we compare them then Ace should be greater than Queen
-
0 mspassedGiven Ace and Jack when we compare them then Ace should be greater than Jack
-
1 mspassedGiven Ace and Ten when we compare them then Ace should be greater than Ten
-
1 mspassedGiven Ace and Nine when we compare them then Ace should be greater than Nine
-
1 mspassedGiven Ace and Eight when we compare them then Ace should be greater than Eight
-
1 mspassedGiven Ace and Seven when we compare them then Ace should be greater than Seven
-
0 mspassedGiven Ace and Six when we compare them then Ace should be greater than Six
-
1 mspassedGiven Ace and Five when we compare them then Ace should be greater than Five
-
0 mspassedGiven Ace and Four when we compare them then Ace should be greater than Four
-
1 mspassedGiven Ace and Three when we compare them then Ace should be greater than Three
-
1 mspassedGiven Ace and Two when we compare them then Ace should be greater than Two
-
1 mspassedGiven King when compared to itself it should be equal
-
7 mspassedGiven King and Queen when we compare them then King should be greater than Queen
-
1 mspassedGiven King and Jack when we compare them then King should be greater than Jack
-
1 mspassedGiven King and Ten when we compare them then King should be greater than Ten
-
0 mspassedGiven King and Nine when we compare them then King should be greater than Nine
-
1 mspassedGiven King and Eight when we compare them then King should be greater than Eight
-
1 mspassedGiven King and Seven when we compare them then King should be greater than Seven
-
0 mspassedGiven King and Six when we compare them then King should be greater than Six
-
1 mspassedGiven King and Five when we compare them then King should be greater than Five
-
1 mspassedGiven King and Four when we compare them then King should be greater than Four
-
0 mspassedGiven King and Three when we compare them then King should be greater than Three
-
1 mspassedGiven King and Two when we compare them then King should be greater than Two
-
1 mspassedGiven Queen when compared to itself it should be equal
-
2 mspassedGiven Queen and Jack when we compare them then Queen should be greater than Jack
-
1 mspassedGiven Queen and Ten when we compare them then Queen should be greater than Ten
-
0 mspassedGiven Queen and Nine when we compare them then Queen should be greater than Nine
-
0 mspassedGiven Queen and Eight when we compare them then Queen should be greater than Eight
-
0 mspassedGiven Queen and Seven when we compare them then Queen should be greater than Seven
-
0 mspassedGiven Queen and Six when we compare them then Queen should be greater than Six
-
1 mspassedGiven Queen and Five when we compare them then Queen should be greater than Five
-
1 mspassedGiven Queen and Four when we compare them then Queen should be greater than Four
-
0 mspassedGiven Queen and Three when we compare them then Queen should be greater than Three
-
1 mspassedGiven Queen and Two when we compare them then Queen should be greater than Two
-
1 mspassedGiven Jack when compared to itself it should be equal
-
0 mspassedGiven Jack and Ten when we compare them then Jack should be greater than Ten
-
1 mspassedGiven Jack and Nine when we compare them then Jack should be greater than Nine
-
0 mspassedGiven Jack and Eight when we compare them then Jack should be greater than Eight
-
0 mspassedGiven Jack and Seven when we compare them then Jack should be greater than Seven
-
1 mspassedGiven Jack and Six when we compare them then Jack should be greater than Six
-
1 mspassedGiven Jack and Five when we compare them then Jack should be greater than Five
-
0 mspassedGiven Jack and Four when we compare them then Jack should be greater than Four
-
0 mspassedGiven Jack and Three when we compare them then Jack should be greater than Three
-
1 mspassedGiven Jack and Two when we compare them then Jack should be greater than Two
-
1 mspassedGiven Ten when compared to itself it should be equal
-
1 mspassedGiven Ten and Nine when we compare them then Ten should be greater than Nine
-
1 mspassedGiven Ten and Eight when we compare them then Ten should be greater than Eight
-
1 mspassedGiven Ten and Seven when we compare them then Ten should be greater than Seven
-
1 mspassedGiven Ten and Six when we compare them then Ten should be greater than Six
-
1 mspassedGiven Ten and Five when we compare them then Ten should be greater than Five
-
1 mspassedGiven Ten and Four when we compare them then Ten should be greater than Four
-
1 mspassedGiven Ten and Three when we compare them then Ten should be greater than Three
-
3 mspassedGiven Ten and Two when we compare them then Ten should be greater than Two
-
0 mspassedGiven Nine when compared to itself it should be equal
-
1 mspassedGiven Nine and Eight when we compare them then Nine should be greater than Eight
-
0 mspassedGiven Nine and Seven when we compare them then Nine should be greater than Seven
-
0 mspassedGiven Nine and Six when we compare them then Nine should be greater than Six
-
1 mspassedGiven Nine and Five when we compare them then Nine should be greater than Five
-
0 mspassedGiven Nine and Four when we compare them then Nine should be greater than Four
-
1 mspassedGiven Nine and Three when we compare them then Nine should be greater than Three
-
1 mspassedGiven Nine and Two when we compare them then Nine should be greater than Two
-
1 mspassedGiven Eight when compared to itself it should be equal
-
0 mspassedGiven Eight and Seven when we compare them then Eight should be greater than Seven
-
0 mspassedGiven Eight and Six when we compare them then Eight should be greater than Six
-
1 mspassedGiven Eight and Five when we compare them then Eight should be greater than Five
-
1 mspassedGiven Eight and Four when we compare them then Eight should be greater than Four
-
1 mspassedGiven Eight and Three when we compare them then Eight should be greater than Three
-
0 mspassedGiven Eight and Two when we compare them then Eight should be greater than Two
-
1 mspassedGiven Seven when compared to itself it should be equal
-
1 mspassedGiven Seven and Six when we compare them then Seven should be greater than Six
-
0 mspassedGiven Seven and Five when we compare them then Seven should be greater than Five
-
1 mspassedGiven Seven and Four when we compare them then Seven should be greater than Four
-
1 mspassedGiven Seven and Three when we compare them then Seven should be greater than Three
-
1 mspassedGiven Seven and Two when we compare them then Seven should be greater than Two
-
1 mspassedGiven Six when compared to itself it should be equal
-
1 mspassedGiven Six and Five when we compare them then Six should be greater than Five
-
1 mspassedGiven Six and Four when we compare them then Six should be greater than Four
-
1 mspassedGiven Six and Three when we compare them then Six should be greater than Three
-
0 mspassedGiven Six and Two when we compare them then Six should be greater than Two
-
1 mspassedGiven Five when compared to itself it should be equal
-
1 mspassedGiven Five and Four when we compare them then Five should be greater than Four
-
1 mspassedGiven Five and Three when we compare them then Five should be greater than Three
-
1 mspassedGiven Five and Two when we compare them then Five should be greater than Two
-
1 mspassedGiven Four when compared to itself it should be equal
-
0 mspassedGiven Four and Three when we compare them then Four should be greater than Three
-
0 mspassedGiven Four and Two when we compare them then Four should be greater than Two
-
1 mspassedGiven Three when compared to itself it should be equal
-
0 mspassedGiven Three and Two when we compare them then Three should be greater than Two
-
1 mspassedGiven Two when compared to itself it should be equal
-
-
13 msCards should be accessible by their shortIds
-
3 mspassedCard by 2 should be Two
-
1 mspassedCard by 3 should be Three
-
1 mspassedCard by 4 should be Four
-
0 mspassedCard by 5 should be Five
-
1 mspassedCard by 6 should be Six
-
0 mspassedCard by 7 should be Seven
-
1 mspassedCard by 8 should be Eight
-
1 mspassedCard by 9 should be Nine
-
1 mspassedCard by T should be Ten
-
1 mspassedCard by J should be Jack
-
1 mspassedCard by Q should be Queen
-
1 mspassedCard by K should be King
-
1 mspassedCard by A should be Ace
-
-
11 msTest Hands
-
6 mspassedGiven T32KQ it should be possible to parse it into a Hand with expected cards
-
1 mspassedGiven 32T3K it should be possible to parse it into a Hand with expected cards
-
1 mspassedGiven T55J5 it should be possible to parse it into a Hand with expected cards
-
1 mspassedGiven KK677 it should be possible to parse it into a Hand with expected cards
-
1 mspassedGiven KTJJT it should be possible to parse it into a Hand with expected cards
-
1 mspassedGiven QQQJA it should be possible to parse it into a Hand with expected cards
-
-
22 msTest Hand types
-
1 mspassedSmoke test card comparisons
-
0 mspassedGiven all hand types when we sort them then they should be in order
-
1 mspassedAll hand types should really be all hand types
-
1 mspassedGiven FiveOfAKind when compared to itself it should be equal
-
1 mspassedGiven FiveOfAKind and FourOfAKind when we compare them then FiveOfAKind should be greater than FourOfAKind
-
1 mspassedGiven FiveOfAKind and FullHouse when we compare them then FiveOfAKind should be greater than FullHouse
-
0 mspassedGiven FiveOfAKind and ThreeOfAKind when we compare them then FiveOfAKind should be greater than ThreeOfAKind
-
0 mspassedGiven FiveOfAKind and TwoPair when we compare them then FiveOfAKind should be greater than TwoPair
-
0 mspassedGiven FiveOfAKind and OnePair when we compare them then FiveOfAKind should be greater than OnePair
-
1 mspassedGiven FiveOfAKind and HighCard when we compare them then FiveOfAKind should be greater than HighCard
-
1 mspassedGiven FourOfAKind when compared to itself it should be equal
-
1 mspassedGiven FourOfAKind and FullHouse when we compare them then FourOfAKind should be greater than FullHouse
-
1 mspassedGiven FourOfAKind and ThreeOfAKind when we compare them then FourOfAKind should be greater than ThreeOfAKind
-
1 mspassedGiven FourOfAKind and TwoPair when we compare them then FourOfAKind should be greater than TwoPair
-
1 mspassedGiven FourOfAKind and OnePair when we compare them then FourOfAKind should be greater than OnePair
-
1 mspassedGiven FourOfAKind and HighCard when we compare them then FourOfAKind should be greater than HighCard
-
1 mspassedGiven FullHouse when compared to itself it should be equal
-
0 mspassedGiven FullHouse and ThreeOfAKind when we compare them then FullHouse should be greater than ThreeOfAKind
-
0 mspassedGiven FullHouse and TwoPair when we compare them then FullHouse should be greater than TwoPair
-
0 mspassedGiven FullHouse and OnePair when we compare them then FullHouse should be greater than OnePair
-
0 mspassedGiven FullHouse and HighCard when we compare them then FullHouse should be greater than HighCard
-
1 mspassedGiven ThreeOfAKind when compared to itself it should be equal
-
1 mspassedGiven ThreeOfAKind and TwoPair when we compare them then ThreeOfAKind should be greater than TwoPair
-
0 mspassedGiven ThreeOfAKind and OnePair when we compare them then ThreeOfAKind should be greater than OnePair
-
1 mspassedGiven ThreeOfAKind and HighCard when we compare them then ThreeOfAKind should be greater than HighCard
-
0 mspassedGiven TwoPair when compared to itself it should be equal
-
1 mspassedGiven TwoPair and OnePair when we compare them then TwoPair should be greater than OnePair
-
1 mspassedGiven TwoPair and HighCard when we compare them then TwoPair should be greater than HighCard
-
1 mspassedGiven OnePair when compared to itself it should be equal
-
1 mspassedGiven OnePair and HighCard when we compare them then OnePair should be greater than HighCard
-
2 mspassedGiven HighCard when compared to itself it should be equal
-
-
15 msIt should be possible to calc the type of a Hand
-
1 mspassedGiven AAAAA it should be possible to calc its type as FiveOfAKind
-
0 mspassedGiven AA8AA it should be possible to calc its type as FourOfAKind
-
1 mspassedGiven 23332 it should be possible to calc its type as FullHouse
-
0 mspassedGiven TTT98 it should be possible to calc its type as ThreeOfAKind
-
4 mspassedGiven 23432 it should be possible to calc its type as TwoPair
-
1 mspassedGiven A23A4 it should be possible to calc its type as OnePair
-
1 mspassedGiven 23456 it should be possible to calc its type as HighCard
-
1 mspassedGiven T32KQ it should be possible to calc its type as HighCard
-
3 mspassedGiven 32T3K it should be possible to calc its type as OnePair
-
1 mspassedGiven T55J5 it should be possible to calc its type as ThreeOfAKind
-
1 mspassedGiven KK677 it should be possible to calc its type as TwoPair
-
1 mspassedGiven KTJJT it should be possible to calc its type as TwoPair
-
0 mspassedGiven QQQJA it should be possible to calc its type as ThreeOfAKind
-
-
37 msHands should be comparable
-
34 msHands with different types should be compared by type
-
2 mspassedAll hand types are covered by the test case
-
6 mspassedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be equal to itself
-
1 mspassedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be greater than Hand(cards=[Ace, Ace, Eight, Ace, Ace])
-
0 mspassedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be greater than Hand(cards=[Two, Three, Three, Three, Two])
-
1 mspassedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be greater than Hand(cards=[Ten, Ten, Ten, Nine, Eight])
-
1 mspassedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be greater than Hand(cards=[Two, Three, Four, Three, Two])
-
4 mspassedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be greater than Hand(cards=[Ace, Two, Three, Ace, Four])
-
1 mspassedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be greater than Hand(cards=[Two, Three, Four, Five, Six])
-
1 mspassedHand Hand(cards=[Ace, Ace, Eight, Ace, Ace]) should be equal to itself
-
0 mspassedHand Hand(cards=[Ace, Ace, Eight, Ace, Ace]) should be greater than Hand(cards=[Two, Three, Three, Three, Two])
-
1 mspassedHand Hand(cards=[Ace, Ace, Eight, Ace, Ace]) should be greater than Hand(cards=[Ten, Ten, Ten, Nine, Eight])
-
1 mspassedHand Hand(cards=[Ace, Ace, Eight, Ace, Ace]) should be greater than Hand(cards=[Two, Three, Four, Three, Two])
-
1 mspassedHand Hand(cards=[Ace, Ace, Eight, Ace, Ace]) should be greater than Hand(cards=[Ace, Two, Three, Ace, Four])
-
0 mspassedHand Hand(cards=[Ace, Ace, Eight, Ace, Ace]) should be greater than Hand(cards=[Two, Three, Four, Five, Six])
-
1 mspassedHand Hand(cards=[Two, Three, Three, Three, Two]) should be equal to itself
-
0 mspassedHand Hand(cards=[Two, Three, Three, Three, Two]) should be greater than Hand(cards=[Ten, Ten, Ten, Nine, Eight])
-
0 mspassedHand Hand(cards=[Two, Three, Three, Three, Two]) should be greater than Hand(cards=[Two, Three, Four, Three, Two])
-
2 mspassedHand Hand(cards=[Two, Three, Three, Three, Two]) should be greater than Hand(cards=[Ace, Two, Three, Ace, Four])
-
1 mspassedHand Hand(cards=[Two, Three, Three, Three, Two]) should be greater than Hand(cards=[Two, Three, Four, Five, Six])
-
1 mspassedHand Hand(cards=[Ten, Ten, Ten, Nine, Eight]) should be equal to itself
-
1 mspassedHand Hand(cards=[Ten, Ten, Ten, Nine, Eight]) should be greater than Hand(cards=[Two, Three, Four, Three, Two])
-
3 mspassedHand Hand(cards=[Ten, Ten, Ten, Nine, Eight]) should be greater than Hand(cards=[Ace, Two, Three, Ace, Four])
-
0 mspassedHand Hand(cards=[Ten, Ten, Ten, Nine, Eight]) should be greater than Hand(cards=[Two, Three, Four, Five, Six])
-
1 mspassedHand Hand(cards=[Two, Three, Four, Three, Two]) should be equal to itself
-
1 mspassedHand Hand(cards=[Two, Three, Four, Three, Two]) should be greater than Hand(cards=[Ace, Two, Three, Ace, Four])
-
1 mspassedHand Hand(cards=[Two, Three, Four, Three, Two]) should be greater than Hand(cards=[Two, Three, Four, Five, Six])
-
1 mspassedHand Hand(cards=[Ace, Two, Three, Ace, Four]) should be equal to itself
-
1 mspassedHand Hand(cards=[Ace, Two, Three, Ace, Four]) should be greater than Hand(cards=[Two, Three, Four, Five, Six])
-
0 mspassedHand Hand(cards=[Two, Three, Four, Five, Six]) should be equal to itself
-
-
3 msHands with same types should be compared by their cards
-
1 mspassedHand 33332 should be greater than 2AAAA and they should have the same type
-
1 mspassedHand 77888 should be greater than 77788 and they should have the same type
-
1 mspassedHand 33334 should be greater than 33332 and they should have the same type
-
-
-
4 mspassedHand with bid can be parsed
-
1 mspassedThe example input can be parsed into a list of HandBids
-
9 mspassedGiven the example input then we can calculate the total winning as 6440
-
34 mspassedGiven our custom input then we can calculate the total winning as 246424613
-
-
163 msDay07p2Tests
-
57 msGiven cards we can compare them based on their relative strength
-
6 mspassedSmoke test card comparisons
-
1 mspassedGiven all cards when we sort them then they should be in order
-
2 mspassedAll cards should really be all cards
-
0 mspassedGiven Ace when compared to itself it should be equal
-
0 mspassedGiven Ace and King when we compare them then Ace should be greater than King
-
1 mspassedGiven Ace and Queen when we compare them then Ace should be greater than Queen
-
1 mspassedGiven Ace and Ten when we compare them then Ace should be greater than Ten
-
0 mspassedGiven Ace and Nine when we compare them then Ace should be greater than Nine
-
1 mspassedGiven Ace and Eight when we compare them then Ace should be greater than Eight
-
1 mspassedGiven Ace and Seven when we compare them then Ace should be greater than Seven
-
1 mspassedGiven Ace and Six when we compare them then Ace should be greater than Six
-
0 mspassedGiven Ace and Five when we compare them then Ace should be greater than Five
-
1 mspassedGiven Ace and Four when we compare them then Ace should be greater than Four
-
0 mspassedGiven Ace and Three when we compare them then Ace should be greater than Three
-
0 mspassedGiven Ace and Two when we compare them then Ace should be greater than Two
-
0 mspassedGiven Ace and Joker when we compare them then Ace should be greater than Joker
-
0 mspassedGiven King when compared to itself it should be equal
-
0 mspassedGiven King and Queen when we compare them then King should be greater than Queen
-
0 mspassedGiven King and Ten when we compare them then King should be greater than Ten
-
0 mspassedGiven King and Nine when we compare them then King should be greater than Nine
-
1 mspassedGiven King and Eight when we compare them then King should be greater than Eight
-
0 mspassedGiven King and Seven when we compare them then King should be greater than Seven
-
1 mspassedGiven King and Six when we compare them then King should be greater than Six
-
1 mspassedGiven King and Five when we compare them then King should be greater than Five
-
1 mspassedGiven King and Four when we compare them then King should be greater than Four
-
0 mspassedGiven King and Three when we compare them then King should be greater than Three
-
1 mspassedGiven King and Two when we compare them then King should be greater than Two
-
0 mspassedGiven King and Joker when we compare them then King should be greater than Joker
-
1 mspassedGiven Queen when compared to itself it should be equal
-
1 mspassedGiven Queen and Ten when we compare them then Queen should be greater than Ten
-
1 mspassedGiven Queen and Nine when we compare them then Queen should be greater than Nine
-
1 mspassedGiven Queen and Eight when we compare them then Queen should be greater than Eight
-
0 mspassedGiven Queen and Seven when we compare them then Queen should be greater than Seven
-
0 mspassedGiven Queen and Six when we compare them then Queen should be greater than Six
-
0 mspassedGiven Queen and Five when we compare them then Queen should be greater than Five
-
0 mspassedGiven Queen and Four when we compare them then Queen should be greater than Four
-
0 mspassedGiven Queen and Three when we compare them then Queen should be greater than Three
-
1 mspassedGiven Queen and Two when we compare them then Queen should be greater than Two
-
1 mspassedGiven Queen and Joker when we compare them then Queen should be greater than Joker
-
0 mspassedGiven Ten when compared to itself it should be equal
-
0 mspassedGiven Ten and Nine when we compare them then Ten should be greater than Nine
-
1 mspassedGiven Ten and Eight when we compare them then Ten should be greater than Eight
-
1 mspassedGiven Ten and Seven when we compare them then Ten should be greater than Seven
-
0 mspassedGiven Ten and Six when we compare them then Ten should be greater than Six
-
1 mspassedGiven Ten and Five when we compare them then Ten should be greater than Five
-
1 mspassedGiven Ten and Four when we compare them then Ten should be greater than Four
-
1 mspassedGiven Ten and Three when we compare them then Ten should be greater than Three
-
1 mspassedGiven Ten and Two when we compare them then Ten should be greater than Two
-
0 mspassedGiven Ten and Joker when we compare them then Ten should be greater than Joker
-
0 mspassedGiven Nine when compared to itself it should be equal
-
0 mspassedGiven Nine and Eight when we compare them then Nine should be greater than Eight
-
0 mspassedGiven Nine and Seven when we compare them then Nine should be greater than Seven
-
0 mspassedGiven Nine and Six when we compare them then Nine should be greater than Six
-
0 mspassedGiven Nine and Five when we compare them then Nine should be greater than Five
-
1 mspassedGiven Nine and Four when we compare them then Nine should be greater than Four
-
1 mspassedGiven Nine and Three when we compare them then Nine should be greater than Three
-
0 mspassedGiven Nine and Two when we compare them then Nine should be greater than Two
-
0 mspassedGiven Nine and Joker when we compare them then Nine should be greater than Joker
-
1 mspassedGiven Eight when compared to itself it should be equal
-
0 mspassedGiven Eight and Seven when we compare them then Eight should be greater than Seven
-
0 mspassedGiven Eight and Six when we compare them then Eight should be greater than Six
-
1 mspassedGiven Eight and Five when we compare them then Eight should be greater than Five
-
0 mspassedGiven Eight and Four when we compare them then Eight should be greater than Four
-
1 mspassedGiven Eight and Three when we compare them then Eight should be greater than Three
-
1 mspassedGiven Eight and Two when we compare them then Eight should be greater than Two
-
1 mspassedGiven Eight and Joker when we compare them then Eight should be greater than Joker
-
1 mspassedGiven Seven when compared to itself it should be equal
-
0 mspassedGiven Seven and Six when we compare them then Seven should be greater than Six
-
1 mspassedGiven Seven and Five when we compare them then Seven should be greater than Five
-
1 mspassedGiven Seven and Four when we compare them then Seven should be greater than Four
-
1 mspassedGiven Seven and Three when we compare them then Seven should be greater than Three
-
0 mspassedGiven Seven and Two when we compare them then Seven should be greater than Two
-
1 mspassedGiven Seven and Joker when we compare them then Seven should be greater than Joker
-
1 mspassedGiven Six when compared to itself it should be equal
-
1 mspassedGiven Six and Five when we compare them then Six should be greater than Five
-
1 mspassedGiven Six and Four when we compare them then Six should be greater than Four
-
1 mspassedGiven Six and Three when we compare them then Six should be greater than Three
-
1 mspassedGiven Six and Two when we compare them then Six should be greater than Two
-
0 mspassedGiven Six and Joker when we compare them then Six should be greater than Joker
-
0 mspassedGiven Five when compared to itself it should be equal
-
0 mspassedGiven Five and Four when we compare them then Five should be greater than Four
-
0 mspassedGiven Five and Three when we compare them then Five should be greater than Three
-
1 mspassedGiven Five and Two when we compare them then Five should be greater than Two
-
1 mspassedGiven Five and Joker when we compare them then Five should be greater than Joker
-
1 mspassedGiven Four when compared to itself it should be equal
-
0 mspassedGiven Four and Three when we compare them then Four should be greater than Three
-
1 mspassedGiven Four and Two when we compare them then Four should be greater than Two
-
1 mspassedGiven Four and Joker when we compare them then Four should be greater than Joker
-
1 mspassedGiven Three when compared to itself it should be equal
-
1 mspassedGiven Three and Two when we compare them then Three should be greater than Two
-
0 mspassedGiven Three and Joker when we compare them then Three should be greater than Joker
-
1 mspassedGiven Two when compared to itself it should be equal
-
0 mspassedGiven Two and Joker when we compare them then Two should be greater than Joker
-
0 mspassedGiven Joker when compared to itself it should be equal
-
-
11 msCards should be accessible by their shortIds
-
2 mspassedCard by J should be Joker
-
0 mspassedCard by 2 should be Two
-
2 mspassedCard by 3 should be Three
-
1 mspassedCard by 4 should be Four
-
2 mspassedCard by 5 should be Five
-
0 mspassedCard by 6 should be Six
-
1 mspassedCard by 7 should be Seven
-
1 mspassedCard by 8 should be Eight
-
1 mspassedCard by 9 should be Nine
-
1 mspassedCard by T should be Ten
-
0 mspassedCard by Q should be Queen
-
0 mspassedCard by K should be King
-
0 mspassedCard by A should be Ace
-
-
7 msTest Hands
-
5 mspassedGiven T32KQ it should be possible to parse it into a Hand with expected cards
-
1 mspassedGiven 32T3K it should be possible to parse it into a Hand with expected cards
-
0 mspassedGiven T55J5 it should be possible to parse it into a Hand with expected cards
-
1 mspassedGiven KK677 it should be possible to parse it into a Hand with expected cards
-
0 mspassedGiven KTJJT it should be possible to parse it into a Hand with expected cards
-
0 mspassedGiven QQQJA it should be possible to parse it into a Hand with expected cards
-
-
16 msTest Hand types
-
1 mspassedSmoke test card comparisons
-
0 mspassedGiven all hand types when we sort them then they should be in order
-
1 mspassedAll hand types should really be all hand types
-
1 mspassedGiven FiveOfAKind when compared to itself it should be equal
-
1 mspassedGiven FiveOfAKind and FourOfAKind when we compare them then FiveOfAKind should be greater than FourOfAKind
-
0 mspassedGiven FiveOfAKind and FullHouse when we compare them then FiveOfAKind should be greater than FullHouse
-
0 mspassedGiven FiveOfAKind and ThreeOfAKind when we compare them then FiveOfAKind should be greater than ThreeOfAKind
-
0 mspassedGiven FiveOfAKind and TwoPair when we compare them then FiveOfAKind should be greater than TwoPair
-
0 mspassedGiven FiveOfAKind and OnePair when we compare them then FiveOfAKind should be greater than OnePair
-
0 mspassedGiven FiveOfAKind and HighCard when we compare them then FiveOfAKind should be greater than HighCard
-
0 mspassedGiven FourOfAKind when compared to itself it should be equal
-
0 mspassedGiven FourOfAKind and FullHouse when we compare them then FourOfAKind should be greater than FullHouse
-
1 mspassedGiven FourOfAKind and ThreeOfAKind when we compare them then FourOfAKind should be greater than ThreeOfAKind
-
1 mspassedGiven FourOfAKind and TwoPair when we compare them then FourOfAKind should be greater than TwoPair
-
1 mspassedGiven FourOfAKind and OnePair when we compare them then FourOfAKind should be greater than OnePair
-
0 mspassedGiven FourOfAKind and HighCard when we compare them then FourOfAKind should be greater than HighCard
-
0 mspassedGiven FullHouse when compared to itself it should be equal
-
0 mspassedGiven FullHouse and ThreeOfAKind when we compare them then FullHouse should be greater than ThreeOfAKind
-
0 mspassedGiven FullHouse and TwoPair when we compare them then FullHouse should be greater than TwoPair
-
0 mspassedGiven FullHouse and OnePair when we compare them then FullHouse should be greater than OnePair
-
0 mspassedGiven FullHouse and HighCard when we compare them then FullHouse should be greater than HighCard
-
1 mspassedGiven ThreeOfAKind when compared to itself it should be equal
-
1 mspassedGiven ThreeOfAKind and TwoPair when we compare them then ThreeOfAKind should be greater than TwoPair
-
1 mspassedGiven ThreeOfAKind and OnePair when we compare them then ThreeOfAKind should be greater than OnePair
-
1 mspassedGiven ThreeOfAKind and HighCard when we compare them then ThreeOfAKind should be greater than HighCard
-
1 mspassedGiven TwoPair when compared to itself it should be equal
-
2 mspassedGiven TwoPair and OnePair when we compare them then TwoPair should be greater than OnePair
-
1 mspassedGiven TwoPair and HighCard when we compare them then TwoPair should be greater than HighCard
-
1 mspassedGiven OnePair when compared to itself it should be equal
-
0 mspassedGiven OnePair and HighCard when we compare them then OnePair should be greater than HighCard
-
0 mspassedGiven HighCard when compared to itself it should be equal
-
-
8 msIt should be possible to calc the type of a Hand
-
0 mspassedGiven QJJQ2 it should be possible to calc its type as FourOfAKind
-
1 mspassedGiven JKKK2 it should be possible to calc its type as FourOfAKind
-
1 mspassedGiven AAAAA it should be possible to calc its type as FiveOfAKind
-
1 mspassedGiven AA8AA it should be possible to calc its type as FourOfAKind
-
0 mspassedGiven 23332 it should be possible to calc its type as FullHouse
-
0 mspassedGiven TTT98 it should be possible to calc its type as ThreeOfAKind
-
0 mspassedGiven 23432 it should be possible to calc its type as TwoPair
-
0 mspassedGiven A23A4 it should be possible to calc its type as OnePair
-
0 mspassedGiven 23456 it should be possible to calc its type as HighCard
-
0 mspassedGiven T32KQ it should be possible to calc its type as HighCard
-
1 mspassedGiven 32T3K it should be possible to calc its type as OnePair
-
0 mspassedGiven T55J5 it should be possible to calc its type as FourOfAKind
-
0 mspassedGiven KK677 it should be possible to calc its type as TwoPair
-
0 mspassedGiven KTJJT it should be possible to calc its type as FourOfAKind
-
1 mspassedGiven QQQJA it should be possible to calc its type as FourOfAKind
-
1 mspassedGiven JJJJJ it should be possible to calc its type as FiveOfAKind
-
0 mspassedGiven JJJJ2 it should be possible to calc its type as FiveOfAKind
-
1 mspassedGiven JJJ23 it should be possible to calc its type as FourOfAKind
-
0 mspassedGiven JJ234 it should be possible to calc its type as ThreeOfAKind
-
1 mspassedGiven J2345 it should be possible to calc its type as OnePair
-
-
28 msHands should be comparable
-
21 msHands with different types should be compared by type
-
1 mspassedAll hand types are covered by the test case
-
3 mspassedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be equal to itself
-
1 mspassedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be greater than Hand(cards=[Ace, Ace, Eight, Ace, Ace])
-
1 mspassedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be greater than Hand(cards=[Two, Three, Three, Three, Two])
-
1 mspassedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be greater than Hand(cards=[Ten, Ten, Ten, Nine, Eight])
-
1 mspassedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be greater than Hand(cards=[Two, Three, Four, Three, Two])
-
1 mspassedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be greater than Hand(cards=[Ace, Two, Three, Ace, Four])
-
1 mspassedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be greater than Hand(cards=[Two, Three, Four, Five, Six])
-
0 mspassedHand Hand(cards=[Ace, Ace, Eight, Ace, Ace]) should be equal to itself
-
1 mspassedHand Hand(cards=[Ace, Ace, Eight, Ace, Ace]) should be greater than Hand(cards=[Two, Three, Three, Three, Two])
-
0 mspassedHand Hand(cards=[Ace, Ace, Eight, Ace, Ace]) should be greater than Hand(cards=[Ten, Ten, Ten, Nine, Eight])
-
0 mspassedHand Hand(cards=[Ace, Ace, Eight, Ace, Ace]) should be greater than Hand(cards=[Two, Three, Four, Three, Two])
-
1 mspassedHand Hand(cards=[Ace, Ace, Eight, Ace, Ace]) should be greater than Hand(cards=[Ace, Two, Three, Ace, Four])
-
0 mspassedHand Hand(cards=[Ace, Ace, Eight, Ace, Ace]) should be greater than Hand(cards=[Two, Three, Four, Five, Six])
-
1 mspassedHand Hand(cards=[Two, Three, Three, Three, Two]) should be equal to itself
-
1 mspassedHand Hand(cards=[Two, Three, Three, Three, Two]) should be greater than Hand(cards=[Ten, Ten, Ten, Nine, Eight])
-
1 mspassedHand Hand(cards=[Two, Three, Three, Three, Two]) should be greater than Hand(cards=[Two, Three, Four, Three, Two])
-
0 mspassedHand Hand(cards=[Two, Three, Three, Three, Two]) should be greater than Hand(cards=[Ace, Two, Three, Ace, Four])
-
1 mspassedHand Hand(cards=[Two, Three, Three, Three, Two]) should be greater than Hand(cards=[Two, Three, Four, Five, Six])
-
1 mspassedHand Hand(cards=[Ten, Ten, Ten, Nine, Eight]) should be equal to itself
-
0 mspassedHand Hand(cards=[Ten, Ten, Ten, Nine, Eight]) should be greater than Hand(cards=[Two, Three, Four, Three, Two])
-
1 mspassedHand Hand(cards=[Ten, Ten, Ten, Nine, Eight]) should be greater than Hand(cards=[Ace, Two, Three, Ace, Four])
-
1 mspassedHand Hand(cards=[Ten, Ten, Ten, Nine, Eight]) should be greater than Hand(cards=[Two, Three, Four, Five, Six])
-
0 mspassedHand Hand(cards=[Two, Three, Four, Three, Two]) should be equal to itself
-
0 mspassedHand Hand(cards=[Two, Three, Four, Three, Two]) should be greater than Hand(cards=[Ace, Two, Three, Ace, Four])
-
0 mspassedHand Hand(cards=[Two, Three, Four, Three, Two]) should be greater than Hand(cards=[Two, Three, Four, Five, Six])
-
1 mspassedHand Hand(cards=[Ace, Two, Three, Ace, Four]) should be equal to itself
-
1 mspassedHand Hand(cards=[Ace, Two, Three, Ace, Four]) should be greater than Hand(cards=[Two, Three, Four, Five, Six])
-
0 mspassedHand Hand(cards=[Two, Three, Four, Five, Six]) should be equal to itself
-
-
7 msHands with same types should be compared by their cards
-
1 mspassedHand 33332 should be greater than 2AAAA and they should have the same type
-
1 mspassedHand 77888 should be greater than 77788 and they should have the same type
-
1 mspassedHand 33334 should be greater than 33332 and they should have the same type
-
2 mspassedHand QQQQ2 should be greater than JKKK2 and they should have the same type
-
1 mspassedHand KTJJT should be greater than QQQJA and they should have the same type
-
1 mspassedHand QQQJA should be greater than T55J5 and they should have the same type
-
0 mspassedHand KTJJT should be greater than T55J5 and they should have the same type
-
-
-
6 mspassedHand with bid can be parsed
-
1 mspassedThe example input can be parsed into a list of HandBids
-
4 mspassedGiven the example input then we can calculate the total winning as 5905
-
25 mspassedGiven our custom input then we can calculate the total winning as 246424613
-
-
86 msDay08p1Tests
-
3 mspassedGiven a reference as "ABC" then it should be possible to represent as a NodeId
-
4 mspassedCreating a Node should be possible with plain strings as well
-
3 mspassedGiven a "AAA = (BBB, CCC)" then it should be possible to parse it as Node
-
6 mspassedGiven a text with a series of nodes then it should be possible to parse it as a Network
-
2 mspassedGiven a sequence of Node lines then it should be possible to parse it as a Network
-
4 msparsing instructions
-
0 mspassedGiven an instruction list of "RL" then it should be possible to parse it as [Right, Left]
-
1 mspassedGiven an instruction list of "LR" then it should be possible to parse it as [Left, Right]
-
1 mspassedGiven an instruction list of "LL" then it should be possible to parse it as [Left, Left]
-
0 mspassedGiven an instruction list of "RR" then it should be possible to parse it as [Right, Right]
-
1 mspassedGiven an instruction list of "LLR" then it should be possible to parse it as [Left, Left, Right]
-
1 mspassedGiven an instruction list of "RRL" then it should be possible to parse it as [Right, Right, Left]
-
-
35 mspassedGiven Example documents 1 then it should be parse it as an Instruction List and a Network
-
2 mspassedGiven Example documents 2 then it should be parse it as an Instruction List and a Network
-
3 mspassedGiven Example documents 1 then it should be possible to calculate the number of steps from start to finish as 2
-
1 mspassedGiven Example documents 2 then it should be possible to calculate the number of steps from start to finish as 6
-
23 mspassedGiven our custom documents then it should be possible to calculate the number of steps from start to finish as 13939
-
-
71 msDay08p2Tests
-
2 mspassedGiven a reference as "ABC" then it should be possible to represent as a NodeId
-
4 mspassedCreating a Node should be possible with plain strings as well
-
2 mspassedGiven a "AAA = (BBB, CCC)" then it should be possible to parse it as Node
-
2 msnode ids can tell about themselves if they are a starting or ending or neither
-
0 mspassedGiven a node id 11A then it should be possible to tell if it is starting or ending or neither
-
0 mspassedGiven a node id 22A then it should be possible to tell if it is starting or ending or neither
-
1 mspassedGiven a node id 11Z then it should be possible to tell if it is starting or ending or neither
-
0 mspassedGiven a node id 22Z then it should be possible to tell if it is starting or ending or neither
-
0 mspassedGiven a node id 11B then it should be possible to tell if it is starting or ending or neither
-
1 mspassedGiven a node id 22B then it should be possible to tell if it is starting or ending or neither
-
-
5 mspassedGiven a text with a series of nodes then it should be possible to parse it as a Network
-
2 mspassedGiven a sequence of Node lines then it should be possible to parse it as a Network
-
4 msparsing instructions
-
1 mspassedGiven an instruction list of "RL" then it should be possible to parse it as [Right, Left]
-
1 mspassedGiven an instruction list of "LR" then it should be possible to parse it as [Left, Right]
-
1 mspassedGiven an instruction list of "LL" then it should be possible to parse it as [Left, Left]
-
0 mspassedGiven an instruction list of "RR" then it should be possible to parse it as [Right, Right]
-
1 mspassedGiven an instruction list of "LLR" then it should be possible to parse it as [Left, Left, Right]
-
0 mspassedGiven an instruction list of "RRL" then it should be possible to parse it as [Right, Right, Left]
-
-
1 mspassedGiven Example documents 1 then it should be parse it as an Instruction List and a Network
-
1 mspassedGiven Example documents 2 then it should be parse it as an Instruction List and a Network
-
3 mspassedGiven Example documents 1 then it should be possible to calculate the number of steps from start to finish as 2
-
1 mspassedGiven Example documents 2 then it should be possible to calculate the number of steps from start to finish as 6
-
11 mspassedGiven Example documents 3 then it should be possible to calculate the number of steps from start to finish as 6
-
33 mspassedGiven our custom documents then it should be possible to calculate the number of steps from start to finish as 8906539031197
-
-
48 msDay09p1Tests
-
11 msparsing OASIS reports
-
4 mspassedGiven "0 3 6 9 12 15" then we can parse it as History(entries=[0, 3, 6, 9, 12, 15])
-
2 mspassedGiven "1 3 6 10 15 21" then we can parse it as History(entries=[1, 3, 6, 10, 15, 21])
-
1 mspassedGiven "10 13 16 21 30 45" then we can parse it as History(entries=[10, 13, 16, 21, 30, 45])
-
1 mspassedGiven "10 15 15 10 0 -15 -35 -60 -90 -125 -165 -210 -260 -315 -375 -440 -510 -585 -665 -750 -840" then we can parse it as History(entries=[10, 15, 15, 10, 0, -15, -35, -60, -90, -125, -165, -210, -260, -315, -375, -440, -510, -585, -665, -750, -840])
-
3 mspassedGiven "0 3 6 9 12 15 1 3 6 10 15 21 10 13 16 21 30 45" then we can parse it as OASIS Report
-
-
3 msCalculating diff series
-
0 mspassedGiven "[0, 3, 6, 9, 12, 15]" then the diff series should be "[3, 3, 3, 3, 3]"
-
1 mspassedGiven "[3, 3, 3, 3, 3]" then the diff series should be "[0, 0, 0, 0]"
-
0 mspassedGiven "[1, 3, 6, 10, 15, 21]" then the diff series should be "[2, 3, 4, 5, 6]"
-
1 mspassedGiven "[2, 3, 4, 5, 6]" then the diff series should be "[1, 1, 1, 1]"
-
0 mspassedGiven "[1, 1, 1, 1]" then the diff series should be "[0, 0, 0]"
-
0 mspassedGiven "[10, 13, 16, 21, 30, 45]" then the diff series should be "[3, 3, 5, 9, 15]"
-
1 mspassedGiven "[3, 3, 5, 9, 15]" then the diff series should be "[0, 2, 4, 6]"
-
0 mspassedGiven "[0, 2, 4, 6]" then the diff series should be "[2, 2, 2]"
-
0 mspassedGiven "[2, 2, 2]" then the diff series should be "[0, 0]"
-
-
3 msFiguring out if it a series is all 0-s
-
0 mspassedGiven "[0, 3, 6, 9, 12, 15]" then it should be not all 0
-
0 mspassedGiven "[3, 3, 3, 3, 3]" then it should be not all 0
-
0 mspassedGiven "[0, 0, 0, 0]" then it should be all 0
-
0 mspassedGiven "[1, 3, 6, 10, 15, 21]" then it should be not all 0
-
1 mspassedGiven "[2, 3, 4, 5, 6]" then it should be not all 0
-
0 mspassedGiven "[1, 1, 1, 1]" then it should be not all 0
-
0 mspassedGiven "[0, 0, 0]" then it should be all 0
-
0 mspassedGiven "[10, 13, 16, 21, 30, 45]" then it should be not all 0
-
0 mspassedGiven "[3, 3, 5, 9, 15]" then it should be not all 0
-
1 mspassedGiven "[0, 2, 4, 6]" then it should be not all 0
-
1 mspassedGiven "[2, 2, 2]" then it should be not all 0
-
0 mspassedGiven "[0, 0]" then it should be all 0
-
-
2 msPredicting next value
-
0 mspassedGiven "[0, 3, 6, 9, 12, 15]" then the next value should be "18"
-
1 mspassedGiven "[1, 3, 6, 10, 15, 21]" then the next value should be "28"
-
1 mspassedGiven "[10, 13, 16, 21, 30, 45]" then the next value should be "68"
-
-
1 mspassedGiven 0 3 6 9 12 15 1 3 6 10 15 21 10 13 16 21 30 45 then the sum of all predicted next values should be 114
-
28 mspassedGiven our custom OASIS report then the sum of all predicted next values should be 1834108701
-
-
86 msDay09p2Tests
-
9 msparsing OASIS reports
-
4 mspassedGiven "0 3 6 9 12 15" then we can parse it as History(entries=[0, 3, 6, 9, 12, 15])
-
0 mspassedGiven "1 3 6 10 15 21" then we can parse it as History(entries=[1, 3, 6, 10, 15, 21])
-
1 mspassedGiven "10 13 16 21 30 45" then we can parse it as History(entries=[10, 13, 16, 21, 30, 45])
-
1 mspassedGiven "10 15 15 10 0 -15 -35 -60 -90 -125 -165 -210 -260 -315 -375 -440 -510 -585 -665 -750 -840" then we can parse it as History(entries=[10, 15, 15, 10, 0, -15, -35, -60, -90, -125, -165, -210, -260, -315, -375, -440, -510, -585, -665, -750, -840])
-
3 mspassedGiven "0 3 6 9 12 15 1 3 6 10 15 21 10 13 16 21 30 45" then we can parse it as OASIS Report
-
-
5 msCalculating diff series
-
1 mspassedGiven "[0, 3, 6, 9, 12, 15]" then the diff series should be "[3, 3, 3, 3, 3]"
-
0 mspassedGiven "[3, 3, 3, 3, 3]" then the diff series should be "[0, 0, 0, 0]"
-
0 mspassedGiven "[1, 3, 6, 10, 15, 21]" then the diff series should be "[2, 3, 4, 5, 6]"
-
0 mspassedGiven "[2, 3, 4, 5, 6]" then the diff series should be "[1, 1, 1, 1]"
-
1 mspassedGiven "[1, 1, 1, 1]" then the diff series should be "[0, 0, 0]"
-
1 mspassedGiven "[10, 13, 16, 21, 30, 45]" then the diff series should be "[3, 3, 5, 9, 15]"
-
0 mspassedGiven "[3, 3, 5, 9, 15]" then the diff series should be "[0, 2, 4, 6]"
-
1 mspassedGiven "[0, 2, 4, 6]" then the diff series should be "[2, 2, 2]"
-
1 mspassedGiven "[2, 2, 2]" then the diff series should be "[0, 0]"
-
-
5 msFiguring out if it a series is all 0-s
-
0 mspassedGiven "[0, 3, 6, 9, 12, 15]" then it should be not all 0
-
0 mspassedGiven "[3, 3, 3, 3, 3]" then it should be not all 0
-
1 mspassedGiven "[0, 0, 0, 0]" then it should be all 0
-
1 mspassedGiven "[1, 3, 6, 10, 15, 21]" then it should be not all 0
-
1 mspassedGiven "[2, 3, 4, 5, 6]" then it should be not all 0
-
0 mspassedGiven "[1, 1, 1, 1]" then it should be not all 0
-
0 mspassedGiven "[0, 0, 0]" then it should be all 0
-
0 mspassedGiven "[10, 13, 16, 21, 30, 45]" then it should be not all 0
-
0 mspassedGiven "[3, 3, 5, 9, 15]" then it should be not all 0
-
1 mspassedGiven "[0, 2, 4, 6]" then it should be not all 0
-
0 mspassedGiven "[2, 2, 2]" then it should be not all 0
-
1 mspassedGiven "[0, 0]" then it should be all 0
-
-
2 msPredicting next value
-
1 mspassedGiven "[0, 3, 6, 9, 12, 15]" then the next value should be "18"
-
0 mspassedGiven "[1, 3, 6, 10, 15, 21]" then the next value should be "28"
-
1 mspassedGiven "[10, 13, 16, 21, 30, 45]" then the next value should be "68"
-
-
1 mspassedGiven 0 3 6 9 12 15 1 3 6 10 15 21 10 13 16 21 30 45 then the sum of all predicted next values should be 114
-
29 mspassedGiven our custom OASIS report then the sum of all predicted next values should be 1834108701
-
3 msPredicting previous value
-
1 mspassedGiven "[0, 3, 6, 9, 12, 15]" then the previous value should be "-3"
-
1 mspassedGiven "[1, 3, 6, 10, 15, 21]" then the previous value should be "0"
-
1 mspassedGiven "[10, 13, 16, 21, 30, 45]" then the previous value should be "5"
-
-
3 mspassedGiven 0 3 6 9 12 15 1 3 6 10 15 21 10 13 16 21 30 45 then the sum of all predicted previous values should be 2
-
29 mspassedGiven our custom OASIS report then the sum of all predicted previous values should be 993
-
-
67 msDay10p1Tests
-
6 msCoordinates and directions
-
3 mspassedGiven Coordinate(row=0, column=0) and north then the result should be Coordinate(row=-1, column=0)
-
0 mspassedGiven Coordinate(row=0, column=0) and south then the result should be Coordinate(row=1, column=0)
-
0 mspassedGiven Coordinate(row=0, column=0) and east then the result should be Coordinate(row=0, column=1)
-
1 mspassedGiven Coordinate(row=0, column=0) and west then the result should be Coordinate(row=0, column=-1)
-
1 mspassedGiven north then the reverse should be south
-
1 mspassedGiven south then the reverse should be north
-
-
4 msPipe types and directions
-
0 mspassedGiven | then the possible directions should be [north, south]
-
0 mspassedGiven - then the possible directions should be [east, west]
-
1 mspassedGiven L then the possible directions should be [north, east]
-
1 mspassedGiven J then the possible directions should be [north, west]
-
1 mspassedGiven 7 then the possible directions should be [south, west]
-
1 mspassedGiven F then the possible directions should be [south, east]
-
0 mspassedGiven dot then the possible directions should be []
-
-
10 msMap parsing
-
3 mspassedGiven ..... .S-7. .|.|. .L-J. ..... then the start coordinate should be Coordinate(row=1, column=1)
-
1 mspassedGiven ..F7. .FJ|. SJ.L7 |F--J LJ... then the start coordinate should be Coordinate(row=2, column=0)
-
1 mspassedGiven 7-F7- .FJ|7 SJLL7 |F--J LJ.LJ then the start coordinate should be Coordinate(row=2, column=0)
-
2 mspassedGiven ..... .S-7. .|.|. .L-J. ..... then the pipe type at Coordinate(row=1, column=1), based on neighbors, should be F
-
3 mspassedGiven ..... .S-7. .|.|. .L-J. ..... then we should be able to parse the Map and find the start at Coordinate(row=1, column=1) and the start pipe type as F
-
0 mspassedGiven ..F7. .FJ|. SJ.L7 |F--J LJ... then the pipe type at Coordinate(row=2, column=0), based on neighbors, should be F
-
0 mspassedGiven ..F7. .FJ|. SJ.L7 |F--J LJ... then we should be able to parse the Map and find the start at Coordinate(row=2, column=0) and the start pipe type as F
-
0 mspassedGiven 7-F7- .FJ|7 SJLL7 |F--J LJ.LJ then the pipe type at Coordinate(row=2, column=0), based on neighbors, should be F
-
0 mspassedGiven 7-F7- .FJ|7 SJLL7 |F--J LJ.LJ then we should be able to parse the Map and find the start at Coordinate(row=2, column=0) and the start pipe type as F
-
-
47 msCalculating the number of steps to farthest loop point
-
1 mspassedGiven example map 1, then the number of steps to get to the farthest point of the loop should be 4
-
1 mspassedGiven example map 2, then the number of steps to get to the farthest point of the loop should be 8
-
1 mspassedGiven example map 3, then the number of steps to get to the farthest point of the loop should be 8
-
44 mspassedGiven custom input map, then the number of steps to get to the farthest point of the loop should be 6599
-
-
-
537 msDay10p2Tests
-
6 msCoordinates and directions
-
2 mspassedGiven Coordinate(row=0, column=0) and north then the result should be Coordinate(row=-1, column=0)
-
1 mspassedGiven Coordinate(row=0, column=0) and south then the result should be Coordinate(row=1, column=0)
-
0 mspassedGiven Coordinate(row=0, column=0) and east then the result should be Coordinate(row=0, column=1)
-
1 mspassedGiven Coordinate(row=0, column=0) and west then the result should be Coordinate(row=0, column=-1)
-
1 mspassedGiven north then the reverse should be south
-
1 mspassedGiven south then the reverse should be north
-
-
4 msPipe types and directions
-
0 mspassedGiven | then the possible directions should be [north, south]
-
1 mspassedGiven - then the possible directions should be [east, west]
-
1 mspassedGiven L then the possible directions should be [north, east]
-
1 mspassedGiven J then the possible directions should be [north, west]
-
1 mspassedGiven 7 then the possible directions should be [south, west]
-
0 mspassedGiven F then the possible directions should be [south, east]
-
0 mspassedGiven dot then the possible directions should be []
-
-
16 msMap parsing
-
2 mspassedGiven ..... .S-7. .|.|. .L-J. ..... then the start coordinate should be Coordinate(row=1, column=1)
-
1 mspassedGiven ..F7. .FJ|. SJ.L7 |F--J LJ... then the start coordinate should be Coordinate(row=2, column=0)
-
1 mspassedGiven 7-F7- .FJ|7 SJLL7 |F--J LJ.LJ then the start coordinate should be Coordinate(row=2, column=0)
-
4 mspassedGiven ..... .S-7. .|.|. .L-J. ..... then the pipe type at Coordinate(row=1, column=1), based on neighbors, should be F
-
4 mspassedGiven ..... .S-7. .|.|. .L-J. ..... then we should be able to parse the Map and find the start at Coordinate(row=1, column=1) and the start pipe type as F
-
1 mspassedGiven ..F7. .FJ|. SJ.L7 |F--J LJ... then the pipe type at Coordinate(row=2, column=0), based on neighbors, should be F
-
1 mspassedGiven ..F7. .FJ|. SJ.L7 |F--J LJ... then we should be able to parse the Map and find the start at Coordinate(row=2, column=0) and the start pipe type as F
-
1 mspassedGiven 7-F7- .FJ|7 SJLL7 |F--J LJ.LJ then the pipe type at Coordinate(row=2, column=0), based on neighbors, should be F
-
1 mspassedGiven 7-F7- .FJ|7 SJLL7 |F--J LJ.LJ then we should be able to parse the Map and find the start at Coordinate(row=2, column=0) and the start pipe type as F
-
-
51 msCalculating the number of steps to farthest loop point
-
1 mspassedGiven example map 1, then the number of steps to get to the farthest point of the loop should be 4
-
1 mspassedGiven example map 2, then the number of steps to get to the farthest point of the loop should be 8
-
1 mspassedGiven example map 3, then the number of steps to get to the farthest point of the loop should be 8
-
48 mspassedGiven custom input map, then the number of steps to get to the farthest point of the loop should be 6599
-
-
8 msEnlarging map
-
6 mspassedGiven ..... .S-7. .|.|. .L-J. ....., then the enlarged map should be .......... .......... ..S---7... ..|...|... ..|...|... ..|...|... ..L---J... .......... .......... ..........
-
1 mspassedGiven ..F7. .FJ|. SJ.L7 |F--J LJ..., then the enlarged map should be ....F-7... ....|.|... ..F-J.|... ..|...|... S-J...L-7. |.......|. |.F-----J. |.|....... L-J....... ..........
-
1 mspassedGiven 7-F7- .FJ|7 SJLL7 |F--J LJ.LJ, then the enlarged map should be ....F-7... ....|.|... ..F-J.|... ..|...|... S-J...L-7. |.......|. |.F-----J. |.|....... L-J....... ..........
-
-
95 msCalculating the number of steps to farthest loop point on enlarged maps
-
1 mspassedGiven enlarged example map 1, then the number of steps to get to the farthest point of the loop should be 8
-
3 mspassedGiven enlarged example map 2, then the number of steps to get to the farthest point of the loop should be 16
-
1 mspassedGiven enlarged example map 3, then the number of steps to get to the farthest point of the loop should be 16
-
90 mspassedGiven enlarged custom input map, then the number of steps to get to the farthest point of the loop should be 13198
-
-
25 msMark inside/outside regions in the enlarged map
-
3 mspassedGiven ..... .S-7. .|.|. .L-J. ....., then the enlarged and marked map should be OOOOOOOOOO OOOOOOOOOO OOS---7OOO OO|III|OOO OO|III|OOO OO|III|OOO OOL---JOOO OOOOOOOOOO OOOOOOOOOO OOOOOOOOOO
-
1 mspassedGiven ..F7. .FJ|. SJ.L7 |F--J LJ..., then the enlarged and marked map should be OOOOF-7OOO OOOO|I|OOO OOF-JI|OOO OO|III|OOO S-JIIIL-7O |IIIIIII|O |IF-----JO |I|OOOOOOO L-JOOOOOOO OOOOOOOOOO
-
2 mspassedGiven 7-F7- .FJ|7 SJLL7 |F--J LJ.LJ, then the enlarged and marked map should be OOOOF-7OOO OOOO|I|OOO OOF-JI|OOO OO|III|OOO S-JIIIL-7O |IIIIIII|O |IF-----JO |I|OOOOOOO L-JOOOOOOO OOOOOOOOOO
-
4 mspassedGiven ........... .S-------7. .|F-----7|. .||.....||. .||.....||. .|L-7.F-J|. .|..|.|..|. .L--J.L--J. ..........., then the enlarged and marked map should be OOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOO OOS---------------7OOO OO|IIIIIIIIIIIIIII|OOO OO|IF-----------7I|OOO OO|I|OOOOOOOOOOO|I|OOO OO|I|OOOOOOOOOOO|I|OOO OO|I|OOOOOOOOOOO|I|OOO OO|I|OOOOOOOOOOO|I|OOO OO|I|OOOOOOOOOOO|I|OOO OO|IL---7OOOF---JI|OOO OO|IIIII|OOO|IIIII|OOO OO|IIIII|OOO|IIIII|OOO OO|IIIII|OOO|IIIII|OOO OOL-----JOOOL-----JOOO OOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOO
-
3 mspassedGiven .......... .S------7. .|F----7|. .||....||. .||....||. .|L-7F-J|. .|..||..|. .L--JL--J. .........., then the enlarged and marked map should be OOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOO OOS-------------7OOO OO|IIIIIIIIIIIII|OOO OO|IF---------7I|OOO OO|I|OOOOOOOOO|I|OOO OO|I|OOOOOOOOO|I|OOO OO|I|OOOOOOOOO|I|OOO OO|I|OOOOOOOOO|I|OOO OO|I|OOOOOOOOO|I|OOO OO|IL---7OF---JI|OOO OO|IIIII|O|IIIII|OOO OO|IIIII|O|IIIII|OOO OO|IIIII|O|IIIII|OOO OOL-----JOL-----JOOO OOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOO
-
8 mspassedGiven .F----7F7F7F7F-7.... .|F--7||||||||FJ.... .||.FJ||||||||L7.... FJL7L7LJLJ||LJ.L-7.. L--J.L7...LJS7F-7L7. ....F-J..F7FJ|L7L7L7 ....L7.F7||L7|.L7L7| .....|FJLJ|FJ|F7|.LJ ....FJL-7.||.||||... ....L---J.LJ.LJLJ..., then the enlarged and marked map should be OOF---------7OF-7OF-7OF-7OF---7OOOOOOOOO OO|IIIIIIIII|O|I|O|I|O|I|O|III|OOOOOOOOO OO|IF-----7I|O|I|O|I|O|I|O|IF-JOOOOOOOOO OO|I|OOOOO|I|O|I|O|I|O|I|O|I|OOOOOOOOOOO OO|I|OOOF-JI|O|I|O|I|O|I|O|IL-7OOOOOOOOO OO|I|OOO|III|O|I|O|I|O|I|O|III|OOOOOOOOO F-JIL-7OL-7IL-JIL-JI|O|IL-JIIIL---7OOOOO |IIIII|OOO|IIIIIIIII|O|IIIIIIIIIII|OOOOO L-----JOOOL-7IIIIIIIL-JIS-7IF---7IL-7OOO OOOOOOOOOOOO|IIIIIIIIIII|O|I|OOO|III|OOO OOOOOOOOF---JIIIIIF-7IF-JO|IL-7OL-7IL-7O OOOOOOOO|IIIIIIIII|O|I|OOO|III|OOO|III|O OOOOOOOOL-7IIIF-7I|O|IL-7O|IIIL-7OL-7I|O OOOOOOOOOO|III|O|I|O|III|O|IIIII|OOO|I|O OOOOOOOOOO|IF-JOL-JO|IF-JO|IF-7I|OOOL-JO OOOOOOOOOO|I|OOOOOOO|I|OOO|I|O|I|OOOOOOO OOOOOOOOF-JIL---7OOO|I|OOO|I|O|I|OOOOOOO OOOOOOOO|IIIIIII|OOO|I|OOO|I|O|I|OOOOOOO OOOOOOOOL-------JOOOL-JOOOL-JOL-JOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
-
4 mspassedGiven FF7FSF7F7F7F7F7F---7 L|LJ||||||||||||F--J FL-7LJLJ||||||LJL-77 F--JF--7||LJLJ7F7FJ- L---JF-JLJ.||-FJLJJ7 |F|F-JF---7F7-L7L|7| |FFJF7L7F-JF7|JL---7 7-L-JL7||F7|L7F-7F7| L.L7LFJ|||||FJL7||LJ L7JLJL-JLJLJL--JLJ.L, then the enlarged and marked map should be OOF-7OF-SOF-7OF-7OF-7OF-7OF-7OF-------7O OO|I|O|I|O|I|O|I|O|I|O|I|O|I|O|IIIIIII|O OO|IL-JI|O|I|O|I|O|I|O|I|O|I|O|IF-----JO OO|IIIII|O|I|O|I|O|I|O|I|O|I|O|I|OOOOOOO OOL---7IL-JIL-JI|O|I|O|I|O|IL-JIL---7OOO OOOOOO|IIIIIIIII|O|I|O|I|O|IIIIIIIII|OOO F-----JIF-----7I|O|IL-JIL-JIIIF-7IF-JOOO |IIIIIII|OOOOO|I|O|IIIIIIIIIII|O|I|OOOOO L-------JOF---JIL-JIIIIIIIIIF-JOL-JOOOOO OOOOOOOOOO|IIIIIIIIIIIIIIIII|OOOOOOOOOOO OOOOOOF---JIF-------7IIIIIIIL-7OOOOOOOOO OOOOOO|IIIII|OOOOOOO|IIIIIIIII|OOOOOOOOO OOOOF-JIF-7IL-7OF---JIF-7IIIIIL-------7O OOOO|III|O|III|O|IIIII|O|IIIIIIIIIIIII|O OOOOL---JOL-7I|O|IF-7I|OL-7IF---7IF-7I|O OOOOOOOOOOOO|I|O|I|O|I|OOO|I|OOO|I|O|I|O OOOOOOOOOOF-JI|O|I|O|I|OF-JIL-7O|I|OL-JO OOOOOOOOOO|III|O|I|O|I|O|IIIII|O|I|OOOOO OOOOOOOOOOL---JOL-JOL-JOL-----JOL-JOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
-
-
32 msMark inside/outside regions in the map
-
5 mspassedGiven ..... .S-7. .|.|. .L-J. ....., then the enlarged and marked map should be OOOOO OS-7O O|I|O OL-JO OOOOO
-
1 mspassedGiven ..F7. .FJ|. SJ.L7 |F--J LJ..., then the enlarged and marked map should be OOF7O OFJ|O SJIL7 |F--J LJOOO
-
2 mspassedGiven 7-F7- .FJ|7 SJLL7 |F--J LJ.LJ, then the enlarged and marked map should be OOF7O OFJ|O SJIL7 |F--J LJOOO
-
3 mspassedGiven ........... .S-------7. .|F-----7|. .||.....||. .||.....||. .|L-7.F-J|. .|..|.|..|. .L--J.L--J. ..........., then the enlarged and marked map should be OOOOOOOOOOO OS-------7O O|F-----7|O O||OOOOO||O O||OOOOO||O O|L-7OF-J|O O|II|O|II|O OL--JOL--JO OOOOOOOOOOO
-
6 mspassedGiven .......... .S------7. .|F----7|. .||....||. .||....||. .|L-7F-J|. .|..||..|. .L--JL--J. .........., then the enlarged and marked map should be OOOOOOOOOO OS------7O O|F----7|O O||OOOO||O O||OOOO||O O|L-7F-J|O O|II||II|O OL--JL--JO OOOOOOOOOO
-
9 mspassedGiven .F----7F7F7F7F-7.... .|F--7||||||||FJ.... .||.FJ||||||||L7.... FJL7L7LJLJ||LJ.L-7.. L--J.L7...LJS7F-7L7. ....F-J..F7FJ|L7L7L7 ....L7.F7||L7|.L7L7| .....|FJLJ|FJ|F7|.LJ ....FJL-7.||.||||... ....L---J.LJ.LJLJ..., then the enlarged and marked map should be OF----7F7F7F7F-7OOOO O|F--7||||||||FJOOOO O||OFJ||||||||L7OOOO FJL7L7LJLJ||LJIL-7OO L--JOL7IIILJS7F-7L7O OOOOF-JIIF7FJ|L7L7L7 OOOOL7IF7||L7|IL7L7| OOOOO|FJLJ|FJ|F7|OLJ OOOOFJL-7O||O||||OOO OOOOL---JOLJOLJLJOOO
-
6 mspassedGiven FF7FSF7F7F7F7F7F---7 L|LJ||||||||||||F--J FL-7LJLJ||||||LJL-77 F--JF--7||LJLJ7F7FJ- L---JF-JLJ.||-FJLJJ7 |F|F-JF---7F7-L7L|7| |FFJF7L7F-JF7|JL---7 7-L-JL7||F7|L7F-7F7| L.L7LFJ|||||FJL7||LJ L7JLJL-JLJLJL--JLJ.L, then the enlarged and marked map should be OF7FSF7F7F7F7F7F---7 O|LJ||||||||||||F--J OL-7LJLJ||||||LJL-7O F--JF--7||LJLJIF7FJO L---JF-JLJIIIIFJLJOO OOOF-JF---7IIIL7OOOO OOFJF7L7F-JF7IIL---7 OOL-JL7||F7|L7F-7F7| OOOOOFJ|||||FJL7||LJ OOOOOL-JLJLJL--JLJOO
-
-
300 msTiles enclosed by the loop
-
2 mspassedGiven example map 1, then the number of enclosed tiles should be 1
-
1 mspassedGiven example map 2, then the number of enclosed tiles should be 1
-
2 mspassedGiven example map 3, then the number of enclosed tiles should be 1
-
4 mspassedGiven example map 4, then the number of enclosed tiles should be 4
-
3 mspassedGiven example map 5, then the number of enclosed tiles should be 4
-
7 mspassedGiven example map 6, then the number of enclosed tiles should be 8
-
5 mspassedGiven example map 7, then the number of enclosed tiles should be 10
-
276 mspassedGiven custom input map, then the number of enclosed tiles should be 477
-
-
-
41 msDay11p1Tests
-
8 mspassedGiven the example image then it should be parsed as an expected Universe
-
4 mspassedGiven the example image when parsed as an Universe and converted back to an image then we should get back the original image
-
6 mspassedGiven the example image the expanded universe looks as expected
-
2 msDistance between galaxies
-
1 mspassedGiven Galaxy(coordinate=Coordinate(row=0, column=0)) and Galaxy(coordinate=Coordinate(row=0, column=0)) then they should have a distance of 0
-
0 mspassedGiven Galaxy(coordinate=Coordinate(row=0, column=0)) and Galaxy(coordinate=Coordinate(row=0, column=1)) then they should have a distance of 1
-
0 mspassedGiven Galaxy(coordinate=Coordinate(row=0, column=0)) and Galaxy(coordinate=Coordinate(row=1, column=0)) then they should have a distance of 1
-
0 mspassedGiven Galaxy(coordinate=Coordinate(row=6, column=1)) and Galaxy(coordinate=Coordinate(row=11, column=5)) then they should have a distance of 9
-
1 mspassedGiven Galaxy(coordinate=Coordinate(row=0, column=4)) and Galaxy(coordinate=Coordinate(row=10, column=9)) then they should have a distance of 15
-
0 mspassedGiven Galaxy(coordinate=Coordinate(row=2, column=0)) and Galaxy(coordinate=Coordinate(row=7, column=12)) then they should have a distance of 17
-
0 mspassedGiven Galaxy(coordinate=Coordinate(row=11, column=0)) and Galaxy(coordinate=Coordinate(row=11, column=5)) then they should have a distance of 5
-
-
21 msSum of all shortest paths between galaxies
-
1 mspassedGiven Example image, then the sum of all shortest paths between galaxies should be 374
-
20 mspassedGiven Custom image, then the sum of all shortest paths between galaxies should be 9521776
-
-
-
59 msDay11p2Tests
-
8 mspassedGiven the example image then it should be parsed as an expected Universe
-
5 mspassedGiven the example image when parsed as an Universe and converted back to an image then we should get back the original image
-
5 mspassedGiven the example image the expanded universe looks as expected
-
1 msDistance between galaxies
-
0 mspassedGiven Galaxy(coordinate=Coordinate(row=0, column=0)) and Galaxy(coordinate=Coordinate(row=0, column=0)) then they should have a distance of 0
-
0 mspassedGiven Galaxy(coordinate=Coordinate(row=0, column=0)) and Galaxy(coordinate=Coordinate(row=0, column=1)) then they should have a distance of 1
-
0 mspassedGiven Galaxy(coordinate=Coordinate(row=0, column=0)) and Galaxy(coordinate=Coordinate(row=1, column=0)) then they should have a distance of 1
-
1 mspassedGiven Galaxy(coordinate=Coordinate(row=6, column=1)) and Galaxy(coordinate=Coordinate(row=11, column=5)) then they should have a distance of 9
-
0 mspassedGiven Galaxy(coordinate=Coordinate(row=0, column=4)) and Galaxy(coordinate=Coordinate(row=10, column=9)) then they should have a distance of 15
-
0 mspassedGiven Galaxy(coordinate=Coordinate(row=2, column=0)) and Galaxy(coordinate=Coordinate(row=7, column=12)) then they should have a distance of 17
-
0 mspassedGiven Galaxy(coordinate=Coordinate(row=11, column=0)) and Galaxy(coordinate=Coordinate(row=11, column=5)) then they should have a distance of 5
-
-
40 msSum of all shortest paths between galaxies
-
1 mspassedGiven Example image and expansion rate = 2, then the sum of all shortest paths between galaxies should be 374
-
1 mspassedGiven Example image and expansion rate = 10, then the sum of all shortest paths between galaxies should be 1030
-
1 mspassedGiven Example image and expansion rate = 100, then the sum of all shortest paths between galaxies should be 8410
-
19 mspassedGiven Custom image and expansion rate = 2, then the sum of all shortest paths between galaxies should be 9521776
-
18 mspassedGiven Custom image and expansion rate = 1000000, then the sum of all shortest paths between galaxies should be 553224415344
-
-
-
121 msDay12p1Tests
-
24 msCondition record converting between text input and model
-
0 mspassedGiven a condition record character of "." then the expected parsed value should be "operational"
-
9 mspassedGiven a condition record character of "." when parsed and then converted back to text then we should get the original input
-
1 mspassedGiven a condition record character of "#" then the expected parsed value should be "broken"
-
1 mspassedGiven a condition record character of "#" when parsed and then converted back to text then we should get the original input
-
0 mspassedGiven a condition record character of "?" then the expected parsed value should be "unknown"
-
1 mspassedGiven a condition record character of "?" when parsed and then converted back to text then we should get the original input
-
0 mspassedGiven a condition record row 1 of "." then the expected parsed value should be "[operational]"
-
2 mspassedGiven a condition record row 1 of "." when parsed and then converted back to text then we should get the original input
-
0 mspassedGiven a condition record row 1 of "#" then the expected parsed value should be "[broken]"
-
1 mspassedGiven a condition record row 1 of "#" when parsed and then converted back to text then we should get the original input
-
0 mspassedGiven a condition record row 1 of "?" then the expected parsed value should be "[unknown]"
-
1 mspassedGiven a condition record row 1 of "?" when parsed and then converted back to text then we should get the original input
-
1 mspassedGiven a condition record row 1 of ".." then the expected parsed value should be "[operational, operational]"
-
1 mspassedGiven a condition record row 1 of ".." when parsed and then converted back to text then we should get the original input
-
0 mspassedGiven a condition record row 1 of "#.#.###" then the expected parsed value should be "[broken, operational, broken, operational, broken, broken, broken]"
-
1 mspassedGiven a condition record row 1 of "#.#.###" when parsed and then converted back to text then we should get the original input
-
0 mspassedGiven a condition record row 1 of "???.###" then the expected parsed value should be "[unknown, unknown, unknown, operational, broken, broken, broken]"
-
0 mspassedGiven a condition record row 1 of "???.###" when parsed and then converted back to text then we should get the original input
-
2 mspassedGiven an integer list of "1,1,3" then the expected parsed value should be "[1, 1, 3]"
-
0 mspassedGiven an integer list of "1,3,1,6" then the expected parsed value should be "[1, 3, 1, 6]"
-
2 mspassedGiven a condition record row of "#.#.### 1,1,3" then the expected parsed value should be "ConditionRecordRow(hotSprings=[broken, operational, broken, operational, broken, broken, broken], contGroupOfDamagedSprings=[1, 1, 3])"
-
0 mspassedGiven a condition record row of "#.#.### 1,1,3" when parsed and then the hotsprings converted back to text and parsed again then we should get the same hotsprings
-
0 mspassedGiven a condition record row of "???.### 1,1,3" then the expected parsed value should be "ConditionRecordRow(hotSprings=[unknown, unknown, unknown, operational, broken, broken, broken], contGroupOfDamagedSprings=[1, 1, 3])"
-
1 mspassedGiven a condition record row of "???.### 1,1,3" when parsed and then the hotsprings converted back to text and parsed again then we should get the same hotsprings
-
-
2 msContiguous group of damaged springs
-
2 mspassedGiven a condition record row of "#.#.### 1,1,3" then the calculated contiguous group of damaged springs (from the hot springs) should be the same as the list provided
-
0 mspassedGiven a condition record row of ".#...#....###. 1,1,3" then the calculated contiguous group of damaged springs (from the hot springs) should be the same as the list provided
-
0 mspassedGiven a condition record row of ".#.###.#.###### 1,3,1,6" then the calculated contiguous group of damaged springs (from the hot springs) should be the same as the list provided
-
0 mspassedGiven a condition record row of "####.#...#... 4,1,1" then the calculated contiguous group of damaged springs (from the hot springs) should be the same as the list provided
-
0 mspassedGiven a condition record row of "#....######..#####. 1,6,5" then the calculated contiguous group of damaged springs (from the hot springs) should be the same as the list provided
-
0 mspassedGiven a condition record row of ".###.##....# 3,2,1" then the calculated contiguous group of damaged springs (from the hot springs) should be the same as the list provided
-
-
95 msGenerate solutions
-
3 mspassedGiven a condition record row of "#.#.### 1,1,3" then the expected solutions should be "[#.#.###]"
-
1 mspassedGiven a condition record row of "???.### 1,1,3" then the expected solutions should be "[#.#.###]"
-
1 mspassedGiven a condition record row of ".??..??...?##. 1,1,3" then the expected solutions should be "[.#...#....###., ..#..#....###., ..#...#...###., .#....#...###.]"
-
2 mspassedGiven a condition record row of "?###???????? 3,2,1" then the expected solutions should be "[.###.##.#..., .###.##..#.., .###.##...#., .###.##....#, .###..##.#.., .###..##..#., .###..##...#, .###...##.#., .###...##..#, .###....##.#]"
-
3 mspassedGiven a condition record row of "#.#.### 1,1,3" then the expected number of solutions is 1
-
0 mspassedGiven a condition record row of "???.### 1,1,3" then the expected number of solutions is 1
-
1 mspassedGiven a condition record row of ".??..??...?##. 1,1,3" then the expected number of solutions is 4
-
1 mspassedGiven a condition record row of "?#?#?#?#?#?#?#? 1,3,1,6" then the expected number of solutions is 1
-
0 mspassedGiven a condition record row of "????.#...#... 4,1,1" then the expected number of solutions is 1
-
1 mspassedGiven a condition record row of "????.######..#####. 1,6,5" then the expected number of solutions is 4
-
1 mspassedGiven a condition record row of "?###???????? 3,2,1" then the expected number of solutions is 10
-
2 mspassedGiven a condition record titled example input then the expected total number of solutions is 21
-
79 mspassedGiven a condition record titled custom input then the expected total number of solutions is 6827
-
-
-
636 msDay12p2Tests
-
15 msCondition record converting between text input and model
-
1 mspassedGiven a condition record character of "." then the expected parsed value should be "operational"
-
1 mspassedGiven a condition record character of "." when parsed and then converted back to text then we should get the original input
-
1 mspassedGiven a condition record character of "#" then the expected parsed value should be "broken"
-
0 mspassedGiven a condition record character of "#" when parsed and then converted back to text then we should get the original input
-
1 mspassedGiven a condition record character of "?" then the expected parsed value should be "unknown"
-
0 mspassedGiven a condition record character of "?" when parsed and then converted back to text then we should get the original input
-
1 mspassedGiven a condition record row 1 of "." then the expected parsed value should be "[operational]"
-
1 mspassedGiven a condition record row 1 of "." when parsed and then converted back to text then we should get the original input
-
0 mspassedGiven a condition record row 1 of "#" then the expected parsed value should be "[broken]"
-
1 mspassedGiven a condition record row 1 of "#" when parsed and then converted back to text then we should get the original input
-
0 mspassedGiven a condition record row 1 of "?" then the expected parsed value should be "[unknown]"
-
0 mspassedGiven a condition record row 1 of "?" when parsed and then converted back to text then we should get the original input
-
1 mspassedGiven a condition record row 1 of ".." then the expected parsed value should be "[operational, operational]"
-
0 mspassedGiven a condition record row 1 of ".." when parsed and then converted back to text then we should get the original input
-
0 mspassedGiven a condition record row 1 of "#.#.###" then the expected parsed value should be "[broken, operational, broken, operational, broken, broken, broken]"
-
1 mspassedGiven a condition record row 1 of "#.#.###" when parsed and then converted back to text then we should get the original input
-
0 mspassedGiven a condition record row 1 of "???.###" then the expected parsed value should be "[unknown, unknown, unknown, operational, broken, broken, broken]"
-
1 mspassedGiven a condition record row 1 of "???.###" when parsed and then converted back to text then we should get the original input
-
2 mspassedGiven an integer list of "1,1,3" then the expected parsed value should be "[1, 1, 3]"
-
0 mspassedGiven an integer list of "1,3,1,6" then the expected parsed value should be "[1, 3, 1, 6]"
-
2 mspassedGiven a condition record row of "#.#.### 1,1,3" then the expected parsed value should be "ConditionRecordRow(hotSprings=[broken, operational, broken, operational, broken, broken, broken], contGroupOfDamagedSprings=[1, 1, 3])"
-
0 mspassedGiven a condition record row of "#.#.### 1,1,3" when parsed and then the hotsprings converted back to text and parsed again then we should get the same hotsprings
-
0 mspassedGiven a condition record row of "???.### 1,1,3" then the expected parsed value should be "ConditionRecordRow(hotSprings=[unknown, unknown, unknown, operational, broken, broken, broken], contGroupOfDamagedSprings=[1, 1, 3])"
-
1 mspassedGiven a condition record row of "???.### 1,1,3" when parsed and then the hotsprings converted back to text and parsed again then we should get the same hotsprings
-
-
2 msplacing map
-
1 mspassedGiven a condition record row of "#.#.### 1,1,3" then the expected parsed value should have the following placing map "[(1, [0]), (1, [2]), (3, [4])]"
-
1 mspassedGiven a condition record row of "???.### 1,1,3" then the expected parsed value should have the following placing map "[(1, [0]), (1, [2]), (3, [4])]"
-
-
109 msGenerate folded (part 1) solutions
-
10 mspassedGiven a condition record row of "#.#.### 1,1,3" then the expected solutions should be "[#.#.###]"
-
1 mspassedGiven a condition record row of "???.### 1,1,3" then the expected solutions should be "[#.#.###]"
-
1 mspassedGiven a condition record row of ".??..??...?##. 1,1,3" then the expected solutions should be "[.#...#....###., ..#..#....###., ..#...#...###., .#....#...###.]"
-
1 mspassedGiven a condition record row of "?###???????? 3,2,1" then the expected solutions should be "[.###.##.#..., .###.##..#.., .###.##...#., .###.##....#, .###..##.#.., .###..##..#., .###..##...#, .###...##.#., .###...##..#, .###....##.#]"
-
4 mspassedGiven a condition record row of "#.#.### 1,1,3" then the expected number of solutions is 1
-
1 mspassedGiven a condition record row of "???.### 1,1,3" then the expected number of solutions is 1
-
1 mspassedGiven a condition record row of ".??..??...?##. 1,1,3" then the expected number of solutions is 4
-
1 mspassedGiven a condition record row of "?#?#?#?#?#?#?#? 1,3,1,6" then the expected number of solutions is 1
-
1 mspassedGiven a condition record row of "????.#...#... 4,1,1" then the expected number of solutions is 1
-
0 mspassedGiven a condition record row of "????.######..#####. 1,6,5" then the expected number of solutions is 4
-
1 mspassedGiven a condition record row of "?###???????? 3,2,1" then the expected number of solutions is 10
-
2 mspassedGiven a condition record titled example input then the expected total number of solutions is 21
-
85 mspassedGiven a condition record titled custom input then the expected total number of solutions is 6827
-
-
9 msUnfold condition record rows
-
8 mspassedGiven a condition record row of ".# 1" then the expected unfolded condition record row should be ".#?.#?.#?.#?.# 1,1,1,1,1"
-
1 mspassedGiven a condition record row of "???.### 1,1,3" then the expected unfolded condition record row should be "???.###????.###????.###????.###????.### 1,1,3,1,1,3,1,1,3,1,1,3,1,1,3"
-
-
501 msGenerate unfolded (part 2) solutions
-
1 mspassedGiven a condition record row of "#.#.### 1,1,3" when unfolded then the expected number of solutions is 1
-
1 mspassedGiven a condition record row of "???.### 1,1,3" when unfolded then the expected number of solutions is 1
-
1 mspassedGiven a condition record row of ".??..??...?##. 1,1,3" when unfolded then the expected number of solutions is 16384
-
1 mspassedGiven a condition record row of "?#?#?#?#?#?#?#? 1,3,1,6" when unfolded then the expected number of solutions is 1
-
2 mspassedGiven a condition record row of "????.#...#... 4,1,1" when unfolded then the expected number of solutions is 16
-
3 mspassedGiven a condition record row of "????.######..#####. 1,6,5" when unfolded then the expected number of solutions is 2500
-
3 mspassedGiven a condition record row of "?###???????? 3,2,1" when unfolded then the expected number of solutions is 506250
-
5 mspassedGiven a condition record titled example input when unfolded then the expected total number of solutions is 525152
-
484 mspassedGiven a condition record titled custom input when unfolded then the expected total number of solutions is 1537505634471
-
-
-
118 msDay13p1Tests
-
7 mspassedGiven the example patterns then it can be parsed correctly as 2 patterns
-
6 mstest transpose
-
5 mspassedGiven listOf("ab") then transposed it is expected to be listOf("a", "b")
-
1 mspassedGiven [[a]] then transposed it is expected to be [[a]]
-
0 mspassedGiven [[a, b]] then transposed it is expected to be [[a], [b]]
-
0 mspassedGiven [[a, b, c]] then transposed it is expected to be [[a], [b], [c]]
-
-
105 msFinding mirror position in a pattern
-
17 mspassedGiven a pattern of "#.##..##." then the expected vertical mirror position is 5
-
55 mspassedGiven a pattern of "..#.##.#." then the expected vertical mirror position is 5
-
2 mspassedGiven a pattern of "##......#" then the expected vertical mirror position is 5
-
1 mspassed(1) Given a pattern of "##......#" then the expected vertical mirror position is 5
-
1 mspassed(1) Given a pattern of "..#.##.#." then the expected vertical mirror position is 5
-
3 mspassedGiven a pattern of "..##..##." then the expected vertical mirror position is 5
-
0 mspassedGiven a pattern of "#.#.##.#." then the expected vertical mirror position is 5
-
0 mspassedGiven example pattern 1 then the expected (vertical) mirror position is 5
-
2 mspassedGiven example pattern 2 then the expected (vertical) mirror position is 4
-
2 mspassedGiven example pattern 3 then the expected (vertical) mirror position is 16
-
1 mspassedGiven example pattern 3 then the expected (vertical) mirror position is 8
-
1 mspassedGiven Example Patterns then the expected score is 405
-
20 mspassedGiven Custom Patterns then the expected score is 33780
-
-
-
73 msDay13p2Tests
-
6 mspassedGiven the example patterns then it can be parsed correctly as 2 patterns
-
5 mstest transpose
-
4 mspassedGiven listOf("ab") then transposed it is expected to be listOf("a", "b")
-
0 mspassedGiven [[a]] then transposed it is expected to be [[a]]
-
0 mspassedGiven [[a, b]] then transposed it is expected to be [[a], [b]]
-
1 mspassedGiven [[a, b, c]] then transposed it is expected to be [[a], [b], [c]]
-
-
29 msFinding mirror position in a pattern
-
1 mspassedGiven a pattern of "#.##..##." then the expected vertical mirror position is 5
-
2 mspassedGiven a pattern of "..#.##.#." then the expected vertical mirror position is 5
-
1 mspassedGiven a pattern of "##......#" then the expected vertical mirror position is 5
-
1 mspassed(1) Given a pattern of "##......#" then the expected vertical mirror position is 5
-
2 mspassed(1) Given a pattern of "..#.##.#." then the expected vertical mirror position is 5
-
3 mspassedGiven a pattern of "..##..##." then the expected vertical mirror position is 5
-
0 mspassedGiven a pattern of "#.#.##.#." then the expected vertical mirror position is 5
-
1 mspassedGiven example pattern 1 then the expected (vertical) mirror position is 5
-
0 mspassedGiven example pattern 2 then the expected (horizontal) mirror position is 4
-
1 mspassedGiven example pattern 3 then the expected (vertical) mirror position is 16
-
1 mspassedGiven example pattern 3 then the expected (vertical) mirror position is
-
0 mspassedGiven Example Patterns then the expected score is 405
-
16 mspassedGiven Custom Patterns then the expected score is 33780
-
-
33 msFind smudge
-
1 mspassedGiven example pattern 1 then after the smudge is fixed the mirror position score should be 300
-
1 mspassedGiven example pattern 2 then after the smudge is fixed the mirror position score should be 100
-
1 mspassedGiven Example Patterns when finding and fixing smudge then the expected score is 400
-
30 mspassedGiven Custom Patterns when finding and fixing smudge then the expected score is 23479
-
-
-
23 msDay14p1Tests
-
7 mspassedGiven the example platform when tilted north then it looks as expected
-
3 mspassedGiven the example platform when tilted north then the total load is 136
-
13 mspassedGiven the custom platform when tilted north then the total load is 106990
-
-
702 msDay14p2Tests
-
8 mspassedGiven the example platform when tilted north then it looks as expected
-
3 mspassedGiven the example platform when tilted north then the total load is 136
-
9 mspassedGiven the custom platform when tilted north then the total load is 106990
-
8 mstest spinning
-
1 mspassedGiven the example platform when spun for 1 cycle then it looks as expected
-
2 mspassedGiven the example platform when spun for 2 cycles then it looks as expected
-
1 mspassedGiven the example platform when spun for 1 + 1 cycles then it looks as expected
-
3 mspassedGiven the example platform when spun for 3 cycles then it looks as expected
-
1 mspassedGiven the example platform when spun for 1 + 1 + 1 cycles then it looks as expected
-
-
8 mspassedGiven the example platform when spun for 1 000 000 000 cycles then the total load is 64
-
666 mspassedGiven the custom platform when spun for 1 000 000 000 cycles then the total load is 100531
-
-
17 msDay15p1Tests
-
3 msTests with HASH
-
2 mspassedGiven the example input of "H" when running HASH("H") then the result is 200
-
1 mspassedGiven the example input of "HA" when running HASH("HA") then the result is 153
-
0 mspassedGiven the example input of "HAS" when running HASH("HAS") then the result is 172
-
0 mspassedGiven the example input of "HASH" when running HASH("HASH") then the result is 52
-
-
6 msTests with exampleInitSeqInput
-
1 mspassedGiven the example input of "rn=1,cm-,qp=3,cm=2,qp-,pc=4,ot=9,ab=5,pc-,pc=6,ot=7" when parsing the init sequence then the result is [rn=1, cm-, qp=3, cm=2, qp-, pc=4, ot=9, ab=5, pc-, pc=6, ot=7]
-
0 mspassedGiven the example input of "rn=1" when running HASH("rn=1") then the result is 30
-
0 mspassedGiven the example input of "cm-" when running HASH("cm-") then the result is 253
-
0 mspassedGiven the example input of "qp=3" when running HASH("qp=3") then the result is 97
-
1 mspassedGiven the example input of "cm=2" when running HASH("cm=2") then the result is 47
-
0 mspassedGiven the example input of "qp-" when running HASH("qp-") then the result is 14
-
1 mspassedGiven the example input of "pc=4" when running HASH("pc=4") then the result is 180
-
1 mspassedGiven the example input of "ot=9" when running HASH("ot=9") then the result is 9
-
0 mspassedGiven the example input of "ab=5" when running HASH("ab=5") then the result is 197
-
1 mspassedGiven the example input of "pc-" when running HASH("pc-") then the result is 48
-
1 mspassedGiven the example input of "pc=6" when running HASH("pc=6") then the result is 214
-
0 mspassedGiven the example input of "ot=7" when running HASH("ot=7") then the result is 231
-
-
1 mspassedGiven the example init sequence when running HASH for all parts the sum of the hashes is 1320
-
7 mspassedGiven the custom init sequence when running HASH for all parts the sum of the hashes is 516804
-
-
33 msDay15p2Tests
-
6 msTests with HASH
-
4 mspassedGiven the example input of "H" when running HASH("H") then the result is 200
-
1 mspassedGiven the example input of "HA" when running HASH("HA") then the result is 153
-
1 mspassedGiven the example input of "HAS" when running HASH("HAS") then the result is 172
-
0 mspassedGiven the example input of "HASH" when running HASH("HASH") then the result is 52
-
-
7 msTests with exampleInitSeqInput
-
1 mspassedGiven the example input of "rn=1,cm-,qp=3,cm=2,qp-,pc=4,ot=9,ab=5,pc-,pc=6,ot=7" when parsing the init sequence the steps then the result is [AddLens(lens=Lens(label=rn, hash=0), focalLength=1), RemoveLens(lens=Lens(label=cm, hash=0)), AddLens(lens=Lens(label=qp, hash=1), focalLength=3), AddLens(lens=Lens(label=cm, hash=0), focalLength=2), RemoveLens(lens=Lens(label=qp, hash=1)), AddLens(lens=Lens(label=pc, hash=3), focalLength=4), AddLens(lens=Lens(label=ot, hash=3), focalLength=9), AddLens(lens=Lens(label=ab, hash=3), focalLength=5), RemoveLens(lens=Lens(label=pc, hash=3)), AddLens(lens=Lens(label=pc, hash=3), focalLength=6), AddLens(lens=Lens(label=ot, hash=3), focalLength=7)]
-
0 mspassedGiven the lens label of "rn=1" when running HASH("rn") then the result is 0
-
1 mspassedGiven the lens label of "cm-" when running HASH("cm") then the result is 0
-
1 mspassedGiven the lens label of "qp=3" when running HASH("qp") then the result is 1
-
0 mspassedGiven the lens label of "cm=2" when running HASH("cm") then the result is 0
-
0 mspassedGiven the lens label of "qp-" when running HASH("qp") then the result is 1
-
1 mspassedGiven the lens label of "pc=4" when running HASH("pc") then the result is 3
-
0 mspassedGiven the lens label of "ot=9" when running HASH("ot") then the result is 3
-
1 mspassedGiven the lens label of "ab=5" when running HASH("ab") then the result is 3
-
1 mspassedGiven the lens label of "pc-" when running HASH("pc") then the result is 3
-
1 mspassedGiven the lens label of "pc=6" when running HASH("pc") then the result is 3
-
0 mspassedGiven the lens label of "ot=7" when running HASH("ot") then the result is 3
-
-
5 mspassedGiven the example init sequence when processing the steps the total focusing power is 145
-
15 mspassedGiven the custom init sequence when processing the steps the total focusing power is 231844
-
-
58 msDay16p1Tests
-
11 mstesting light directions and mirrors/splitters
-
9 mspassedGiven light going Right then directions should be [Right] (on empty space), [Up] (on slash mirror), [Down] (on backslash mirror), [Up, Down] (on vertical splitter), [Right] (on horizontal splitter)
-
1 mspassedGiven light going Left then directions should be [Left] (on empty space), [Down] (on slash mirror), [Up] (on backslash mirror), [Up, Down] (on vertical splitter), [Left] (on horizontal splitter)
-
1 mspassedGiven light going Up then directions should be [Up] (on empty space), [Right] (on slash mirror), [Left] (on backslash mirror), [Up] (on vertical splitter), [Left, Right] (on horizontal splitter)
-
0 mspassedGiven light going Down then directions should be [Down] (on empty space), [Left] (on slash mirror), [Right] (on backslash mirror), [Down] (on vertical splitter), [Left, Right] (on horizontal splitter)
-
-
2 msparsing tile types
-
0 mspassedGiven tile sign . then tile type should be EmptySpace
-
1 mspassedGiven tile sign / then tile type should be SlashMirror
-
0 mspassedGiven tile sign \ then tile type should be BackslashMirror
-
0 mspassedGiven tile sign | then tile type should be VerticalSplitter
-
1 mspassedGiven tile sign - then tile type should be HorizontalSplitter
-
-
7 mspassedGiven the example contraction when parsed then it looks as expected
-
4 mspassedGiven the example contraption when parsed and the light beam simulated then the light beams and energized tiles should look as expected
-
3 mspassedGiven the example contraption when parsed and light beams simulated then the number of energized tiles should be 46
-
31 mspassedGiven the custom contraption when parsed and light beams simulated then the number of energized tiles should be 8539
-
-
1.26 sDay16p2Tests
-
11 mstesting light directions and mirrors/splitters
-
9 mspassedGiven light going Right then directions should be [Right] (on empty space), [Up] (on slash mirror), [Down] (on backslash mirror), [Up, Down] (on vertical splitter), [Right] (on horizontal splitter)
-
0 mspassedGiven light going Left then directions should be [Left] (on empty space), [Down] (on slash mirror), [Up] (on backslash mirror), [Up, Down] (on vertical splitter), [Left] (on horizontal splitter)
-
1 mspassedGiven light going Up then directions should be [Up] (on empty space), [Right] (on slash mirror), [Left] (on backslash mirror), [Up] (on vertical splitter), [Left, Right] (on horizontal splitter)
-
1 mspassedGiven light going Down then directions should be [Down] (on empty space), [Left] (on slash mirror), [Right] (on backslash mirror), [Down] (on vertical splitter), [Left, Right] (on horizontal splitter)
-
-
2 msparsing tile types
-
1 mspassedGiven tile sign . then tile type should be EmptySpace
-
0 mspassedGiven tile sign / then tile type should be SlashMirror
-
0 mspassedGiven tile sign \ then tile type should be BackslashMirror
-
1 mspassedGiven tile sign | then tile type should be VerticalSplitter
-
0 mspassedGiven tile sign - then tile type should be HorizontalSplitter
-
-
7 mspassedGiven the example contraction when parsed then it looks as expected
-
7 mspassedGiven the example contraption when parsed and the light beam simulated then the light beams and energized tiles should look as expected
-
2 mspassedGiven the example contraption when parsed and light beams simulated then the number of energized tiles should be 46
-
36 mspassedGiven the custom contraption when parsed and light beams simulated then the number of energized tiles should be 8539
-
2 mspassedGiven the example contraption when parsed and the light beam simulated from (Down, 0, 3) then the light beams and energized tiles should look as expected
-
11 mspassedGiven the example contraption when parsed and light beams simulated then the max number of energized tiles should be 51
-
1.18 spassedGiven the custom contraption when parsed and light beams simulated then the max number of energized tiles should be 8674
-
-
3.03 sDay17p1Tests
-
6 mspassedGiven the example heat loss map then it can be parsed from text and turned back into text
-
10 mspassedGiven the custom heat loss map then it can be parsed from text and turned back into text
-
80 mspassedGiven the example heat loss map when the minimized heat loss path is calculated then the result is 102
-
2.93 spassedGiven the custom heat loss map when the minimized heat loss path is calculated then the result is 1110
-
-
32.53 sDay17p2Tests
-
7 mspassedGiven the example heat loss map 1 then it can be parsed from text and turned back into text
-
8 mspassedGiven the custom heat loss map then it can be parsed from text and turned back into text
-
42 mspassedGiven the example heat loss map 1 when the minimized heat loss path is calculated then the result is 94
-
3 mspassedGiven the example heat loss map 2 when the minimized heat loss path is calculated then the result is 71
-
32.47 spassedGiven the custom heat loss map when the minimized heat loss path is calculated then the result is 1294
-
-
331 msDay18p1Tests
-
15 mspassedGiven the example dig plan then it can be parsed
-
7 mspassedGiven the example dig plan then it should form a loop with the length of 38 and size of 10 x 7
-
8 mspassedGiven the example dig plan when we dig it out then it should look as expected
-
2 mspassedGiven the example dig plan then the lava capacity is 62
-
299 mspassedGiven the custom dig plan then the lava capacity is 49578
-
-
177 msDay18p2Tests
-
10 mspassed(Original) Given the example dig plan then it can be parsed
-
1 mspassedGiven the example dig plan then it can be parsed
-
6 mspassed(Original) Given the example dig plan then it should form a loop with the length of 38 and size 10 x 7
-
1 mspassedGiven the example dig plan then it should form a loop with the length of 6405262 and size 1186329 x 1186329
-
4 mspassed(Original) Given the custom dig plan then it should form a loop with the length of 3466 and size 264 x 387
-
4 mspassedGiven the custom dig plan then it should form a loop with the length of 176096896 and size 12454594 x 20066754
-
18 mspassed(Original) Given the example dig plan when we dig it out then it should look as expected
-
2 mspassedGiven the example dig plan when we dig it out then it should look as expected
-
1 mspassed(Original) Given the example dig plan then the lava capacity is 62
-
2 mspassedGiven the example dig plan then the lava capacity is 952408144115
-
61 mspassed(Original) Given the custom dig plan (with original parsing) then the lava capacity is 49578
-
67 mspassedGiven the custom dig plan (with original parsing) then the lava capacity is 52885384955882
-
-
29 msDay19p1Tests
-
14 msparsing
-
2 mspassedGiven a part rating of "{x=787,m=2655,a=1222,s=2876}" then it can be correctly parsed as Part(x=Rating(value=787), m=Rating(value=2655), a=Rating(value=1222), s=Rating(value=2876)) with a total of 7540
-
0 mspassedGiven a part rating of "{x=1679,m=44,a=2067,s=496}" then it can be correctly parsed as Part(x=Rating(value=1679), m=Rating(value=44), a=Rating(value=2067), s=Rating(value=496)) with a total of 4286
-
0 mspassedGiven a part rating of "{x=2036,m=264,a=79,s=2244}" then it can be correctly parsed as Part(x=Rating(value=2036), m=Rating(value=264), a=Rating(value=79), s=Rating(value=2244)) with a total of 4623
-
1 mspassedGiven a part rating of "{x=2461,m=1339,a=466,s=291}" then it can be correctly parsed as Part(x=Rating(value=2461), m=Rating(value=1339), a=Rating(value=466), s=Rating(value=291)) with a total of 4557
-
0 mspassedGiven a part rating of "{x=2127,m=1623,a=2188,s=1013}" then it can be correctly parsed as Part(x=Rating(value=2127), m=Rating(value=1623), a=Rating(value=2188), s=Rating(value=1013)) with a total of 6951
-
1 mspassedGiven the example list of part ratings when parsed then the total of all ratings is 27957
-
3 mspassedGiven a rule input of "x>10:one" then it can be correctly parsed as IntervalRule(category=X, range=11..9999, next=WorkflowName(name=one))
-
0 mspassedGiven a rule input of "m<20:two" then it can be correctly parsed as IntervalRule(category=M, range=1..19, next=WorkflowName(name=two))
-
0 mspassedGiven a rule input of "a>30:R" then it can be correctly parsed as IntervalRule(category=A, range=31..9999, next=R)
-
0 mspassedGiven a rule input of "A" then it can be correctly parsed as A
-
0 mspassedGiven a rule input of "R" then it can be correctly parsed as R
-
3 mspassedGiven a workflow input of "px{a<2006:qkq,m>2090:A,rfg}" then it can be correctly parsed as RuleBasedWorkflow(name=WorkflowName(name=px), rules=[IntervalRule(category=A, range=1..2005, next=WorkflowName(name=qkq)), IntervalRule(category=M, range=2091..9999, next=A), WorkflowName(name=rfg)])
-
0 mspassedGiven a workflow input of "pv{a>1716:R,A}" then it can be correctly parsed as RuleBasedWorkflow(name=WorkflowName(name=pv), rules=[IntervalRule(category=A, range=1717..9999, next=R), A])
-
4 mspassedGiven the example input of workflows and parts when parsed then the number of workflows is 2 and the number of parts is 5
-
-
15 mspart processing
-
2 mspassedGiven an example part input of "{x=787,m=2655,a=1222,s=2876}" when sorted with the example workflows then the eventual outcome is A
-
1 mspassedGiven an example part input of "{x=1679,m=44,a=2067,s=496}" when sorted with the example workflows then the eventual outcome is R
-
0 mspassedGiven an example part input of "{x=2036,m=264,a=79,s=2244}" when sorted with the example workflows then the eventual outcome is A
-
0 mspassedGiven an example part input of "{x=2461,m=1339,a=466,s=291}" when sorted with the example workflows then the eventual outcome is R
-
0 mspassedGiven an example part input of "{x=2127,m=1623,a=2188,s=1013}" when sorted with the example workflows then the eventual outcome is A
-
2 mspassedGiven the example input of workflows and parts when sorting the parts with the workflows then the total is 19114
-
10 mspassedGiven the custom input of workflows and parts when sorting the parts with the workflows then the total is 575412
-
-
-
605 msDay19p2Tests
-
18 msparsing
-
3 mspassedGiven a part rating of "{x=787,m=2655,a=1222,s=2876}" then it can be correctly parsed as Part(x=Rating(value=787), m=Rating(value=2655), a=Rating(value=1222), s=Rating(value=2876)) with a total of 7540
-
1 mspassedGiven a part rating of "{x=1679,m=44,a=2067,s=496}" then it can be correctly parsed as Part(x=Rating(value=1679), m=Rating(value=44), a=Rating(value=2067), s=Rating(value=496)) with a total of 4286
-
0 mspassedGiven a part rating of "{x=2036,m=264,a=79,s=2244}" then it can be correctly parsed as Part(x=Rating(value=2036), m=Rating(value=264), a=Rating(value=79), s=Rating(value=2244)) with a total of 4623
-
1 mspassedGiven a part rating of "{x=2461,m=1339,a=466,s=291}" then it can be correctly parsed as Part(x=Rating(value=2461), m=Rating(value=1339), a=Rating(value=466), s=Rating(value=291)) with a total of 4557
-
1 mspassedGiven a part rating of "{x=2127,m=1623,a=2188,s=1013}" then it can be correctly parsed as Part(x=Rating(value=2127), m=Rating(value=1623), a=Rating(value=2188), s=Rating(value=1013)) with a total of 6951
-
1 mspassedGiven the example list of part ratings when parsed then the total of all ratings is 27957
-
3 mspassedGiven a rule input of "x>10:one" then it can be correctly parsed as 11<=X<=4000:one
-
0 mspassedGiven a rule input of "m<20:two" then it can be correctly parsed as 1<=M<=19:two
-
1 mspassedGiven a rule input of "a>30:R" then it can be correctly parsed as 31<=A<=4000:R
-
0 mspassedGiven a rule input of "A" then it can be correctly parsed as A
-
0 mspassedGiven a rule input of "R" then it can be correctly parsed as R
-
3 mspassedGiven a workflow input of "px{a<2006:qkq,m>2090:A,rfg}" then it can be correctly parsed as px{1<=A<=2005:qkq,2091<=M<=4000:A,rfg}
-
0 mspassedGiven a workflow input of "pv{a>1716:R,A}" then it can be correctly parsed as pv{1717<=A<=4000:R,A}
-
4 mspassedGiven the example input of workflows and parts when parsed then the number of workflows is 2 and the number of parts is 5
-
-
45 mspart processing
-
2 mspassedGiven an example part input of "{x=787,m=2655,a=1222,s=2876}" when sorted with the example workflows then the eventual outcome is A
-
1 mspassedGiven an example part input of "{x=1679,m=44,a=2067,s=496}" when sorted with the example workflows then the eventual outcome is R
-
0 mspassedGiven an example part input of "{x=2036,m=264,a=79,s=2244}" when sorted with the example workflows then the eventual outcome is A
-
1 mspassedGiven an example part input of "{x=2461,m=1339,a=466,s=291}" when sorted with the example workflows then the eventual outcome is R
-
0 mspassedGiven an example part input of "{x=2127,m=1623,a=2188,s=1013}" when sorted with the example workflows then the eventual outcome is A
-
3 mspassedGiven the example input of workflows and parts when sorting the parts with the workflows then the total is 19114
-
11 mspassedGiven the custom input of workflows and parts when sorting the parts with the workflows then the total is 575412
-
9 mspassedGiven the example input of workflows and parts when sorting the parts with the simplified workflows then the total is 19114
-
18 mspassedGiven the custom input of workflows and parts when sorting the parts with the simplified workflows then the total is 575412
-
-
542 msPart 2, counting possibilities
-
0 mspassedGiven a workflow input of "zr{m>522:vtc,a>1052:A,s>2877:R,R}" then it can be correctly parsed as zr{523<=M<=4000:vtc,1053<=A<=4000:A,2878<=S<=4000:R,R} and simplified to zr{523<=M<=4000:vtc,1053<=A<=4000:A,R}
-
1 mspassedGiven the example input of workflows then the workflows can be DAG ordered
-
1 mspassedGiven the example input of workflows then the whole workflow can be simplified as expected
-
50 mspassedGiven the custom input of workflows then the workflows can be DAG ordered
-
8 mspassedGiven the custom input of workflows then the whole workflow can be simplified as expected
-
21 mspassedGiven the example input of workflows then the number of accepted part combinations is 167409079868000
-
461 mspassedGiven the custom input of workflows then the number of accepted part combinations is 126107942006821
-
-
-
453 msDay20p1Tests
-
29 msparsing modules
-
27 mspassedGiven the first example modules input then the modules can be parsed as expected
-
2 mspassedGiven the second example modules input then the modules can be parsed as expected
-
-
424 mspressing the button
-
3 mspassedGiven the first example modules input when the button is pressed then the pulses are sent in the correct order
-
341 mspassedGiven the second example modules input when the button is pressed multiple times then the pulses are sent in the correct order
-
19 mspassedGiven the first example modules input when the button is pressed 1000 times then the product of the number of pulses is 32000000
-
9 mspassedGiven the second example modules input when the button is pressed 1000 times then the product of the number of pulses is 11687500
-
52 mspassedGiven the custom example modules input when the button is pressed 1000 times then the product of the number of pulses is 821985143
-
-
-
393 msDay20p2Tests
-
33 msparsing modules
-
31 mspassedGiven the first example modules input then the modules can be parsed as expected
-
2 mspassedGiven the second example modules input then the modules can be parsed as expected
-
-
360 mspressing the button
-
4 mspassedGiven the first example modules input when the button is pressed then the pulses are sent in the correct order
-
86 mspassedGiven the second example modules input when the button is pressed multiple times then the pulses are sent in the correct order
-
17 mspassedGiven the first example modules input when the button is pressed 1000 times then the product of the number of pulses is 32000000
-
9 mspassedGiven the second example modules input when the button is pressed 1000 times then the product of the number of pulses is 11687500
-
64 mspassedGiven the custom example modules input when the button is pressed 1000 times then the product of the number of pulses is 821985143
-
180 mspassedGiven the custom example modules input the rx output module first gets a low pulse with 240853834793347 number of button presses
-
-
-
81 msDay21p1Tests
-
12 msparsing inputs
-
12 mspassedGiven the example map input then the map can be parsed as expected
-
-
5 mspassedGiven the example map then the min number of steps to reach each garden plot are calculated correctly
-
4 mspassedGiven the example map then the possible targets at 1 step distance can be calculated correctly
-
2 mspassedGiven the example map then the possible targets at 2 steps distance can be calculated correctly
-
2 mspassedGiven the example map then the possible targets at 3 steps distance can be calculated correctly
-
2 mspassedGiven the example map then the possible targets at 6 steps distance can be calculated correctly
-
4 mspassedGiven the example map when walking exactly 6 steps then the elf can reach 16 different garden plots
-
50 mspassedGiven the custom map when walking exactly 64 steps then the elf can reach 3503 different garden plots
-
-
2.03 sDay21p2Tests
-
10 msparsing inputs
-
10 mspassedGiven the example map input then the map can be parsed as expected
-
-
7 mspassedGiven the example map then the min number of steps to reach each garden plot are calculated correctly
-
5 mspassedGiven the example map then the possible targets at 1 step distance can be calculated correctly
-
2 mspassedGiven the example map then the possible targets at 2 steps distance can be calculated correctly
-
2 mspassedGiven the example map then the possible targets at 3 steps distance can be calculated correctly
-
2 mspassedGiven the example map then the possible targets at 6 steps distance can be calculated correctly
-
4 mspassedGiven the example map when walking exactly 6 steps then the elf can reach 16 different garden plots
-
43 mspassedGiven the custom map when walking exactly 64 steps then the elf can reach 3503 different garden plots
-
9 mspassedGiven the example map when expanding 3 times it looks as expected
-
1.95 sGiven the custom map then the possible targets at (gridSize/2 + n * gridSize) steps can be calculated with a polynomial function
-
0 mspassedGiven the custom map then the grid size should be 131
-
194 mspassedGiven the custom map then the possible targets at 65 steps can be calculated with a polynomial function
-
180 mspassedGiven the custom map then the possible targets at 196 steps can be calculated with a polynomial function
-
183 mspassedGiven the custom map then the possible targets at 327 steps can be calculated with a polynomial function
-
188 mspassedGiven the custom map then the possible targets at 458 steps can be calculated with a polynomial function
-
189 mspassedGiven the custom map then the possible targets at 589 steps can be calculated with a polynomial function
-
199 mspassedGiven the custom map then the possible targets at 720 steps can be calculated with a polynomial function
-
193 mspassedGiven the custom map then the possible targets at 851 steps can be calculated with a polynomial function
-
201 mspassedGiven the custom map then the possible targets at 982 steps can be calculated with a polynomial function
-
205 mspassedGiven the custom map then the possible targets at 1113 steps can be calculated with a polynomial function
-
212 mspassedGiven the custom map then the possible targets at 1244 steps can be calculated with a polynomial function
-
1 mspassedGiven the custom map then the possible targets at 26501365 steps should be 584211423220706
-
-
-
115 msDay22p1Tests
-
24 msparsing
-
12 mspassedGiven the example snapshot input then it can be parsed as expected
-
12 mspassedGiven the custom snapshot input then it can be parsed as expected
-
-
12 mspassedGiven the example snapshot input when settled then the bricks will be settled as expected
-
34 mspassedGiven the custom snapshot input when settled then the bricks will be settled as expected
-
3 mspassedGiven the example snapshot input then the bricks that can be disintegrated can be calculated correctly
-
1 mspassedGiven the example snapshot input then the number of bricks that can be disintegrated is 5
-
41 mspassedGiven the custom snapshot input then the number of bricks that can be disintegrated is 512
-
-
1.94 sDay22p2Tests
-
34 msparsing
-
18 mspassedGiven the example snapshot input then it can be parsed as expected
-
16 mspassedGiven the custom snapshot input then it can be parsed as expected
-
-
9 mspassedGiven the example snapshot input when settled then the bricks will be settled as expected
-
49 mspassedGiven the custom snapshot input when settled then the bricks will be settled as expected
-
3 mspassedGiven the example snapshot input then the bricks that can be disintegrated can be calculated correctly
-
2 mspassedGiven the example snapshot input then the number of bricks that can be disintegrated is 5
-
47 mspassedGiven the custom snapshot input then the number of bricks that can be disintegrated is 512
-
10 mspassedGiven the example snapshot input then the sum of other bricks to fall in chain reactions is 7
-
1.78 spassedGiven the custom snapshot input then the sum of other bricks to fall in chain reactions is 98167
-
-
572 msDay23p1Tests
-
153 msAccessible map init
-
18 mspassedGiven the example map then the path, slope and start and end tiles can be extracted correctly
-
135 mspassedGiven the custom map then the path, slope and start and end tiles can be extracted correctly
-
-
254 msAccessible map keep important only
-
31 mspassedGiven the accessible map created from example map then it can be simplified to keep the important parts only
-
223 mspassedGiven the accessible map created from custom map then it can be simplified to keep the important parts only
-
-
165 msAccessible map hike finding
-
7 mspassedGiven the accessible map created from example map then the length of the longest hike is 94
-
158 mspassedGiven the accessible map created from custom map then the length of the longest hike is 2134
-
-
-
2 m 23 sDay23p2Tests
-
150 msAccessible map init
-
23 mspassedGiven the example map then the path, slope and start and end tiles can be extracted correctly
-
127 mspassedGiven the custom map then the path, slope and start and end tiles can be extracted correctly
-
-
149 msAccessible map keep important only
-
18 mspassedGiven the accessible map created from example map then it can be simplified to keep the important parts only
-
131 mspassedGiven the accessible map created from custom map then it can be simplified to keep the important parts only
-
-
2 m 23 sAccessible map hike finding
-
6 mspassedGiven the accessible map created from example map then the length of the longest hike is 154
-
2 m 23 spassedGiven the accessible map created from custom map then the length of the longest hike is 6298
-
-
-
77 msDay24p1Tests
-
29 msparsing
-
12 mspassedGiven an example hailstone as 19, 13, 30 @ -2, 1, -2 then it should be parsed correctly
-
2 mspassedGiven the example input then the list of hailstones should be parsed correctly
-
15 mspassedGiven the custom input then the list of hailstones should be parsed correctly
-
-
48 mstest 2d intersection
-
16 mspassedGiven the hailstone A 19, 13, 30 @ -2, 1, -2 and hailstone B 18, 19, 14 @ -1, -1, -1 then the intersection should be (14.333, 15.333)
-
1 mspassedGiven the hailstone A 19, 13, 30 @ -2, 1, -2 and hailstone B 18, 19, 14 @ -1, -1, -1 then the intersection in test range 7.0..27.0 should be (14.333, 15.333)
-
1 mspassedGiven the hailstone A 19, 13, 30 @ -2, 1, -2 and hailstone B 20, 25, 34 @ -2, -2, -4 then the intersection should be (11.667, 16.667)
-
1 mspassedGiven the hailstone A 19, 13, 30 @ -2, 1, -2 and hailstone B 20, 25, 34 @ -2, -2, -4 then the intersection in test range 7.0..27.0 should be (11.667, 16.667)
-
0 mspassedGiven the hailstone A 19, 13, 30 @ -2, 1, -2 and hailstone B 12, 31, 28 @ -1, -2, -1 then the intersection should be (6.2, 19.4)
-
0 mspassedGiven the hailstone A 19, 13, 30 @ -2, 1, -2 and hailstone B 12, 31, 28 @ -1, -2, -1 then the intersection in test range 7.0..27.0 should be null
-
0 mspassedGiven the hailstone A 19, 13, 30 @ -2, 1, -2 and hailstone B 20, 19, 15 @ 1, -5, -3 then the intersection should be null
-
0 mspassedGiven the hailstone A 19, 13, 30 @ -2, 1, -2 and hailstone B 20, 19, 15 @ 1, -5, -3 then the intersection in test range 7.0..27.0 should be null
-
1 mspassedGiven the hailstone A 18, 19, 22 @ -1, -1, -2 and hailstone B 20, 25, 34 @ -2, -2, -4 then the intersection should be null
-
1 mspassedGiven the hailstone A 18, 19, 22 @ -1, -1, -2 and hailstone B 20, 25, 34 @ -2, -2, -4 then the intersection in test range 7.0..27.0 should be null
-
1 mspassedGiven the hailstone A 18, 19, 22 @ -1, -1, -2 and hailstone B 12, 31, 28 @ -1, -2, -1 then the intersection should be (-6.0, -5.0)
-
1 mspassedGiven the hailstone A 18, 19, 22 @ -1, -1, -2 and hailstone B 12, 31, 28 @ -1, -2, -1 then the intersection in test range 7.0..27.0 should be null
-
0 mspassedGiven the hailstone A 18, 19, 22 @ -1, -1, -2 and hailstone B 20, 19, 15 @ 1, -5, -3 then the intersection should be null
-
0 mspassedGiven the hailstone A 18, 19, 22 @ -1, -1, -2 and hailstone B 20, 19, 15 @ 1, -5, -3 then the intersection in test range 7.0..27.0 should be null
-
0 mspassedGiven the hailstone A 20, 25, 34 @ -2, -2, -4 and hailstone B 12, 31, 28 @ -1, -2, -1 then the intersection should be (-2.0, 3.0)
-
0 mspassedGiven the hailstone A 20, 25, 34 @ -2, -2, -4 and hailstone B 12, 31, 28 @ -1, -2, -1 then the intersection in test range 7.0..27.0 should be null
-
1 mspassedGiven the hailstone A 20, 25, 34 @ -2, -2, -4 and hailstone B 20, 19, 15 @ 1, -5, -3 then the intersection should be null
-
0 mspassedGiven the hailstone A 20, 25, 34 @ -2, -2, -4 and hailstone B 20, 19, 15 @ 1, -5, -3 then the intersection in test range 7.0..27.0 should be null
-
0 mspassedGiven the hailstone A 12, 31, 28 @ -1, -2, -1 and hailstone B 20, 19, 15 @ 1, -5, -3 then the intersection should be null
-
1 mspassedGiven the hailstone A 12, 31, 28 @ -1, -2, -1 and hailstone B 20, 19, 15 @ 1, -5, -3 then the intersection in test range 7.0..27.0 should be null
-
1 mspassedGiven the example hailstone list and test range then the number of intersections should be 2
-
22 mspassedGiven the custom hailstone list and test range then the number of intersections should be 20434
-
-
-
3.47 sDay24p2Tests
-
18 msparsing
-
11 mspassedGiven an example hailstone as 19, 13, 30 @ -2, 1, -2 then it should be parsed correctly
-
2 mspassedGiven the example input then the list of hailstones should be parsed correctly
-
5 mspassedGiven the custom input then the list of hailstones should be parsed correctly
-
-
3.45 stest 2d intersection
-
11 mspassedGiven the hailstone A 19, 13, 30 @ -2, 1, -2 and hailstone B 18, 19, 14 @ -1, -1, -1 then the intersection should be (14.333, 15.333)
-
2 mspassedGiven the hailstone A 19, 13, 30 @ -2, 1, -2 and hailstone B 18, 19, 14 @ -1, -1, -1 then the intersection in test range 7..27 should be (14.333, 15.333)
-
3 mspassedGiven the hailstone A 19, 13, 30 @ -2, 1, -2 and hailstone B 20, 25, 34 @ -2, -2, -4 then the intersection should be (11.667, 16.667)
-
1 mspassedGiven the hailstone A 19, 13, 30 @ -2, 1, -2 and hailstone B 20, 25, 34 @ -2, -2, -4 then the intersection in test range 7..27 should be (11.667, 16.667)
-
1 mspassedGiven the hailstone A 19, 13, 30 @ -2, 1, -2 and hailstone B 12, 31, 28 @ -1, -2, -1 then the intersection should be (6.2, 19.4)
-
1 mspassedGiven the hailstone A 19, 13, 30 @ -2, 1, -2 and hailstone B 12, 31, 28 @ -1, -2, -1 then the intersection in test range 7..27 should be null
-
0 mspassedGiven the hailstone A 19, 13, 30 @ -2, 1, -2 and hailstone B 20, 19, 15 @ 1, -5, -3 then the intersection should be null
-
1 mspassedGiven the hailstone A 19, 13, 30 @ -2, 1, -2 and hailstone B 20, 19, 15 @ 1, -5, -3 then the intersection in test range 7..27 should be null
-
0 mspassedGiven the hailstone A 18, 19, 22 @ -1, -1, -2 and hailstone B 20, 25, 34 @ -2, -2, -4 then the intersection should be null
-
1 mspassedGiven the hailstone A 18, 19, 22 @ -1, -1, -2 and hailstone B 20, 25, 34 @ -2, -2, -4 then the intersection in test range 7..27 should be null
-
1 mspassedGiven the hailstone A 18, 19, 22 @ -1, -1, -2 and hailstone B 12, 31, 28 @ -1, -2, -1 then the intersection should be (-6.0, -5.0)
-
2 mspassedGiven the hailstone A 18, 19, 22 @ -1, -1, -2 and hailstone B 12, 31, 28 @ -1, -2, -1 then the intersection in test range 7..27 should be null
-
1 mspassedGiven the hailstone A 18, 19, 22 @ -1, -1, -2 and hailstone B 20, 19, 15 @ 1, -5, -3 then the intersection should be null
-
1 mspassedGiven the hailstone A 18, 19, 22 @ -1, -1, -2 and hailstone B 20, 19, 15 @ 1, -5, -3 then the intersection in test range 7..27 should be null
-
1 mspassedGiven the hailstone A 20, 25, 34 @ -2, -2, -4 and hailstone B 12, 31, 28 @ -1, -2, -1 then the intersection should be (-2.0, 3.0)
-
2 mspassedGiven the hailstone A 20, 25, 34 @ -2, -2, -4 and hailstone B 12, 31, 28 @ -1, -2, -1 then the intersection in test range 7..27 should be null
-
2 mspassedGiven the hailstone A 20, 25, 34 @ -2, -2, -4 and hailstone B 20, 19, 15 @ 1, -5, -3 then the intersection should be null
-
1 mspassedGiven the hailstone A 20, 25, 34 @ -2, -2, -4 and hailstone B 20, 19, 15 @ 1, -5, -3 then the intersection in test range 7..27 should be null
-
1 mspassedGiven the hailstone A 12, 31, 28 @ -1, -2, -1 and hailstone B 20, 19, 15 @ 1, -5, -3 then the intersection should be null
-
2 mspassedGiven the hailstone A 12, 31, 28 @ -1, -2, -1 and hailstone B 20, 19, 15 @ 1, -5, -3 then the intersection in test range 7..27 should be null
-
8 mspassedGiven the example hailstone list and test range then the number of intersections should be 2
-
308 mspassedGiven the custom hailstone list and test range then the number of intersections should be 20434
-
3.10 spassedGiven the custom hailstone list then the collision stone should be (344525619959965, 437880958119624, 242720827369528, -99, -269, 81) with px + py + pz = 1025127405449117
-
-
-
12.89 sDay25p1Tests
-
102 mspassedGiven the example wiring diagram then the sizes of the 2 groups multiplied together is 54
-
12.78 spassedGiven the custom wiring diagram then the sizes of the 2 groups multiplied together is 619225
-
-
2 msIOTests
-
2 mspassedgiven a file, when calling readInput() it should return the content of the file
-