3 m 27 s

Tests in 'advent-of-tdd.test': 1245 total, 1245 passed

  • Collapse |
  • Expand
  • 157 ms
    Day01p1Tests
    • 87 ms
      passedshould be able to represent a calibration value
    • 4 ms
      passedshould be able to represent a line from the calibration document
    • 15 ms
      passedshould be able to represent a calibration document
    • 1 ms
      CalibrationDocumentLine.toCalibrationValue() tests
      • 0 ms
        passedgiven a calibration document line `1abc2`, when calling toCalibrationValue() it should return 12
      • 0 ms
        passedgiven a calibration document line `pqr3stu8vwx`, when calling toCalibrationValue() it should return 38
      • 1 ms
        passedgiven a calibration document line `a1b2c3d4e5f`, when calling toCalibrationValue() it should return 15
      • 0 ms
        passedgiven a calibration document line `treb7uchet`, when calling toCalibrationValue() it should return 77
    • 2 ms
      passedgiven the example calibration document, when calling the sumOfCalibrationValues() it should return 142
    • 48 ms
      passedgiven the custom calibration document, when calling the sumOfCalibrationValues() it should return 55621
  • 39 ms
    Day01p2Tests
    • 2 ms
      passedshould be able to represent a calibration value
    • 3 ms
      passedshould be able to represent a line from the calibration document
    • 6 ms
      passedshould be able to represent a calibration document
    • 1 ms
      CalibrationDocumentLine.toCalibrationValue() tests
      • 0 ms
        passedgiven a calibration document line `1abc2`, when calling toCalibrationValue() it should return 12
      • 1 ms
        passedgiven a calibration document line `pqr3stu8vwx`, when calling toCalibrationValue() it should return 38
      • 0 ms
        passedgiven a calibration document line `a1b2c3d4e5f`, when calling toCalibrationValue() it should return 15
      • 0 ms
        passedgiven a calibration document line `treb7uchet`, when calling toCalibrationValue() it should return 77
      • 0 ms
        passedgiven a calibration document line `one`, when calling toCalibrationValue() it should return 11
      • 0 ms
        passedgiven a calibration document line `oneone`, when calling toCalibrationValue() it should return 11
      • 0 ms
        passedgiven a calibration document line `two1nine`, when calling toCalibrationValue() it should return 29
      • 0 ms
        passedgiven a calibration document line `eightwothree`, when calling toCalibrationValue() it should return 83
      • 0 ms
        passedgiven a calibration document line `abcone2threexyz`, when calling toCalibrationValue() it should return 13
      • 0 ms
        passedgiven a calibration document line `xtwone3four`, when calling toCalibrationValue() it should return 24
      • 0 ms
        passedgiven a calibration document line `4nineeightseven2`, when calling toCalibrationValue() it should return 42
      • 0 ms
        passedgiven a calibration document line `zoneight234`, when calling toCalibrationValue() it should return 14
      • 0 ms
        passedgiven a calibration document line `7pqrstsixteen`, when calling toCalibrationValue() it should return 76
    • 2 ms
      passedgiven the example calibration document, when calling the sumOfCalibrationValues() it should return 142
    • 25 ms
      passedgiven the custom calibration document, when calling the sumOfCalibrationValues() it should return 53592
  • 25 ms
    Day02p1Tests
    • 5 ms
      Given: a number of red, green and blue cubes
      • 5 ms
        passedThen: we can represent them properly
    • 8 ms
      Given: a series of text representations of handful of cubes
      • 4 ms
        And: the text is `3 red, 5 green, 4 blue`
        • 4 ms
          When: we parse it
          • 4 ms
            passedThen: it should parse as Cubes(red=3, green=5, blue=4)
      • 2 ms
        And: the text is `3 red`
        • 2 ms
          When: we parse it
          • 2 ms
            passedThen: it should parse as Cubes(red=3, green=0, blue=0)
      • 1 ms
        And: the text is `3 blue, 4 red`
        • 1 ms
          When: we parse it
          • 1 ms
            passedThen: it should parse as Cubes(red=4, green=0, blue=3)
      • 1 ms
        And: the text is `12 red, 13 green, 14 blue`
        • 1 ms
          When: we parse it
          • 1 ms
            passedThen: it should parse as Cubes(red=12, green=13, blue=14)
    • 1 ms
      Given: A handful and a bag of cubes
      • 0 ms
        When: we test if the bag can contain the handful
        • 0 ms
          passedThen: it should return true
      • 1 ms
        When: we test if the handful can contain the bag
        • 1 ms
          passedThen: it should return false
    • 4 ms
      Given: a game with an id and a series of handful of cubes
      • 4 ms
        passedThen: we can represent them properly
    • 3 ms
      Given: a series of text representations of games
      • 2 ms
        And: the text is `Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green`
        • 2 ms
          When: we parse it
          • 2 ms
            passedThen: 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 ms
        And: the text is `Game 14: 1 green, 3 red, 6 blue; 3 green, 6 red; 3 green, 15 blue, 14 red`
        • 1 ms
          When: we parse it
          • 1 ms
            passedThen: 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 ms
      Given: A game and a bag of cubes
      • 2 ms
        And: the bag is Cubes
        • 1 ms
          And: the game is Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green
          • 1 ms
            When: we test if the game is possible
            • 1 ms
              passedThen: it should return true
        • 1 ms
          And: the game is Game 2: 1 blue, 2 green; 3 green, 4 blue, 1 red; 1 green, 1 blue
          • 1 ms
            When: we test if the game is possible
            • 1 ms
              passedThen: it should return true
        • 0 ms
          And: the game is Game 3: 8 green, 6 blue, 20 red; 5 blue, 4 red, 13 green; 5 green, 1 red
          • 0 ms
            When: we test if the game is possible
            • 0 ms
              passedThen: it should return false
        • 0 ms
          And: the game is Game 4: 1 green, 3 red, 6 blue; 3 green, 6 red; 3 green, 15 blue, 14 red
          • 0 ms
            When: we test if the game is possible
            • 0 ms
              passedThen: it should return false
        • 0 ms
          And: the game is Game 5: 6 red, 1 blue, 3 green; 2 blue, 1 red, 2 green
          • 0 ms
            When: we test if the game is possible
            • 0 ms
              passedThen: it should return true
    • 0 ms
      Given: An example list of games and a bag of cubes
      • 0 ms
        When: we sum the ids of the games that are possible
        • 0 ms
          passedThen: we should get the correct sum
    • 2 ms
      Given: Our custom input list of games and a bag of cubes
      • 2 ms
        When: we sum the ids of the games that are possible
        • 2 ms
          passedThen: we should get the correct sum
  • 30 ms
    Day02p2Tests
    • 3 ms
      Given: a number of red, green and blue cubes
      • 3 ms
        passedThen: we can represent them properly
    • 8 ms
      Given: a series of text representations of handful of cubes
      • 2 ms
        And: the text is `3 red, 5 green, 4 blue`
        • 2 ms
          When: we parse it
          • 2 ms
            passedThen: it should parse as Cubes(red=3, green=5, blue=4)
      • 1 ms
        And: the text is `3 red`
        • 1 ms
          When: we parse it
          • 1 ms
            passedThen: it should parse as Cubes(red=3, green=0, blue=0)
      • 1 ms
        And: the text is `3 blue, 4 red`
        • 1 ms
          When: we parse it
          • 1 ms
            passedThen: it should parse as Cubes(red=4, green=0, blue=3)
      • 1 ms
        And: the text is `12 red, 13 green, 14 blue`
        • 1 ms
          When: we parse it
          • 1 ms
            passedThen: it should parse as Cubes(red=12, green=13, blue=14)
      • 1 ms
        And: the cubes are Cubes
        • 1 ms
          When: we calculate the power
          • 1 ms
            passedThen: it should be 48
      • 0 ms
        And: the cubes are Cubes
        • 0 ms
          When: we calculate the power
          • 0 ms
            passedThen: it should be 12
      • 1 ms
        And: the cubes are Cubes
        • 1 ms
          When: we calculate the power
          • 1 ms
            passedThen: it should be 1560
      • 0 ms
        And: the cubes are Cubes
        • 0 ms
          When: we calculate the power
          • 0 ms
            passedThen: it should be 630
      • 1 ms
        And: the cubes are Cubes
        • 1 ms
          When: we calculate the power
          • 1 ms
            passedThen: it should be 36
    • 2 ms
      Given: A handful and a bag of cubes
      • 1 ms
        When: we test if the bag can contain the handful
        • 1 ms
          passedThen: it should return true
      • 1 ms
        When: we test if the handful can contain the bag
        • 1 ms
          passedThen: it should return false
    • 3 ms
      Given: a game with an id and a series of handful of cubes
      • 3 ms
        passedThen: we can represent them properly
    • 2 ms
      Given: a series of text representations of games
      • 2 ms
        And: the text is `Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green`
        • 2 ms
          When: we parse it
          • 2 ms
            passedThen: 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 ms
        And: the text is `Game 14: 1 green, 3 red, 6 blue; 3 green, 6 red; 3 green, 15 blue, 14 red`
        • 0 ms
          When: we parse it
          • 0 ms
            passedThen: 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 ms
      Given: A game and a bag of cubes
      • 4 ms
        And: the bag is Cubes
        • 1 ms
          And: the game is Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green
          • 1 ms
            When: we test if the game is possible
            • 1 ms
              passedThen: it should return true
        • 1 ms
          And: the game is Game 2: 1 blue, 2 green; 3 green, 4 blue, 1 red; 1 green, 1 blue
          • 1 ms
            When: we test if the game is possible
            • 1 ms
              passedThen: it should return true
        • 1 ms
          And: the game is Game 3: 8 green, 6 blue, 20 red; 5 blue, 4 red, 13 green; 5 green, 1 red
          • 1 ms
            When: we test if the game is possible
            • 1 ms
              passedThen: it should return false
        • 0 ms
          And: the game is Game 4: 1 green, 3 red, 6 blue; 3 green, 6 red; 3 green, 15 blue, 14 red
          • 0 ms
            When: we test if the game is possible
            • 0 ms
              passedThen: it should return false
        • 1 ms
          And: the game is Game 5: 6 red, 1 blue, 3 green; 2 blue, 1 red, 2 green
          • 1 ms
            When: we test if the game is possible
            • 1 ms
              passedThen: it should return true
    • 2 ms
      Given: An example list of games and a bag of cubes
      • 1 ms
        When: we sum the ids of the games that are possible
        • 1 ms
          passedThen: we should get the correct sum
      • 1 ms
        When: we sum the power of the minimum bags of the games
        • 1 ms
          passedThen: we should get the correct sum
    • 2 ms
      Given: Our custom input list of games and a bag of cubes
      • 1 ms
        When: we sum the ids of the games that are possible
        • 1 ms
          passedThen: we should get the correct sum
      • 1 ms
        When: we sum the power of the minimum bags of the games
        • 1 ms
          passedThen: we should get the correct sum
    • 4 ms
      Given: A game
      • 1 ms
        And: the game is Game
        • 1 ms
          When: we calculate the minimum sized bag of cubes
          • 1 ms
            passedThen: it should be Cubes(red=4, green=2, blue=6)
      • 1 ms
        And: the game is Game
        • 1 ms
          When: we calculate the minimum sized bag of cubes
          • 1 ms
            passedThen: it should be Cubes(red=1, green=3, blue=4)
      • 0 ms
        And: the game is Game
        • 0 ms
          When: we calculate the minimum sized bag of cubes
          • 0 ms
            passedThen: it should be Cubes(red=20, green=13, blue=6)
      • 1 ms
        And: the game is Game
        • 1 ms
          When: we calculate the minimum sized bag of cubes
          • 1 ms
            passedThen: it should be Cubes(red=14, green=3, blue=15)
      • 1 ms
        And: the game is Game
        • 1 ms
          When: we calculate the minimum sized bag of cubes
          • 1 ms
            passedThen: it should be Cubes(red=6, green=3, blue=2)
  • 119 ms
    Day03p1Tests
    • 5 ms
      passedGiven a part number of 467 can be represented
    • 39 ms
      passedGiven a schematic of `.` when parsed then it will have 0 part numbers
    • 4 ms
      passedGiven a schematic of `467*` when parsed then it will have 1 part number
    • 7 ms
      passedGiven a schematic of `467` when parsed then it will have 0 part numbers
    • 2 ms
      passedGiven a schematic of `467*` and row `0` and int rage `[0, 2]` when queried then it will return adjacent
    • 2 ms
      passedGiven a schematic of `467` and row `0` and int rage `[0, 2]` when queried then it will return not adjacent
    • 2 ms
      passedGiven a schematic of `467.` and row `0` and int rage `[0, 2]` when queried then it will return not adjacent
    • 2 ms
      passedGiven a schematic of `*467` and row `0` and int rage `[1, 3]` when queried then it will return adjacent
    • 4 ms
      passedGiven a schematic of `.467` and row `0` and int rage `[1, 3]` when queried then it will return not adjacent
    • 5 ms
      passedGiven a schematic of 467. ...* and row 0 and int range `[0, 2]` when queried then it will return adjacent
    • 1 ms
      passedGiven a schematic of 467.. ....* and row 0 and int range `[0, 2]` when queried then it will return not adjacent
    • 2 ms
      passedGiven a schematic of ...* 467. and row 1 and int range `[0, 2]` when queried then it will return adjacent
    • 2 ms
      passedGiven a schematic of ....* 467.. and row 1 and int range `[0, 2]` when queried then it will return adjacent
    • 6 ms
      passedGiven an example schematic of 467..114.. ...*...... ..35..633. ......#... 617*...... .....+.58. ..592..... ......755. ...\$.*.... .664.598.. when summing the part numbers we get 4361
    • 36 ms
      passedGiven our custom input schematic when summing the part numbers we get 527364
  • 142 ms
    Day03p2Tests
    • 16 ms
      passedGiven a part number of 467 with row 0 and range [0..2] can be represented
    • 11 ms
      passedGiven a schematic of `.` when parsed then it will have 0 part numbers
    • 10 ms
      passedGiven a schematic of `467*` when parsed then it will have 1 part number
    • 3 ms
      passedGiven a schematic of `467` when parsed then it will have 0 part numbers
    • 3 ms
      passedGiven a schematic of `467*` and row `0` and int rage `[0, 2]` when queried then it will return adjacent
    • 4 ms
      passedGiven a schematic of `467` and row `0` and int rage `[0, 2]` when queried then it will return not adjacent
    • 2 ms
      passedGiven a schematic of `467.` and row `0` and int rage `[0, 2]` when queried then it will return not adjacent
    • 5 ms
      passedGiven a schematic of `*467` and row `0` and int rage `[1, 3]` when queried then it will return adjacent
    • 1 ms
      passedGiven a schematic of `.467` and row `0` and int rage `[1, 3]` when queried then it will return not adjacent
    • 3 ms
      passedGiven a schematic of 467. ...* and row 0 and int range `[0, 2]` when queried then it will return adjacent
    • 1 ms
      passedGiven a schematic of 467.. ....* and row 0 and int range `[0, 2]` when queried then it will return not adjacent
    • 3 ms
      passedGiven a schematic of ...* 467. and row 1 and int range `[0, 2]` when queried then it will return adjacent
    • 3 ms
      passedGiven a schematic of ....* 467.. and row 1 and int range `[0, 2]` when queried then it will return adjacent
    • 2 ms
      passedGiven an example schematic of 467..114.. ...*...... ..35..633. ......#... 617*...... .....+.58. ..592..... ......755. ...\$.*.... .664.598.. when summing the part numbers we get 4361
    • 34 ms
      passedGiven our custom input schematic when summing the part numbers we get 527364
    • 1 ms
      passedA char of `*` is a gear candidate
    • 1 ms
      passedNone of `.?%!$` are gear candidates
    • 7 ms
      passedGiven a schematic of `467*114` when parsed then it will have 1 gear
    • 1 ms
      passedGiven an example schematic of 467..114.. ...*...... ..35..633. ......#... 617*...... .....+.58. ..592..... ......755. ...\$.*.... .664.598.. when summing the gear ratios we get 467835
    • 31 ms
      passedGiven our custom input schematic when summing the gear ratios we get 79026871
  • 48 ms
    Day04p1Tests
    • 4 ms
      passedGiven "41" as input when we parse it then it should be setOf(42)
    • 1 ms
      passedGiven "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 ms
      passedGiven "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 ms
      Given a series of scratchcards then the points should be calculated correctly
      • 9 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
      passedGiven an example pile of scratchcards then the total points should be 13
    • 19 ms
      passedGiven our custom pile of scratchcards then the total points should be 28750
  • 45 ms
    Day04p2Tests
    • 4 ms
      passedGiven "41" as input when we parse it then it should be setOf(42)
    • 1 ms
      passedGiven "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 ms
      passedGiven "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 ms
      Given a series of scratchcards then the num of owned winning numbers should be calculated correctly
      • 1 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
      passedGiven an example pile of scratchcards then we can properly represent it
    • 2 ms
      passedGiven an example pile of scratchcards then the total number of owned scratchcards should be 30
    • 20 ms
      passedGiven our custom pile of scratchcards then the total number of owned scratchcards should be 10212704
  • 280 ms
    Day05p1Tests
    • 4 ms
      passedThe basic entities like seed and category can be properly represented
    • 5 ms
      passedAn Almanac map name can be properly represented
    • 4 ms
      passedGiven "seeds: 41" as input when we parse it then it should be setOfSeeds(41)
    • 22 ms
      passedGiven "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 ms
      passedGiven a map name line of "seed-to-soil map:" as input when we parse it then it should be AlmanacMapName("seed", "soil")
    • 6 ms
      passedGiven a map range line of "50 98 2" as input when we parse it then it should be AlmanacMapRange(98, 50, 2)
    • 151 ms
      passedGiven 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 ms
      passedGiven 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 ms
      Test AlmanacMapRange mapping between category numbers
      • 1 ms
        passedMapping 0 with AlmanacMapRange should be null
      • 1 ms
        passedMapping 1 with AlmanacMapRange should be null
      • 1 ms
        passedMapping 48 with AlmanacMapRange should be null
      • 1 ms
        passedMapping 49 with AlmanacMapRange should be null
      • 2 ms
        passedMapping 50 with AlmanacMapRange should be 52
      • 1 ms
        passedMapping 51 with AlmanacMapRange should be 53
      • 1 ms
        passedMapping 96 with AlmanacMapRange should be 98
      • 0 ms
        passedMapping 97 with AlmanacMapRange should be 99
      • 1 ms
        passedMapping 98 with AlmanacMapRange should be null
      • 2 ms
        passedMapping 99 with AlmanacMapRange should be null
    • 13 ms
      Test AlmanacMap mapping between category numbers
      • 3 ms
        passedMapping 79 with AlmanacMap should be 81
      • 1 ms
        passedMapping 14 with AlmanacMap should be 14
      • 0 ms
        passedMapping 55 with AlmanacMap should be 57
      • 0 ms
        passedMapping 13 with AlmanacMap should be 13
      • 1 ms
        passedMapping 0 with AlmanacMap should be 0
      • 1 ms
        passedMapping 1 with AlmanacMap should be 1
      • 2 ms
        passedMapping 48 with AlmanacMap should be 48
      • 1 ms
        passedMapping 49 with AlmanacMap should be 49
      • 0 ms
        passedMapping 50 with AlmanacMap should be 52
      • 1 ms
        passedMapping 51 with AlmanacMap should be 53
      • 1 ms
        passedMapping 96 with AlmanacMap should be 98
      • 0 ms
        passedMapping 97 with AlmanacMap should be 99
      • 1 ms
        passedMapping 98 with AlmanacMap should be 50
      • 1 ms
        passedMapping 99 with AlmanacMap should be 51
      • 0 ms
        passedMapping 100 with AlmanacMap should be 100
      • 0 ms
        passedMapping 101 with AlmanacMap should be 101
    • 5 ms
      Given the example Almanac test the chained mapping between category numbers
      • 1 ms
        passedMapping 79 with example Almanac should be 82
      • 2 ms
        passedMapping 14 with example Almanac should be 43
      • 1 ms
        passedMapping 55 with example Almanac should be 86
      • 1 ms
        passedMapping 13 with example Almanac should be 35
    • 4 ms
      passedGiven the example Almanac the lowest location number should be 35
    • 11 ms
      passedGiven our custom Almanac the lowest location number should be 199602917
  • 142 ms
    Day05p2Tests
    • 7 ms
      passedThe basic entities like seed and category can be properly represented
    • 9 ms
      passedAn Almanac map name can be properly represented
    • 9 ms
      passedGiven "seeds: 41 3" as input when we parse it then it should be setOfSeedRanges(41..43)
    • 3 ms
      passedGiven "seeds: seeds: 79 3 55 4" as input when we parse it then it should be setOfSeedRanges(79..81, 55..58)
    • 1 ms
      passedGiven a CategoryNumberRange("seed", 79, 81) contains should work as expected
    • 33 ms
      passedGiven a CategoryNumberRange("seed", 75, 82) then we should be able to compare it with other ranges
    • 5 ms
      passedGiven a map name line of "seed-to-soil map:" as input when we parse it then it should be AlmanacMapName("seed", "soil")
    • 6 ms
      passedGiven a map range line of "50 98 2" as input when we parse it then it should be AlmanacMapRange(98, 50, 2)
    • 11 ms
      passedGiven a map range of "50 98 2" we should be able to map ranges
    • 5 ms
      passedGiven 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 ms
      passedGiven 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 ms
      passedTest AlmanacMap mapping between category number ranges
    • 11 ms
      passedGiven the example Almanac test the chained mapping between category number ranges
    • 3 ms
      passedGiven the example Almanac the lowest location number should be 46
    • 29 ms
      passedGiven our custom Almanac the lowest location number should be 2254686
  • 27 ms
    Day06p1Tests
    • 5 ms
      passedA Record can be properly represented
    • 5 ms
      Given a Record(raceDuration = 7, recordDistance = 9), the distance can be calculated based on the duration the button was held
      • 1 ms
        passedGiven a button hold time of 0, the distance travelled should be 0
      • 1 ms
        passedGiven a button hold time of 1, the distance travelled should be 6
      • 0 ms
        passedGiven a button hold time of 2, the distance travelled should be 10
      • 1 ms
        passedGiven a button hold time of 3, the distance travelled should be 12
      • 1 ms
        passedGiven a button hold time of 4, the distance travelled should be 12
      • 1 ms
        passedGiven a button hold time of 5, the distance travelled should be 10
      • 0 ms
        passedGiven a button hold time of 6, the distance travelled should be 6
      • 0 ms
        passedGiven a button hold time of 7, the distance travelled should be 0
    • 5 ms
      Given 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 ms
        passedGiven Time: 7 15 30 when we parse it then it should be [7, 15, 30]
      • 1 ms
        passedGiven Distance: 9 40 200 when we parse it then it should be [9, 40, 200]
    • 4 ms
      passedGiven a records document the Record entries can be properly parsed
    • 0 ms
      Given a Record the number of ways to beat the record can be calculated
      • 0 ms
        passedGiven Record(raceDuration=7, recordDistance=9) the number of ways to beat the record should be 4
      • 0 ms
        passedGiven Record(raceDuration=15, recordDistance=40) the number of ways to beat the record should be 8
      • 0 ms
        passedGiven Record(raceDuration=30, recordDistance=200) the number of ways to beat the record should be 9
    • 6 ms
      passedGiven the example records document the product of the number of ways to beat the record can be calculated
    • 2 ms
      passedGiven the custom records document the product of the number of ways to beat the record can be calculated
  • 250 ms
    Day06p2Tests
    • 4 ms
      passedA Record can be properly represented
    • 6 ms
      Given a Record(raceDuration = 7, recordDistance = 9), the distance can be calculated based on the duration the button was held
      • 1 ms
        passedGiven a button hold time of 0, the distance travelled should be 0
      • 0 ms
        passedGiven a button hold time of 1, the distance travelled should be 6
      • 1 ms
        passedGiven a button hold time of 2, the distance travelled should be 10
      • 1 ms
        passedGiven a button hold time of 3, the distance travelled should be 12
      • 1 ms
        passedGiven a button hold time of 4, the distance travelled should be 12
      • 0 ms
        passedGiven a button hold time of 5, the distance travelled should be 10
      • 1 ms
        passedGiven a button hold time of 6, the distance travelled should be 6
      • 1 ms
        passedGiven a button hold time of 7, the distance travelled should be 0
    • 6 ms
      Given 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 ms
        passedGiven Time: 7 15 30 when we parse it then it should be 71530
      • 1 ms
        passedGiven Distance: 9 40 200 when we parse it then it should be 940200
    • 3 ms
      passedGiven a record document the Record can be properly parsed
    • 5 ms
      Given a Record the number of ways to beat the record can be calculated
      • 3 ms
        passedGiven Record(raceDuration=7, recordDistance=9) the number of ways to beat the record should be 4
      • 1 ms
        passedGiven Record(raceDuration=15, recordDistance=40) the number of ways to beat the record should be 8
      • 1 ms
        passedGiven Record(raceDuration=30, recordDistance=200) the number of ways to beat the record should be 9
    • 10 ms
      passedGiven the example record document then the number of ways to beat the record can be calculated
    • 216 ms
      passedGiven the custom record document then the number of ways to beat the record can be calculated
  • 233 ms
    Day07p1Tests
    • 87 ms
      Given cards we can compare them based on their relative strength
      • 10 ms
        passedSmoke test card comparisons
      • 2 ms
        passedGiven all cards when we sort them then they should be in order
      • 1 ms
        passedAll cards should really be all cards
      • 3 ms
        passedGiven Ace when compared to itself it should be equal
      • 1 ms
        passedGiven Ace and King when we compare them then Ace should be greater than King
      • 1 ms
        passedGiven Ace and Queen when we compare them then Ace should be greater than Queen
      • 0 ms
        passedGiven Ace and Jack when we compare them then Ace should be greater than Jack
      • 1 ms
        passedGiven Ace and Ten when we compare them then Ace should be greater than Ten
      • 1 ms
        passedGiven Ace and Nine when we compare them then Ace should be greater than Nine
      • 1 ms
        passedGiven Ace and Eight when we compare them then Ace should be greater than Eight
      • 1 ms
        passedGiven Ace and Seven when we compare them then Ace should be greater than Seven
      • 0 ms
        passedGiven Ace and Six when we compare them then Ace should be greater than Six
      • 1 ms
        passedGiven Ace and Five when we compare them then Ace should be greater than Five
      • 0 ms
        passedGiven Ace and Four when we compare them then Ace should be greater than Four
      • 1 ms
        passedGiven Ace and Three when we compare them then Ace should be greater than Three
      • 1 ms
        passedGiven Ace and Two when we compare them then Ace should be greater than Two
      • 1 ms
        passedGiven King when compared to itself it should be equal
      • 7 ms
        passedGiven King and Queen when we compare them then King should be greater than Queen
      • 1 ms
        passedGiven King and Jack when we compare them then King should be greater than Jack
      • 1 ms
        passedGiven King and Ten when we compare them then King should be greater than Ten
      • 0 ms
        passedGiven King and Nine when we compare them then King should be greater than Nine
      • 1 ms
        passedGiven King and Eight when we compare them then King should be greater than Eight
      • 1 ms
        passedGiven King and Seven when we compare them then King should be greater than Seven
      • 0 ms
        passedGiven King and Six when we compare them then King should be greater than Six
      • 1 ms
        passedGiven King and Five when we compare them then King should be greater than Five
      • 1 ms
        passedGiven King and Four when we compare them then King should be greater than Four
      • 0 ms
        passedGiven King and Three when we compare them then King should be greater than Three
      • 1 ms
        passedGiven King and Two when we compare them then King should be greater than Two
      • 1 ms
        passedGiven Queen when compared to itself it should be equal
      • 2 ms
        passedGiven Queen and Jack when we compare them then Queen should be greater than Jack
      • 1 ms
        passedGiven Queen and Ten when we compare them then Queen should be greater than Ten
      • 0 ms
        passedGiven Queen and Nine when we compare them then Queen should be greater than Nine
      • 0 ms
        passedGiven Queen and Eight when we compare them then Queen should be greater than Eight
      • 0 ms
        passedGiven Queen and Seven when we compare them then Queen should be greater than Seven
      • 0 ms
        passedGiven Queen and Six when we compare them then Queen should be greater than Six
      • 1 ms
        passedGiven Queen and Five when we compare them then Queen should be greater than Five
      • 1 ms
        passedGiven Queen and Four when we compare them then Queen should be greater than Four
      • 0 ms
        passedGiven Queen and Three when we compare them then Queen should be greater than Three
      • 1 ms
        passedGiven Queen and Two when we compare them then Queen should be greater than Two
      • 1 ms
        passedGiven Jack when compared to itself it should be equal
      • 0 ms
        passedGiven Jack and Ten when we compare them then Jack should be greater than Ten
      • 1 ms
        passedGiven Jack and Nine when we compare them then Jack should be greater than Nine
      • 0 ms
        passedGiven Jack and Eight when we compare them then Jack should be greater than Eight
      • 0 ms
        passedGiven Jack and Seven when we compare them then Jack should be greater than Seven
      • 1 ms
        passedGiven Jack and Six when we compare them then Jack should be greater than Six
      • 1 ms
        passedGiven Jack and Five when we compare them then Jack should be greater than Five
      • 0 ms
        passedGiven Jack and Four when we compare them then Jack should be greater than Four
      • 0 ms
        passedGiven Jack and Three when we compare them then Jack should be greater than Three
      • 1 ms
        passedGiven Jack and Two when we compare them then Jack should be greater than Two
      • 1 ms
        passedGiven Ten when compared to itself it should be equal
      • 1 ms
        passedGiven Ten and Nine when we compare them then Ten should be greater than Nine
      • 1 ms
        passedGiven Ten and Eight when we compare them then Ten should be greater than Eight
      • 1 ms
        passedGiven Ten and Seven when we compare them then Ten should be greater than Seven
      • 1 ms
        passedGiven Ten and Six when we compare them then Ten should be greater than Six
      • 1 ms
        passedGiven Ten and Five when we compare them then Ten should be greater than Five
      • 1 ms
        passedGiven Ten and Four when we compare them then Ten should be greater than Four
      • 1 ms
        passedGiven Ten and Three when we compare them then Ten should be greater than Three
      • 3 ms
        passedGiven Ten and Two when we compare them then Ten should be greater than Two
      • 0 ms
        passedGiven Nine when compared to itself it should be equal
      • 1 ms
        passedGiven Nine and Eight when we compare them then Nine should be greater than Eight
      • 0 ms
        passedGiven Nine and Seven when we compare them then Nine should be greater than Seven
      • 0 ms
        passedGiven Nine and Six when we compare them then Nine should be greater than Six
      • 1 ms
        passedGiven Nine and Five when we compare them then Nine should be greater than Five
      • 0 ms
        passedGiven Nine and Four when we compare them then Nine should be greater than Four
      • 1 ms
        passedGiven Nine and Three when we compare them then Nine should be greater than Three
      • 1 ms
        passedGiven Nine and Two when we compare them then Nine should be greater than Two
      • 1 ms
        passedGiven Eight when compared to itself it should be equal
      • 0 ms
        passedGiven Eight and Seven when we compare them then Eight should be greater than Seven
      • 0 ms
        passedGiven Eight and Six when we compare them then Eight should be greater than Six
      • 1 ms
        passedGiven Eight and Five when we compare them then Eight should be greater than Five
      • 1 ms
        passedGiven Eight and Four when we compare them then Eight should be greater than Four
      • 1 ms
        passedGiven Eight and Three when we compare them then Eight should be greater than Three
      • 0 ms
        passedGiven Eight and Two when we compare them then Eight should be greater than Two
      • 1 ms
        passedGiven Seven when compared to itself it should be equal
      • 1 ms
        passedGiven Seven and Six when we compare them then Seven should be greater than Six
      • 0 ms
        passedGiven Seven and Five when we compare them then Seven should be greater than Five
      • 1 ms
        passedGiven Seven and Four when we compare them then Seven should be greater than Four
      • 1 ms
        passedGiven Seven and Three when we compare them then Seven should be greater than Three
      • 1 ms
        passedGiven Seven and Two when we compare them then Seven should be greater than Two
      • 1 ms
        passedGiven Six when compared to itself it should be equal
      • 1 ms
        passedGiven Six and Five when we compare them then Six should be greater than Five
      • 1 ms
        passedGiven Six and Four when we compare them then Six should be greater than Four
      • 1 ms
        passedGiven Six and Three when we compare them then Six should be greater than Three
      • 0 ms
        passedGiven Six and Two when we compare them then Six should be greater than Two
      • 1 ms
        passedGiven Five when compared to itself it should be equal
      • 1 ms
        passedGiven Five and Four when we compare them then Five should be greater than Four
      • 1 ms
        passedGiven Five and Three when we compare them then Five should be greater than Three
      • 1 ms
        passedGiven Five and Two when we compare them then Five should be greater than Two
      • 1 ms
        passedGiven Four when compared to itself it should be equal
      • 0 ms
        passedGiven Four and Three when we compare them then Four should be greater than Three
      • 0 ms
        passedGiven Four and Two when we compare them then Four should be greater than Two
      • 1 ms
        passedGiven Three when compared to itself it should be equal
      • 0 ms
        passedGiven Three and Two when we compare them then Three should be greater than Two
      • 1 ms
        passedGiven Two when compared to itself it should be equal
    • 13 ms
      Cards should be accessible by their shortIds
      • 3 ms
        passedCard by 2 should be Two
      • 1 ms
        passedCard by 3 should be Three
      • 1 ms
        passedCard by 4 should be Four
      • 0 ms
        passedCard by 5 should be Five
      • 1 ms
        passedCard by 6 should be Six
      • 0 ms
        passedCard by 7 should be Seven
      • 1 ms
        passedCard by 8 should be Eight
      • 1 ms
        passedCard by 9 should be Nine
      • 1 ms
        passedCard by T should be Ten
      • 1 ms
        passedCard by J should be Jack
      • 1 ms
        passedCard by Q should be Queen
      • 1 ms
        passedCard by K should be King
      • 1 ms
        passedCard by A should be Ace
    • 11 ms
      Test Hands
      • 6 ms
        passedGiven T32KQ it should be possible to parse it into a Hand with expected cards
      • 1 ms
        passedGiven 32T3K it should be possible to parse it into a Hand with expected cards
      • 1 ms
        passedGiven T55J5 it should be possible to parse it into a Hand with expected cards
      • 1 ms
        passedGiven KK677 it should be possible to parse it into a Hand with expected cards
      • 1 ms
        passedGiven KTJJT it should be possible to parse it into a Hand with expected cards
      • 1 ms
        passedGiven QQQJA it should be possible to parse it into a Hand with expected cards
    • 22 ms
      Test Hand types
      • 1 ms
        passedSmoke test card comparisons
      • 0 ms
        passedGiven all hand types when we sort them then they should be in order
      • 1 ms
        passedAll hand types should really be all hand types
      • 1 ms
        passedGiven FiveOfAKind when compared to itself it should be equal
      • 1 ms
        passedGiven FiveOfAKind and FourOfAKind when we compare them then FiveOfAKind should be greater than FourOfAKind
      • 1 ms
        passedGiven FiveOfAKind and FullHouse when we compare them then FiveOfAKind should be greater than FullHouse
      • 0 ms
        passedGiven FiveOfAKind and ThreeOfAKind when we compare them then FiveOfAKind should be greater than ThreeOfAKind
      • 0 ms
        passedGiven FiveOfAKind and TwoPair when we compare them then FiveOfAKind should be greater than TwoPair
      • 0 ms
        passedGiven FiveOfAKind and OnePair when we compare them then FiveOfAKind should be greater than OnePair
      • 1 ms
        passedGiven FiveOfAKind and HighCard when we compare them then FiveOfAKind should be greater than HighCard
      • 1 ms
        passedGiven FourOfAKind when compared to itself it should be equal
      • 1 ms
        passedGiven FourOfAKind and FullHouse when we compare them then FourOfAKind should be greater than FullHouse
      • 1 ms
        passedGiven FourOfAKind and ThreeOfAKind when we compare them then FourOfAKind should be greater than ThreeOfAKind
      • 1 ms
        passedGiven FourOfAKind and TwoPair when we compare them then FourOfAKind should be greater than TwoPair
      • 1 ms
        passedGiven FourOfAKind and OnePair when we compare them then FourOfAKind should be greater than OnePair
      • 1 ms
        passedGiven FourOfAKind and HighCard when we compare them then FourOfAKind should be greater than HighCard
      • 1 ms
        passedGiven FullHouse when compared to itself it should be equal
      • 0 ms
        passedGiven FullHouse and ThreeOfAKind when we compare them then FullHouse should be greater than ThreeOfAKind
      • 0 ms
        passedGiven FullHouse and TwoPair when we compare them then FullHouse should be greater than TwoPair
      • 0 ms
        passedGiven FullHouse and OnePair when we compare them then FullHouse should be greater than OnePair
      • 0 ms
        passedGiven FullHouse and HighCard when we compare them then FullHouse should be greater than HighCard
      • 1 ms
        passedGiven ThreeOfAKind when compared to itself it should be equal
      • 1 ms
        passedGiven ThreeOfAKind and TwoPair when we compare them then ThreeOfAKind should be greater than TwoPair
      • 0 ms
        passedGiven ThreeOfAKind and OnePair when we compare them then ThreeOfAKind should be greater than OnePair
      • 1 ms
        passedGiven ThreeOfAKind and HighCard when we compare them then ThreeOfAKind should be greater than HighCard
      • 0 ms
        passedGiven TwoPair when compared to itself it should be equal
      • 1 ms
        passedGiven TwoPair and OnePair when we compare them then TwoPair should be greater than OnePair
      • 1 ms
        passedGiven TwoPair and HighCard when we compare them then TwoPair should be greater than HighCard
      • 1 ms
        passedGiven OnePair when compared to itself it should be equal
      • 1 ms
        passedGiven OnePair and HighCard when we compare them then OnePair should be greater than HighCard
      • 2 ms
        passedGiven HighCard when compared to itself it should be equal
    • 15 ms
      It should be possible to calc the type of a Hand
      • 1 ms
        passedGiven AAAAA it should be possible to calc its type as FiveOfAKind
      • 0 ms
        passedGiven AA8AA it should be possible to calc its type as FourOfAKind
      • 1 ms
        passedGiven 23332 it should be possible to calc its type as FullHouse
      • 0 ms
        passedGiven TTT98 it should be possible to calc its type as ThreeOfAKind
      • 4 ms
        passedGiven 23432 it should be possible to calc its type as TwoPair
      • 1 ms
        passedGiven A23A4 it should be possible to calc its type as OnePair
      • 1 ms
        passedGiven 23456 it should be possible to calc its type as HighCard
      • 1 ms
        passedGiven T32KQ it should be possible to calc its type as HighCard
      • 3 ms
        passedGiven 32T3K it should be possible to calc its type as OnePair
      • 1 ms
        passedGiven T55J5 it should be possible to calc its type as ThreeOfAKind
      • 1 ms
        passedGiven KK677 it should be possible to calc its type as TwoPair
      • 1 ms
        passedGiven KTJJT it should be possible to calc its type as TwoPair
      • 0 ms
        passedGiven QQQJA it should be possible to calc its type as ThreeOfAKind
    • 37 ms
      Hands should be comparable
      • 34 ms
        Hands with different types should be compared by type
        • 2 ms
          passedAll hand types are covered by the test case
        • 6 ms
          passedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be equal to itself
        • 1 ms
          passedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be greater than Hand(cards=[Ace, Ace, Eight, Ace, Ace])
        • 0 ms
          passedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be greater than Hand(cards=[Two, Three, Three, Three, Two])
        • 1 ms
          passedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be greater than Hand(cards=[Ten, Ten, Ten, Nine, Eight])
        • 1 ms
          passedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be greater than Hand(cards=[Two, Three, Four, Three, Two])
        • 4 ms
          passedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be greater than Hand(cards=[Ace, Two, Three, Ace, Four])
        • 1 ms
          passedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be greater than Hand(cards=[Two, Three, Four, Five, Six])
        • 1 ms
          passedHand Hand(cards=[Ace, Ace, Eight, Ace, Ace]) should be equal to itself
        • 0 ms
          passedHand Hand(cards=[Ace, Ace, Eight, Ace, Ace]) should be greater than Hand(cards=[Two, Three, Three, Three, Two])
        • 1 ms
          passedHand Hand(cards=[Ace, Ace, Eight, Ace, Ace]) should be greater than Hand(cards=[Ten, Ten, Ten, Nine, Eight])
        • 1 ms
          passedHand Hand(cards=[Ace, Ace, Eight, Ace, Ace]) should be greater than Hand(cards=[Two, Three, Four, Three, Two])
        • 1 ms
          passedHand Hand(cards=[Ace, Ace, Eight, Ace, Ace]) should be greater than Hand(cards=[Ace, Two, Three, Ace, Four])
        • 0 ms
          passedHand Hand(cards=[Ace, Ace, Eight, Ace, Ace]) should be greater than Hand(cards=[Two, Three, Four, Five, Six])
        • 1 ms
          passedHand Hand(cards=[Two, Three, Three, Three, Two]) should be equal to itself
        • 0 ms
          passedHand Hand(cards=[Two, Three, Three, Three, Two]) should be greater than Hand(cards=[Ten, Ten, Ten, Nine, Eight])
        • 0 ms
          passedHand Hand(cards=[Two, Three, Three, Three, Two]) should be greater than Hand(cards=[Two, Three, Four, Three, Two])
        • 2 ms
          passedHand Hand(cards=[Two, Three, Three, Three, Two]) should be greater than Hand(cards=[Ace, Two, Three, Ace, Four])
        • 1 ms
          passedHand Hand(cards=[Two, Three, Three, Three, Two]) should be greater than Hand(cards=[Two, Three, Four, Five, Six])
        • 1 ms
          passedHand Hand(cards=[Ten, Ten, Ten, Nine, Eight]) should be equal to itself
        • 1 ms
          passedHand Hand(cards=[Ten, Ten, Ten, Nine, Eight]) should be greater than Hand(cards=[Two, Three, Four, Three, Two])
        • 3 ms
          passedHand Hand(cards=[Ten, Ten, Ten, Nine, Eight]) should be greater than Hand(cards=[Ace, Two, Three, Ace, Four])
        • 0 ms
          passedHand Hand(cards=[Ten, Ten, Ten, Nine, Eight]) should be greater than Hand(cards=[Two, Three, Four, Five, Six])
        • 1 ms
          passedHand Hand(cards=[Two, Three, Four, Three, Two]) should be equal to itself
        • 1 ms
          passedHand Hand(cards=[Two, Three, Four, Three, Two]) should be greater than Hand(cards=[Ace, Two, Three, Ace, Four])
        • 1 ms
          passedHand Hand(cards=[Two, Three, Four, Three, Two]) should be greater than Hand(cards=[Two, Three, Four, Five, Six])
        • 1 ms
          passedHand Hand(cards=[Ace, Two, Three, Ace, Four]) should be equal to itself
        • 1 ms
          passedHand Hand(cards=[Ace, Two, Three, Ace, Four]) should be greater than Hand(cards=[Two, Three, Four, Five, Six])
        • 0 ms
          passedHand Hand(cards=[Two, Three, Four, Five, Six]) should be equal to itself
      • 3 ms
        Hands with same types should be compared by their cards
        • 1 ms
          passedHand 33332 should be greater than 2AAAA and they should have the same type
        • 1 ms
          passedHand 77888 should be greater than 77788 and they should have the same type
        • 1 ms
          passedHand 33334 should be greater than 33332 and they should have the same type
    • 4 ms
      passedHand with bid can be parsed
    • 1 ms
      passedThe example input can be parsed into a list of HandBids
    • 9 ms
      passedGiven the example input then we can calculate the total winning as 6440
    • 34 ms
      passedGiven our custom input then we can calculate the total winning as 246424613
  • 163 ms
    Day07p2Tests
    • 57 ms
      Given cards we can compare them based on their relative strength
      • 6 ms
        passedSmoke test card comparisons
      • 1 ms
        passedGiven all cards when we sort them then they should be in order
      • 2 ms
        passedAll cards should really be all cards
      • 0 ms
        passedGiven Ace when compared to itself it should be equal
      • 0 ms
        passedGiven Ace and King when we compare them then Ace should be greater than King
      • 1 ms
        passedGiven Ace and Queen when we compare them then Ace should be greater than Queen
      • 1 ms
        passedGiven Ace and Ten when we compare them then Ace should be greater than Ten
      • 0 ms
        passedGiven Ace and Nine when we compare them then Ace should be greater than Nine
      • 1 ms
        passedGiven Ace and Eight when we compare them then Ace should be greater than Eight
      • 1 ms
        passedGiven Ace and Seven when we compare them then Ace should be greater than Seven
      • 1 ms
        passedGiven Ace and Six when we compare them then Ace should be greater than Six
      • 0 ms
        passedGiven Ace and Five when we compare them then Ace should be greater than Five
      • 1 ms
        passedGiven Ace and Four when we compare them then Ace should be greater than Four
      • 0 ms
        passedGiven Ace and Three when we compare them then Ace should be greater than Three
      • 0 ms
        passedGiven Ace and Two when we compare them then Ace should be greater than Two
      • 0 ms
        passedGiven Ace and Joker when we compare them then Ace should be greater than Joker
      • 0 ms
        passedGiven King when compared to itself it should be equal
      • 0 ms
        passedGiven King and Queen when we compare them then King should be greater than Queen
      • 0 ms
        passedGiven King and Ten when we compare them then King should be greater than Ten
      • 0 ms
        passedGiven King and Nine when we compare them then King should be greater than Nine
      • 1 ms
        passedGiven King and Eight when we compare them then King should be greater than Eight
      • 0 ms
        passedGiven King and Seven when we compare them then King should be greater than Seven
      • 1 ms
        passedGiven King and Six when we compare them then King should be greater than Six
      • 1 ms
        passedGiven King and Five when we compare them then King should be greater than Five
      • 1 ms
        passedGiven King and Four when we compare them then King should be greater than Four
      • 0 ms
        passedGiven King and Three when we compare them then King should be greater than Three
      • 1 ms
        passedGiven King and Two when we compare them then King should be greater than Two
      • 0 ms
        passedGiven King and Joker when we compare them then King should be greater than Joker
      • 1 ms
        passedGiven Queen when compared to itself it should be equal
      • 1 ms
        passedGiven Queen and Ten when we compare them then Queen should be greater than Ten
      • 1 ms
        passedGiven Queen and Nine when we compare them then Queen should be greater than Nine
      • 1 ms
        passedGiven Queen and Eight when we compare them then Queen should be greater than Eight
      • 0 ms
        passedGiven Queen and Seven when we compare them then Queen should be greater than Seven
      • 0 ms
        passedGiven Queen and Six when we compare them then Queen should be greater than Six
      • 0 ms
        passedGiven Queen and Five when we compare them then Queen should be greater than Five
      • 0 ms
        passedGiven Queen and Four when we compare them then Queen should be greater than Four
      • 0 ms
        passedGiven Queen and Three when we compare them then Queen should be greater than Three
      • 1 ms
        passedGiven Queen and Two when we compare them then Queen should be greater than Two
      • 1 ms
        passedGiven Queen and Joker when we compare them then Queen should be greater than Joker
      • 0 ms
        passedGiven Ten when compared to itself it should be equal
      • 0 ms
        passedGiven Ten and Nine when we compare them then Ten should be greater than Nine
      • 1 ms
        passedGiven Ten and Eight when we compare them then Ten should be greater than Eight
      • 1 ms
        passedGiven Ten and Seven when we compare them then Ten should be greater than Seven
      • 0 ms
        passedGiven Ten and Six when we compare them then Ten should be greater than Six
      • 1 ms
        passedGiven Ten and Five when we compare them then Ten should be greater than Five
      • 1 ms
        passedGiven Ten and Four when we compare them then Ten should be greater than Four
      • 1 ms
        passedGiven Ten and Three when we compare them then Ten should be greater than Three
      • 1 ms
        passedGiven Ten and Two when we compare them then Ten should be greater than Two
      • 0 ms
        passedGiven Ten and Joker when we compare them then Ten should be greater than Joker
      • 0 ms
        passedGiven Nine when compared to itself it should be equal
      • 0 ms
        passedGiven Nine and Eight when we compare them then Nine should be greater than Eight
      • 0 ms
        passedGiven Nine and Seven when we compare them then Nine should be greater than Seven
      • 0 ms
        passedGiven Nine and Six when we compare them then Nine should be greater than Six
      • 0 ms
        passedGiven Nine and Five when we compare them then Nine should be greater than Five
      • 1 ms
        passedGiven Nine and Four when we compare them then Nine should be greater than Four
      • 1 ms
        passedGiven Nine and Three when we compare them then Nine should be greater than Three
      • 0 ms
        passedGiven Nine and Two when we compare them then Nine should be greater than Two
      • 0 ms
        passedGiven Nine and Joker when we compare them then Nine should be greater than Joker
      • 1 ms
        passedGiven Eight when compared to itself it should be equal
      • 0 ms
        passedGiven Eight and Seven when we compare them then Eight should be greater than Seven
      • 0 ms
        passedGiven Eight and Six when we compare them then Eight should be greater than Six
      • 1 ms
        passedGiven Eight and Five when we compare them then Eight should be greater than Five
      • 0 ms
        passedGiven Eight and Four when we compare them then Eight should be greater than Four
      • 1 ms
        passedGiven Eight and Three when we compare them then Eight should be greater than Three
      • 1 ms
        passedGiven Eight and Two when we compare them then Eight should be greater than Two
      • 1 ms
        passedGiven Eight and Joker when we compare them then Eight should be greater than Joker
      • 1 ms
        passedGiven Seven when compared to itself it should be equal
      • 0 ms
        passedGiven Seven and Six when we compare them then Seven should be greater than Six
      • 1 ms
        passedGiven Seven and Five when we compare them then Seven should be greater than Five
      • 1 ms
        passedGiven Seven and Four when we compare them then Seven should be greater than Four
      • 1 ms
        passedGiven Seven and Three when we compare them then Seven should be greater than Three
      • 0 ms
        passedGiven Seven and Two when we compare them then Seven should be greater than Two
      • 1 ms
        passedGiven Seven and Joker when we compare them then Seven should be greater than Joker
      • 1 ms
        passedGiven Six when compared to itself it should be equal
      • 1 ms
        passedGiven Six and Five when we compare them then Six should be greater than Five
      • 1 ms
        passedGiven Six and Four when we compare them then Six should be greater than Four
      • 1 ms
        passedGiven Six and Three when we compare them then Six should be greater than Three
      • 1 ms
        passedGiven Six and Two when we compare them then Six should be greater than Two
      • 0 ms
        passedGiven Six and Joker when we compare them then Six should be greater than Joker
      • 0 ms
        passedGiven Five when compared to itself it should be equal
      • 0 ms
        passedGiven Five and Four when we compare them then Five should be greater than Four
      • 0 ms
        passedGiven Five and Three when we compare them then Five should be greater than Three
      • 1 ms
        passedGiven Five and Two when we compare them then Five should be greater than Two
      • 1 ms
        passedGiven Five and Joker when we compare them then Five should be greater than Joker
      • 1 ms
        passedGiven Four when compared to itself it should be equal
      • 0 ms
        passedGiven Four and Three when we compare them then Four should be greater than Three
      • 1 ms
        passedGiven Four and Two when we compare them then Four should be greater than Two
      • 1 ms
        passedGiven Four and Joker when we compare them then Four should be greater than Joker
      • 1 ms
        passedGiven Three when compared to itself it should be equal
      • 1 ms
        passedGiven Three and Two when we compare them then Three should be greater than Two
      • 0 ms
        passedGiven Three and Joker when we compare them then Three should be greater than Joker
      • 1 ms
        passedGiven Two when compared to itself it should be equal
      • 0 ms
        passedGiven Two and Joker when we compare them then Two should be greater than Joker
      • 0 ms
        passedGiven Joker when compared to itself it should be equal
    • 11 ms
      Cards should be accessible by their shortIds
      • 2 ms
        passedCard by J should be Joker
      • 0 ms
        passedCard by 2 should be Two
      • 2 ms
        passedCard by 3 should be Three
      • 1 ms
        passedCard by 4 should be Four
      • 2 ms
        passedCard by 5 should be Five
      • 0 ms
        passedCard by 6 should be Six
      • 1 ms
        passedCard by 7 should be Seven
      • 1 ms
        passedCard by 8 should be Eight
      • 1 ms
        passedCard by 9 should be Nine
      • 1 ms
        passedCard by T should be Ten
      • 0 ms
        passedCard by Q should be Queen
      • 0 ms
        passedCard by K should be King
      • 0 ms
        passedCard by A should be Ace
    • 7 ms
      Test Hands
      • 5 ms
        passedGiven T32KQ it should be possible to parse it into a Hand with expected cards
      • 1 ms
        passedGiven 32T3K it should be possible to parse it into a Hand with expected cards
      • 0 ms
        passedGiven T55J5 it should be possible to parse it into a Hand with expected cards
      • 1 ms
        passedGiven KK677 it should be possible to parse it into a Hand with expected cards
      • 0 ms
        passedGiven KTJJT it should be possible to parse it into a Hand with expected cards
      • 0 ms
        passedGiven QQQJA it should be possible to parse it into a Hand with expected cards
    • 16 ms
      Test Hand types
      • 1 ms
        passedSmoke test card comparisons
      • 0 ms
        passedGiven all hand types when we sort them then they should be in order
      • 1 ms
        passedAll hand types should really be all hand types
      • 1 ms
        passedGiven FiveOfAKind when compared to itself it should be equal
      • 1 ms
        passedGiven FiveOfAKind and FourOfAKind when we compare them then FiveOfAKind should be greater than FourOfAKind
      • 0 ms
        passedGiven FiveOfAKind and FullHouse when we compare them then FiveOfAKind should be greater than FullHouse
      • 0 ms
        passedGiven FiveOfAKind and ThreeOfAKind when we compare them then FiveOfAKind should be greater than ThreeOfAKind
      • 0 ms
        passedGiven FiveOfAKind and TwoPair when we compare them then FiveOfAKind should be greater than TwoPair
      • 0 ms
        passedGiven FiveOfAKind and OnePair when we compare them then FiveOfAKind should be greater than OnePair
      • 0 ms
        passedGiven FiveOfAKind and HighCard when we compare them then FiveOfAKind should be greater than HighCard
      • 0 ms
        passedGiven FourOfAKind when compared to itself it should be equal
      • 0 ms
        passedGiven FourOfAKind and FullHouse when we compare them then FourOfAKind should be greater than FullHouse
      • 1 ms
        passedGiven FourOfAKind and ThreeOfAKind when we compare them then FourOfAKind should be greater than ThreeOfAKind
      • 1 ms
        passedGiven FourOfAKind and TwoPair when we compare them then FourOfAKind should be greater than TwoPair
      • 1 ms
        passedGiven FourOfAKind and OnePair when we compare them then FourOfAKind should be greater than OnePair
      • 0 ms
        passedGiven FourOfAKind and HighCard when we compare them then FourOfAKind should be greater than HighCard
      • 0 ms
        passedGiven FullHouse when compared to itself it should be equal
      • 0 ms
        passedGiven FullHouse and ThreeOfAKind when we compare them then FullHouse should be greater than ThreeOfAKind
      • 0 ms
        passedGiven FullHouse and TwoPair when we compare them then FullHouse should be greater than TwoPair
      • 0 ms
        passedGiven FullHouse and OnePair when we compare them then FullHouse should be greater than OnePair
      • 0 ms
        passedGiven FullHouse and HighCard when we compare them then FullHouse should be greater than HighCard
      • 1 ms
        passedGiven ThreeOfAKind when compared to itself it should be equal
      • 1 ms
        passedGiven ThreeOfAKind and TwoPair when we compare them then ThreeOfAKind should be greater than TwoPair
      • 1 ms
        passedGiven ThreeOfAKind and OnePair when we compare them then ThreeOfAKind should be greater than OnePair
      • 1 ms
        passedGiven ThreeOfAKind and HighCard when we compare them then ThreeOfAKind should be greater than HighCard
      • 1 ms
        passedGiven TwoPair when compared to itself it should be equal
      • 2 ms
        passedGiven TwoPair and OnePair when we compare them then TwoPair should be greater than OnePair
      • 1 ms
        passedGiven TwoPair and HighCard when we compare them then TwoPair should be greater than HighCard
      • 1 ms
        passedGiven OnePair when compared to itself it should be equal
      • 0 ms
        passedGiven OnePair and HighCard when we compare them then OnePair should be greater than HighCard
      • 0 ms
        passedGiven HighCard when compared to itself it should be equal
    • 8 ms
      It should be possible to calc the type of a Hand
      • 0 ms
        passedGiven QJJQ2 it should be possible to calc its type as FourOfAKind
      • 1 ms
        passedGiven JKKK2 it should be possible to calc its type as FourOfAKind
      • 1 ms
        passedGiven AAAAA it should be possible to calc its type as FiveOfAKind
      • 1 ms
        passedGiven AA8AA it should be possible to calc its type as FourOfAKind
      • 0 ms
        passedGiven 23332 it should be possible to calc its type as FullHouse
      • 0 ms
        passedGiven TTT98 it should be possible to calc its type as ThreeOfAKind
      • 0 ms
        passedGiven 23432 it should be possible to calc its type as TwoPair
      • 0 ms
        passedGiven A23A4 it should be possible to calc its type as OnePair
      • 0 ms
        passedGiven 23456 it should be possible to calc its type as HighCard
      • 0 ms
        passedGiven T32KQ it should be possible to calc its type as HighCard
      • 1 ms
        passedGiven 32T3K it should be possible to calc its type as OnePair
      • 0 ms
        passedGiven T55J5 it should be possible to calc its type as FourOfAKind
      • 0 ms
        passedGiven KK677 it should be possible to calc its type as TwoPair
      • 0 ms
        passedGiven KTJJT it should be possible to calc its type as FourOfAKind
      • 1 ms
        passedGiven QQQJA it should be possible to calc its type as FourOfAKind
      • 1 ms
        passedGiven JJJJJ it should be possible to calc its type as FiveOfAKind
      • 0 ms
        passedGiven JJJJ2 it should be possible to calc its type as FiveOfAKind
      • 1 ms
        passedGiven JJJ23 it should be possible to calc its type as FourOfAKind
      • 0 ms
        passedGiven JJ234 it should be possible to calc its type as ThreeOfAKind
      • 1 ms
        passedGiven J2345 it should be possible to calc its type as OnePair
    • 28 ms
      Hands should be comparable
      • 21 ms
        Hands with different types should be compared by type
        • 1 ms
          passedAll hand types are covered by the test case
        • 3 ms
          passedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be equal to itself
        • 1 ms
          passedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be greater than Hand(cards=[Ace, Ace, Eight, Ace, Ace])
        • 1 ms
          passedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be greater than Hand(cards=[Two, Three, Three, Three, Two])
        • 1 ms
          passedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be greater than Hand(cards=[Ten, Ten, Ten, Nine, Eight])
        • 1 ms
          passedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be greater than Hand(cards=[Two, Three, Four, Three, Two])
        • 1 ms
          passedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be greater than Hand(cards=[Ace, Two, Three, Ace, Four])
        • 1 ms
          passedHand Hand(cards=[Ace, Ace, Ace, Ace, Ace]) should be greater than Hand(cards=[Two, Three, Four, Five, Six])
        • 0 ms
          passedHand Hand(cards=[Ace, Ace, Eight, Ace, Ace]) should be equal to itself
        • 1 ms
          passedHand Hand(cards=[Ace, Ace, Eight, Ace, Ace]) should be greater than Hand(cards=[Two, Three, Three, Three, Two])
        • 0 ms
          passedHand Hand(cards=[Ace, Ace, Eight, Ace, Ace]) should be greater than Hand(cards=[Ten, Ten, Ten, Nine, Eight])
        • 0 ms
          passedHand Hand(cards=[Ace, Ace, Eight, Ace, Ace]) should be greater than Hand(cards=[Two, Three, Four, Three, Two])
        • 1 ms
          passedHand Hand(cards=[Ace, Ace, Eight, Ace, Ace]) should be greater than Hand(cards=[Ace, Two, Three, Ace, Four])
        • 0 ms
          passedHand Hand(cards=[Ace, Ace, Eight, Ace, Ace]) should be greater than Hand(cards=[Two, Three, Four, Five, Six])
        • 1 ms
          passedHand Hand(cards=[Two, Three, Three, Three, Two]) should be equal to itself
        • 1 ms
          passedHand Hand(cards=[Two, Three, Three, Three, Two]) should be greater than Hand(cards=[Ten, Ten, Ten, Nine, Eight])
        • 1 ms
          passedHand Hand(cards=[Two, Three, Three, Three, Two]) should be greater than Hand(cards=[Two, Three, Four, Three, Two])
        • 0 ms
          passedHand Hand(cards=[Two, Three, Three, Three, Two]) should be greater than Hand(cards=[Ace, Two, Three, Ace, Four])
        • 1 ms
          passedHand Hand(cards=[Two, Three, Three, Three, Two]) should be greater than Hand(cards=[Two, Three, Four, Five, Six])
        • 1 ms
          passedHand Hand(cards=[Ten, Ten, Ten, Nine, Eight]) should be equal to itself
        • 0 ms
          passedHand Hand(cards=[Ten, Ten, Ten, Nine, Eight]) should be greater than Hand(cards=[Two, Three, Four, Three, Two])
        • 1 ms
          passedHand Hand(cards=[Ten, Ten, Ten, Nine, Eight]) should be greater than Hand(cards=[Ace, Two, Three, Ace, Four])
        • 1 ms
          passedHand Hand(cards=[Ten, Ten, Ten, Nine, Eight]) should be greater than Hand(cards=[Two, Three, Four, Five, Six])
        • 0 ms
          passedHand Hand(cards=[Two, Three, Four, Three, Two]) should be equal to itself
        • 0 ms
          passedHand Hand(cards=[Two, Three, Four, Three, Two]) should be greater than Hand(cards=[Ace, Two, Three, Ace, Four])
        • 0 ms
          passedHand Hand(cards=[Two, Three, Four, Three, Two]) should be greater than Hand(cards=[Two, Three, Four, Five, Six])
        • 1 ms
          passedHand Hand(cards=[Ace, Two, Three, Ace, Four]) should be equal to itself
        • 1 ms
          passedHand Hand(cards=[Ace, Two, Three, Ace, Four]) should be greater than Hand(cards=[Two, Three, Four, Five, Six])
        • 0 ms
          passedHand Hand(cards=[Two, Three, Four, Five, Six]) should be equal to itself
      • 7 ms
        Hands with same types should be compared by their cards
        • 1 ms
          passedHand 33332 should be greater than 2AAAA and they should have the same type
        • 1 ms
          passedHand 77888 should be greater than 77788 and they should have the same type
        • 1 ms
          passedHand 33334 should be greater than 33332 and they should have the same type
        • 2 ms
          passedHand QQQQ2 should be greater than JKKK2 and they should have the same type
        • 1 ms
          passedHand KTJJT should be greater than QQQJA and they should have the same type
        • 1 ms
          passedHand QQQJA should be greater than T55J5 and they should have the same type
        • 0 ms
          passedHand KTJJT should be greater than T55J5 and they should have the same type
    • 6 ms
      passedHand with bid can be parsed
    • 1 ms
      passedThe example input can be parsed into a list of HandBids
    • 4 ms
      passedGiven the example input then we can calculate the total winning as 5905
    • 25 ms
      passedGiven our custom input then we can calculate the total winning as 246424613
  • 86 ms
    Day08p1Tests
    • 3 ms
      passedGiven a reference as "ABC" then it should be possible to represent as a NodeId
    • 4 ms
      passedCreating a Node should be possible with plain strings as well
    • 3 ms
      passedGiven a "AAA = (BBB, CCC)" then it should be possible to parse it as Node
    • 6 ms
      passedGiven a text with a series of nodes then it should be possible to parse it as a Network
    • 2 ms
      passedGiven a sequence of Node lines then it should be possible to parse it as a Network
    • 4 ms
      parsing instructions
      • 0 ms
        passedGiven an instruction list of "RL" then it should be possible to parse it as [Right, Left]
      • 1 ms
        passedGiven an instruction list of "LR" then it should be possible to parse it as [Left, Right]
      • 1 ms
        passedGiven an instruction list of "LL" then it should be possible to parse it as [Left, Left]
      • 0 ms
        passedGiven an instruction list of "RR" then it should be possible to parse it as [Right, Right]
      • 1 ms
        passedGiven an instruction list of "LLR" then it should be possible to parse it as [Left, Left, Right]
      • 1 ms
        passedGiven an instruction list of "RRL" then it should be possible to parse it as [Right, Right, Left]
    • 35 ms
      passedGiven Example documents 1 then it should be parse it as an Instruction List and a Network
    • 2 ms
      passedGiven Example documents 2 then it should be parse it as an Instruction List and a Network
    • 3 ms
      passedGiven Example documents 1 then it should be possible to calculate the number of steps from start to finish as 2
    • 1 ms
      passedGiven Example documents 2 then it should be possible to calculate the number of steps from start to finish as 6
    • 23 ms
      passedGiven our custom documents then it should be possible to calculate the number of steps from start to finish as 13939
  • 71 ms
    Day08p2Tests
    • 2 ms
      passedGiven a reference as "ABC" then it should be possible to represent as a NodeId
    • 4 ms
      passedCreating a Node should be possible with plain strings as well
    • 2 ms
      passedGiven a "AAA = (BBB, CCC)" then it should be possible to parse it as Node
    • 2 ms
      node ids can tell about themselves if they are a starting or ending or neither
      • 0 ms
        passedGiven a node id 11A then it should be possible to tell if it is starting or ending or neither
      • 0 ms
        passedGiven a node id 22A then it should be possible to tell if it is starting or ending or neither
      • 1 ms
        passedGiven a node id 11Z then it should be possible to tell if it is starting or ending or neither
      • 0 ms
        passedGiven a node id 22Z then it should be possible to tell if it is starting or ending or neither
      • 0 ms
        passedGiven a node id 11B then it should be possible to tell if it is starting or ending or neither
      • 1 ms
        passedGiven a node id 22B then it should be possible to tell if it is starting or ending or neither
    • 5 ms
      passedGiven a text with a series of nodes then it should be possible to parse it as a Network
    • 2 ms
      passedGiven a sequence of Node lines then it should be possible to parse it as a Network
    • 4 ms
      parsing instructions
      • 1 ms
        passedGiven an instruction list of "RL" then it should be possible to parse it as [Right, Left]
      • 1 ms
        passedGiven an instruction list of "LR" then it should be possible to parse it as [Left, Right]
      • 1 ms
        passedGiven an instruction list of "LL" then it should be possible to parse it as [Left, Left]
      • 0 ms
        passedGiven an instruction list of "RR" then it should be possible to parse it as [Right, Right]
      • 1 ms
        passedGiven an instruction list of "LLR" then it should be possible to parse it as [Left, Left, Right]
      • 0 ms
        passedGiven an instruction list of "RRL" then it should be possible to parse it as [Right, Right, Left]
    • 1 ms
      passedGiven Example documents 1 then it should be parse it as an Instruction List and a Network
    • 1 ms
      passedGiven Example documents 2 then it should be parse it as an Instruction List and a Network
    • 3 ms
      passedGiven Example documents 1 then it should be possible to calculate the number of steps from start to finish as 2
    • 1 ms
      passedGiven Example documents 2 then it should be possible to calculate the number of steps from start to finish as 6
    • 11 ms
      passedGiven Example documents 3 then it should be possible to calculate the number of steps from start to finish as 6
    • 33 ms
      passedGiven our custom documents then it should be possible to calculate the number of steps from start to finish as 8906539031197
  • 48 ms
    Day09p1Tests
    • 11 ms
      parsing OASIS reports
      • 4 ms
        passedGiven "0 3 6 9 12 15" then we can parse it as History(entries=[0, 3, 6, 9, 12, 15])
      • 2 ms
        passedGiven "1 3 6 10 15 21" then we can parse it as History(entries=[1, 3, 6, 10, 15, 21])
      • 1 ms
        passedGiven "10 13 16 21 30 45" then we can parse it as History(entries=[10, 13, 16, 21, 30, 45])
      • 1 ms
        passedGiven "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 ms
        passedGiven "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 ms
      Calculating diff series
      • 0 ms
        passedGiven "[0, 3, 6, 9, 12, 15]" then the diff series should be "[3, 3, 3, 3, 3]"
      • 1 ms
        passedGiven "[3, 3, 3, 3, 3]" then the diff series should be "[0, 0, 0, 0]"
      • 0 ms
        passedGiven "[1, 3, 6, 10, 15, 21]" then the diff series should be "[2, 3, 4, 5, 6]"
      • 1 ms
        passedGiven "[2, 3, 4, 5, 6]" then the diff series should be "[1, 1, 1, 1]"
      • 0 ms
        passedGiven "[1, 1, 1, 1]" then the diff series should be "[0, 0, 0]"
      • 0 ms
        passedGiven "[10, 13, 16, 21, 30, 45]" then the diff series should be "[3, 3, 5, 9, 15]"
      • 1 ms
        passedGiven "[3, 3, 5, 9, 15]" then the diff series should be "[0, 2, 4, 6]"
      • 0 ms
        passedGiven "[0, 2, 4, 6]" then the diff series should be "[2, 2, 2]"
      • 0 ms
        passedGiven "[2, 2, 2]" then the diff series should be "[0, 0]"
    • 3 ms
      Figuring out if it a series is all 0-s
      • 0 ms
        passedGiven "[0, 3, 6, 9, 12, 15]" then it should be not all 0
      • 0 ms
        passedGiven "[3, 3, 3, 3, 3]" then it should be not all 0
      • 0 ms
        passedGiven "[0, 0, 0, 0]" then it should be all 0
      • 0 ms
        passedGiven "[1, 3, 6, 10, 15, 21]" then it should be not all 0
      • 1 ms
        passedGiven "[2, 3, 4, 5, 6]" then it should be not all 0
      • 0 ms
        passedGiven "[1, 1, 1, 1]" then it should be not all 0
      • 0 ms
        passedGiven "[0, 0, 0]" then it should be all 0
      • 0 ms
        passedGiven "[10, 13, 16, 21, 30, 45]" then it should be not all 0
      • 0 ms
        passedGiven "[3, 3, 5, 9, 15]" then it should be not all 0
      • 1 ms
        passedGiven "[0, 2, 4, 6]" then it should be not all 0
      • 1 ms
        passedGiven "[2, 2, 2]" then it should be not all 0
      • 0 ms
        passedGiven "[0, 0]" then it should be all 0
    • 2 ms
      Predicting next value
      • 0 ms
        passedGiven "[0, 3, 6, 9, 12, 15]" then the next value should be "18"
      • 1 ms
        passedGiven "[1, 3, 6, 10, 15, 21]" then the next value should be "28"
      • 1 ms
        passedGiven "[10, 13, 16, 21, 30, 45]" then the next value should be "68"
    • 1 ms
      passedGiven 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 ms
      passedGiven our custom OASIS report then the sum of all predicted next values should be 1834108701
  • 86 ms
    Day09p2Tests
    • 9 ms
      parsing OASIS reports
      • 4 ms
        passedGiven "0 3 6 9 12 15" then we can parse it as History(entries=[0, 3, 6, 9, 12, 15])
      • 0 ms
        passedGiven "1 3 6 10 15 21" then we can parse it as History(entries=[1, 3, 6, 10, 15, 21])
      • 1 ms
        passedGiven "10 13 16 21 30 45" then we can parse it as History(entries=[10, 13, 16, 21, 30, 45])
      • 1 ms
        passedGiven "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 ms
        passedGiven "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 ms
      Calculating diff series
      • 1 ms
        passedGiven "[0, 3, 6, 9, 12, 15]" then the diff series should be "[3, 3, 3, 3, 3]"
      • 0 ms
        passedGiven "[3, 3, 3, 3, 3]" then the diff series should be "[0, 0, 0, 0]"
      • 0 ms
        passedGiven "[1, 3, 6, 10, 15, 21]" then the diff series should be "[2, 3, 4, 5, 6]"
      • 0 ms
        passedGiven "[2, 3, 4, 5, 6]" then the diff series should be "[1, 1, 1, 1]"
      • 1 ms
        passedGiven "[1, 1, 1, 1]" then the diff series should be "[0, 0, 0]"
      • 1 ms
        passedGiven "[10, 13, 16, 21, 30, 45]" then the diff series should be "[3, 3, 5, 9, 15]"
      • 0 ms
        passedGiven "[3, 3, 5, 9, 15]" then the diff series should be "[0, 2, 4, 6]"
      • 1 ms
        passedGiven "[0, 2, 4, 6]" then the diff series should be "[2, 2, 2]"
      • 1 ms
        passedGiven "[2, 2, 2]" then the diff series should be "[0, 0]"
    • 5 ms
      Figuring out if it a series is all 0-s
      • 0 ms
        passedGiven "[0, 3, 6, 9, 12, 15]" then it should be not all 0
      • 0 ms
        passedGiven "[3, 3, 3, 3, 3]" then it should be not all 0
      • 1 ms
        passedGiven "[0, 0, 0, 0]" then it should be all 0
      • 1 ms
        passedGiven "[1, 3, 6, 10, 15, 21]" then it should be not all 0
      • 1 ms
        passedGiven "[2, 3, 4, 5, 6]" then it should be not all 0
      • 0 ms
        passedGiven "[1, 1, 1, 1]" then it should be not all 0
      • 0 ms
        passedGiven "[0, 0, 0]" then it should be all 0
      • 0 ms
        passedGiven "[10, 13, 16, 21, 30, 45]" then it should be not all 0
      • 0 ms
        passedGiven "[3, 3, 5, 9, 15]" then it should be not all 0
      • 1 ms
        passedGiven "[0, 2, 4, 6]" then it should be not all 0
      • 0 ms
        passedGiven "[2, 2, 2]" then it should be not all 0
      • 1 ms
        passedGiven "[0, 0]" then it should be all 0
    • 2 ms
      Predicting next value
      • 1 ms
        passedGiven "[0, 3, 6, 9, 12, 15]" then the next value should be "18"
      • 0 ms
        passedGiven "[1, 3, 6, 10, 15, 21]" then the next value should be "28"
      • 1 ms
        passedGiven "[10, 13, 16, 21, 30, 45]" then the next value should be "68"
    • 1 ms
      passedGiven 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 ms
      passedGiven our custom OASIS report then the sum of all predicted next values should be 1834108701
    • 3 ms
      Predicting previous value
      • 1 ms
        passedGiven "[0, 3, 6, 9, 12, 15]" then the previous value should be "-3"
      • 1 ms
        passedGiven "[1, 3, 6, 10, 15, 21]" then the previous value should be "0"
      • 1 ms
        passedGiven "[10, 13, 16, 21, 30, 45]" then the previous value should be "5"
    • 3 ms
      passedGiven 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 ms
      passedGiven our custom OASIS report then the sum of all predicted previous values should be 993
  • 67 ms
    Day10p1Tests
    • 6 ms
      Coordinates and directions
      • 3 ms
        passedGiven Coordinate(row=0, column=0) and north then the result should be Coordinate(row=-1, column=0)
      • 0 ms
        passedGiven Coordinate(row=0, column=0) and south then the result should be Coordinate(row=1, column=0)
      • 0 ms
        passedGiven Coordinate(row=0, column=0) and east then the result should be Coordinate(row=0, column=1)
      • 1 ms
        passedGiven Coordinate(row=0, column=0) and west then the result should be Coordinate(row=0, column=-1)
      • 1 ms
        passedGiven north then the reverse should be south
      • 1 ms
        passedGiven south then the reverse should be north
    • 4 ms
      Pipe types and directions
      • 0 ms
        passedGiven | then the possible directions should be [north, south]
      • 0 ms
        passedGiven - then the possible directions should be [east, west]
      • 1 ms
        passedGiven L then the possible directions should be [north, east]
      • 1 ms
        passedGiven J then the possible directions should be [north, west]
      • 1 ms
        passedGiven 7 then the possible directions should be [south, west]
      • 1 ms
        passedGiven F then the possible directions should be [south, east]
      • 0 ms
        passedGiven dot then the possible directions should be []
    • 10 ms
      Map parsing
      • 3 ms
        passedGiven ..... .S-7. .|.|. .L-J. ..... then the start coordinate should be Coordinate(row=1, column=1)
      • 1 ms
        passedGiven ..F7. .FJ|. SJ.L7 |F--J LJ... then the start coordinate should be Coordinate(row=2, column=0)
      • 1 ms
        passedGiven 7-F7- .FJ|7 SJLL7 |F--J LJ.LJ then the start coordinate should be Coordinate(row=2, column=0)
      • 2 ms
        passedGiven ..... .S-7. .|.|. .L-J. ..... then the pipe type at Coordinate(row=1, column=1), based on neighbors, should be F
      • 3 ms
        passedGiven ..... .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 ms
        passedGiven ..F7. .FJ|. SJ.L7 |F--J LJ... then the pipe type at Coordinate(row=2, column=0), based on neighbors, should be F
      • 0 ms
        passedGiven ..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 ms
        passedGiven 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 ms
        passedGiven 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 ms
      Calculating the number of steps to farthest loop point
      • 1 ms
        passedGiven example map 1, then the number of steps to get to the farthest point of the loop should be 4
      • 1 ms
        passedGiven example map 2, then the number of steps to get to the farthest point of the loop should be 8
      • 1 ms
        passedGiven example map 3, then the number of steps to get to the farthest point of the loop should be 8
      • 44 ms
        passedGiven custom input map, then the number of steps to get to the farthest point of the loop should be 6599
  • 537 ms
    Day10p2Tests
    • 6 ms
      Coordinates and directions
      • 2 ms
        passedGiven Coordinate(row=0, column=0) and north then the result should be Coordinate(row=-1, column=0)
      • 1 ms
        passedGiven Coordinate(row=0, column=0) and south then the result should be Coordinate(row=1, column=0)
      • 0 ms
        passedGiven Coordinate(row=0, column=0) and east then the result should be Coordinate(row=0, column=1)
      • 1 ms
        passedGiven Coordinate(row=0, column=0) and west then the result should be Coordinate(row=0, column=-1)
      • 1 ms
        passedGiven north then the reverse should be south
      • 1 ms
        passedGiven south then the reverse should be north
    • 4 ms
      Pipe types and directions
      • 0 ms
        passedGiven | then the possible directions should be [north, south]
      • 1 ms
        passedGiven - then the possible directions should be [east, west]
      • 1 ms
        passedGiven L then the possible directions should be [north, east]
      • 1 ms
        passedGiven J then the possible directions should be [north, west]
      • 1 ms
        passedGiven 7 then the possible directions should be [south, west]
      • 0 ms
        passedGiven F then the possible directions should be [south, east]
      • 0 ms
        passedGiven dot then the possible directions should be []
    • 16 ms
      Map parsing
      • 2 ms
        passedGiven ..... .S-7. .|.|. .L-J. ..... then the start coordinate should be Coordinate(row=1, column=1)
      • 1 ms
        passedGiven ..F7. .FJ|. SJ.L7 |F--J LJ... then the start coordinate should be Coordinate(row=2, column=0)
      • 1 ms
        passedGiven 7-F7- .FJ|7 SJLL7 |F--J LJ.LJ then the start coordinate should be Coordinate(row=2, column=0)
      • 4 ms
        passedGiven ..... .S-7. .|.|. .L-J. ..... then the pipe type at Coordinate(row=1, column=1), based on neighbors, should be F
      • 4 ms
        passedGiven ..... .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 ms
        passedGiven ..F7. .FJ|. SJ.L7 |F--J LJ... then the pipe type at Coordinate(row=2, column=0), based on neighbors, should be F
      • 1 ms
        passedGiven ..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 ms
        passedGiven 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 ms
        passedGiven 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 ms
      Calculating the number of steps to farthest loop point
      • 1 ms
        passedGiven example map 1, then the number of steps to get to the farthest point of the loop should be 4
      • 1 ms
        passedGiven example map 2, then the number of steps to get to the farthest point of the loop should be 8
      • 1 ms
        passedGiven example map 3, then the number of steps to get to the farthest point of the loop should be 8
      • 48 ms
        passedGiven custom input map, then the number of steps to get to the farthest point of the loop should be 6599
    • 8 ms
      Enlarging map
      • 6 ms
        passedGiven ..... .S-7. .|.|. .L-J. ....., then the enlarged map should be .......... .......... ..S---7... ..|...|... ..|...|... ..|...|... ..L---J... .......... .......... ..........
      • 1 ms
        passedGiven ..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 ms
        passedGiven 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 ms
      Calculating the number of steps to farthest loop point on enlarged maps
      • 1 ms
        passedGiven enlarged example map 1, then the number of steps to get to the farthest point of the loop should be 8
      • 3 ms
        passedGiven enlarged example map 2, then the number of steps to get to the farthest point of the loop should be 16
      • 1 ms
        passedGiven enlarged example map 3, then the number of steps to get to the farthest point of the loop should be 16
      • 90 ms
        passedGiven enlarged custom input map, then the number of steps to get to the farthest point of the loop should be 13198
    • 25 ms
      Mark inside/outside regions in the enlarged map
      • 3 ms
        passedGiven ..... .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 ms
        passedGiven ..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 ms
        passedGiven 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 ms
        passedGiven ........... .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 ms
        passedGiven .......... .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 ms
        passedGiven .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 ms
        passedGiven 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 ms
      Mark inside/outside regions in the map
      • 5 ms
        passedGiven ..... .S-7. .|.|. .L-J. ....., then the enlarged and marked map should be OOOOO OS-7O O|I|O OL-JO OOOOO
      • 1 ms
        passedGiven ..F7. .FJ|. SJ.L7 |F--J LJ..., then the enlarged and marked map should be OOF7O OFJ|O SJIL7 |F--J LJOOO
      • 2 ms
        passedGiven 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 ms
        passedGiven ........... .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 ms
        passedGiven .......... .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 ms
        passedGiven .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 ms
        passedGiven 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 ms
      Tiles enclosed by the loop
      • 2 ms
        passedGiven example map 1, then the number of enclosed tiles should be 1
      • 1 ms
        passedGiven example map 2, then the number of enclosed tiles should be 1
      • 2 ms
        passedGiven example map 3, then the number of enclosed tiles should be 1
      • 4 ms
        passedGiven example map 4, then the number of enclosed tiles should be 4
      • 3 ms
        passedGiven example map 5, then the number of enclosed tiles should be 4
      • 7 ms
        passedGiven example map 6, then the number of enclosed tiles should be 8
      • 5 ms
        passedGiven example map 7, then the number of enclosed tiles should be 10
      • 276 ms
        passedGiven custom input map, then the number of enclosed tiles should be 477
  • 41 ms
    Day11p1Tests
    • 8 ms
      passedGiven the example image then it should be parsed as an expected Universe
    • 4 ms
      passedGiven the example image when parsed as an Universe and converted back to an image then we should get back the original image
    • 6 ms
      passedGiven the example image the expanded universe looks as expected
    • 2 ms
      Distance between galaxies
      • 1 ms
        passedGiven Galaxy(coordinate=Coordinate(row=0, column=0)) and Galaxy(coordinate=Coordinate(row=0, column=0)) then they should have a distance of 0
      • 0 ms
        passedGiven Galaxy(coordinate=Coordinate(row=0, column=0)) and Galaxy(coordinate=Coordinate(row=0, column=1)) then they should have a distance of 1
      • 0 ms
        passedGiven Galaxy(coordinate=Coordinate(row=0, column=0)) and Galaxy(coordinate=Coordinate(row=1, column=0)) then they should have a distance of 1
      • 0 ms
        passedGiven Galaxy(coordinate=Coordinate(row=6, column=1)) and Galaxy(coordinate=Coordinate(row=11, column=5)) then they should have a distance of 9
      • 1 ms
        passedGiven Galaxy(coordinate=Coordinate(row=0, column=4)) and Galaxy(coordinate=Coordinate(row=10, column=9)) then they should have a distance of 15
      • 0 ms
        passedGiven Galaxy(coordinate=Coordinate(row=2, column=0)) and Galaxy(coordinate=Coordinate(row=7, column=12)) then they should have a distance of 17
      • 0 ms
        passedGiven Galaxy(coordinate=Coordinate(row=11, column=0)) and Galaxy(coordinate=Coordinate(row=11, column=5)) then they should have a distance of 5
    • 21 ms
      Sum of all shortest paths between galaxies
      • 1 ms
        passedGiven Example image, then the sum of all shortest paths between galaxies should be 374
      • 20 ms
        passedGiven Custom image, then the sum of all shortest paths between galaxies should be 9521776
  • 59 ms
    Day11p2Tests
    • 8 ms
      passedGiven the example image then it should be parsed as an expected Universe
    • 5 ms
      passedGiven the example image when parsed as an Universe and converted back to an image then we should get back the original image
    • 5 ms
      passedGiven the example image the expanded universe looks as expected
    • 1 ms
      Distance between galaxies
      • 0 ms
        passedGiven Galaxy(coordinate=Coordinate(row=0, column=0)) and Galaxy(coordinate=Coordinate(row=0, column=0)) then they should have a distance of 0
      • 0 ms
        passedGiven Galaxy(coordinate=Coordinate(row=0, column=0)) and Galaxy(coordinate=Coordinate(row=0, column=1)) then they should have a distance of 1
      • 0 ms
        passedGiven Galaxy(coordinate=Coordinate(row=0, column=0)) and Galaxy(coordinate=Coordinate(row=1, column=0)) then they should have a distance of 1
      • 1 ms
        passedGiven Galaxy(coordinate=Coordinate(row=6, column=1)) and Galaxy(coordinate=Coordinate(row=11, column=5)) then they should have a distance of 9
      • 0 ms
        passedGiven Galaxy(coordinate=Coordinate(row=0, column=4)) and Galaxy(coordinate=Coordinate(row=10, column=9)) then they should have a distance of 15
      • 0 ms
        passedGiven Galaxy(coordinate=Coordinate(row=2, column=0)) and Galaxy(coordinate=Coordinate(row=7, column=12)) then they should have a distance of 17
      • 0 ms
        passedGiven Galaxy(coordinate=Coordinate(row=11, column=0)) and Galaxy(coordinate=Coordinate(row=11, column=5)) then they should have a distance of 5
    • 40 ms
      Sum of all shortest paths between galaxies
      • 1 ms
        passedGiven Example image and expansion rate = 2, then the sum of all shortest paths between galaxies should be 374
      • 1 ms
        passedGiven Example image and expansion rate = 10, then the sum of all shortest paths between galaxies should be 1030
      • 1 ms
        passedGiven Example image and expansion rate = 100, then the sum of all shortest paths between galaxies should be 8410
      • 19 ms
        passedGiven Custom image and expansion rate = 2, then the sum of all shortest paths between galaxies should be 9521776
      • 18 ms
        passedGiven Custom image and expansion rate = 1000000, then the sum of all shortest paths between galaxies should be 553224415344
  • 121 ms
    Day12p1Tests
    • 24 ms
      Condition record converting between text input and model
      • 0 ms
        passedGiven a condition record character of "." then the expected parsed value should be "operational"
      • 9 ms
        passedGiven a condition record character of "." when parsed and then converted back to text then we should get the original input
      • 1 ms
        passedGiven a condition record character of "#" then the expected parsed value should be "broken"
      • 1 ms
        passedGiven a condition record character of "#" when parsed and then converted back to text then we should get the original input
      • 0 ms
        passedGiven a condition record character of "?" then the expected parsed value should be "unknown"
      • 1 ms
        passedGiven a condition record character of "?" when parsed and then converted back to text then we should get the original input
      • 0 ms
        passedGiven a condition record row 1 of "." then the expected parsed value should be "[operational]"
      • 2 ms
        passedGiven a condition record row 1 of "." when parsed and then converted back to text then we should get the original input
      • 0 ms
        passedGiven a condition record row 1 of "#" then the expected parsed value should be "[broken]"
      • 1 ms
        passedGiven a condition record row 1 of "#" when parsed and then converted back to text then we should get the original input
      • 0 ms
        passedGiven a condition record row 1 of "?" then the expected parsed value should be "[unknown]"
      • 1 ms
        passedGiven a condition record row 1 of "?" when parsed and then converted back to text then we should get the original input
      • 1 ms
        passedGiven a condition record row 1 of ".." then the expected parsed value should be "[operational, operational]"
      • 1 ms
        passedGiven a condition record row 1 of ".." when parsed and then converted back to text then we should get the original input
      • 0 ms
        passedGiven a condition record row 1 of "#.#.###" then the expected parsed value should be "[broken, operational, broken, operational, broken, broken, broken]"
      • 1 ms
        passedGiven a condition record row 1 of "#.#.###" when parsed and then converted back to text then we should get the original input
      • 0 ms
        passedGiven a condition record row 1 of "???.###" then the expected parsed value should be "[unknown, unknown, unknown, operational, broken, broken, broken]"
      • 0 ms
        passedGiven a condition record row 1 of "???.###" when parsed and then converted back to text then we should get the original input
      • 2 ms
        passedGiven an integer list of "1,1,3" then the expected parsed value should be "[1, 1, 3]"
      • 0 ms
        passedGiven an integer list of "1,3,1,6" then the expected parsed value should be "[1, 3, 1, 6]"
      • 2 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
      Contiguous group of damaged springs
      • 2 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
      Generate solutions
      • 3 ms
        passedGiven a condition record row of "#.#.### 1,1,3" then the expected solutions should be "[#.#.###]"
      • 1 ms
        passedGiven a condition record row of "???.### 1,1,3" then the expected solutions should be "[#.#.###]"
      • 1 ms
        passedGiven a condition record row of ".??..??...?##. 1,1,3" then the expected solutions should be "[.#...#....###., ..#..#....###., ..#...#...###., .#....#...###.]"
      • 2 ms
        passedGiven a condition record row of "?###???????? 3,2,1" then the expected solutions should be "[.###.##.#..., .###.##..#.., .###.##...#., .###.##....#, .###..##.#.., .###..##..#., .###..##...#, .###...##.#., .###...##..#, .###....##.#]"
      • 3 ms
        passedGiven a condition record row of "#.#.### 1,1,3" then the expected number of solutions is 1
      • 0 ms
        passedGiven a condition record row of "???.### 1,1,3" then the expected number of solutions is 1
      • 1 ms
        passedGiven a condition record row of ".??..??...?##. 1,1,3" then the expected number of solutions is 4
      • 1 ms
        passedGiven a condition record row of "?#?#?#?#?#?#?#? 1,3,1,6" then the expected number of solutions is 1
      • 0 ms
        passedGiven a condition record row of "????.#...#... 4,1,1" then the expected number of solutions is 1
      • 1 ms
        passedGiven a condition record row of "????.######..#####. 1,6,5" then the expected number of solutions is 4
      • 1 ms
        passedGiven a condition record row of "?###???????? 3,2,1" then the expected number of solutions is 10
      • 2 ms
        passedGiven a condition record titled example input then the expected total number of solutions is 21
      • 79 ms
        passedGiven a condition record titled custom input then the expected total number of solutions is 6827
  • 636 ms
    Day12p2Tests
    • 15 ms
      Condition record converting between text input and model
      • 1 ms
        passedGiven a condition record character of "." then the expected parsed value should be "operational"
      • 1 ms
        passedGiven a condition record character of "." when parsed and then converted back to text then we should get the original input
      • 1 ms
        passedGiven a condition record character of "#" then the expected parsed value should be "broken"
      • 0 ms
        passedGiven a condition record character of "#" when parsed and then converted back to text then we should get the original input
      • 1 ms
        passedGiven a condition record character of "?" then the expected parsed value should be "unknown"
      • 0 ms
        passedGiven a condition record character of "?" when parsed and then converted back to text then we should get the original input
      • 1 ms
        passedGiven a condition record row 1 of "." then the expected parsed value should be "[operational]"
      • 1 ms
        passedGiven a condition record row 1 of "." when parsed and then converted back to text then we should get the original input
      • 0 ms
        passedGiven a condition record row 1 of "#" then the expected parsed value should be "[broken]"
      • 1 ms
        passedGiven a condition record row 1 of "#" when parsed and then converted back to text then we should get the original input
      • 0 ms
        passedGiven a condition record row 1 of "?" then the expected parsed value should be "[unknown]"
      • 0 ms
        passedGiven a condition record row 1 of "?" when parsed and then converted back to text then we should get the original input
      • 1 ms
        passedGiven a condition record row 1 of ".." then the expected parsed value should be "[operational, operational]"
      • 0 ms
        passedGiven a condition record row 1 of ".." when parsed and then converted back to text then we should get the original input
      • 0 ms
        passedGiven a condition record row 1 of "#.#.###" then the expected parsed value should be "[broken, operational, broken, operational, broken, broken, broken]"
      • 1 ms
        passedGiven a condition record row 1 of "#.#.###" when parsed and then converted back to text then we should get the original input
      • 0 ms
        passedGiven a condition record row 1 of "???.###" then the expected parsed value should be "[unknown, unknown, unknown, operational, broken, broken, broken]"
      • 1 ms
        passedGiven a condition record row 1 of "???.###" when parsed and then converted back to text then we should get the original input
      • 2 ms
        passedGiven an integer list of "1,1,3" then the expected parsed value should be "[1, 1, 3]"
      • 0 ms
        passedGiven an integer list of "1,3,1,6" then the expected parsed value should be "[1, 3, 1, 6]"
      • 2 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
      placing map
      • 1 ms
        passedGiven 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 ms
        passedGiven 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 ms
      Generate folded (part 1) solutions
      • 10 ms
        passedGiven a condition record row of "#.#.### 1,1,3" then the expected solutions should be "[#.#.###]"
      • 1 ms
        passedGiven a condition record row of "???.### 1,1,3" then the expected solutions should be "[#.#.###]"
      • 1 ms
        passedGiven a condition record row of ".??..??...?##. 1,1,3" then the expected solutions should be "[.#...#....###., ..#..#....###., ..#...#...###., .#....#...###.]"
      • 1 ms
        passedGiven a condition record row of "?###???????? 3,2,1" then the expected solutions should be "[.###.##.#..., .###.##..#.., .###.##...#., .###.##....#, .###..##.#.., .###..##..#., .###..##...#, .###...##.#., .###...##..#, .###....##.#]"
      • 4 ms
        passedGiven a condition record row of "#.#.### 1,1,3" then the expected number of solutions is 1
      • 1 ms
        passedGiven a condition record row of "???.### 1,1,3" then the expected number of solutions is 1
      • 1 ms
        passedGiven a condition record row of ".??..??...?##. 1,1,3" then the expected number of solutions is 4
      • 1 ms
        passedGiven a condition record row of "?#?#?#?#?#?#?#? 1,3,1,6" then the expected number of solutions is 1
      • 1 ms
        passedGiven a condition record row of "????.#...#... 4,1,1" then the expected number of solutions is 1
      • 0 ms
        passedGiven a condition record row of "????.######..#####. 1,6,5" then the expected number of solutions is 4
      • 1 ms
        passedGiven a condition record row of "?###???????? 3,2,1" then the expected number of solutions is 10
      • 2 ms
        passedGiven a condition record titled example input then the expected total number of solutions is 21
      • 85 ms
        passedGiven a condition record titled custom input then the expected total number of solutions is 6827
    • 9 ms
      Unfold condition record rows
      • 8 ms
        passedGiven a condition record row of ".# 1" then the expected unfolded condition record row should be ".#?.#?.#?.#?.# 1,1,1,1,1"
      • 1 ms
        passedGiven 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 ms
      Generate unfolded (part 2) solutions
      • 1 ms
        passedGiven a condition record row of "#.#.### 1,1,3" when unfolded then the expected number of solutions is 1
      • 1 ms
        passedGiven a condition record row of "???.### 1,1,3" when unfolded then the expected number of solutions is 1
      • 1 ms
        passedGiven a condition record row of ".??..??...?##. 1,1,3" when unfolded then the expected number of solutions is 16384
      • 1 ms
        passedGiven a condition record row of "?#?#?#?#?#?#?#? 1,3,1,6" when unfolded then the expected number of solutions is 1
      • 2 ms
        passedGiven a condition record row of "????.#...#... 4,1,1" when unfolded then the expected number of solutions is 16
      • 3 ms
        passedGiven a condition record row of "????.######..#####. 1,6,5" when unfolded then the expected number of solutions is 2500
      • 3 ms
        passedGiven a condition record row of "?###???????? 3,2,1" when unfolded then the expected number of solutions is 506250
      • 5 ms
        passedGiven a condition record titled example input when unfolded then the expected total number of solutions is 525152
      • 484 ms
        passedGiven a condition record titled custom input when unfolded then the expected total number of solutions is 1537505634471
  • 118 ms
    Day13p1Tests
    • 7 ms
      passedGiven the example patterns then it can be parsed correctly as 2 patterns
    • 6 ms
      test transpose
      • 5 ms
        passedGiven listOf("ab") then transposed it is expected to be listOf("a", "b")
      • 1 ms
        passedGiven [[a]] then transposed it is expected to be [[a]]
      • 0 ms
        passedGiven [[a, b]] then transposed it is expected to be [[a], [b]]
      • 0 ms
        passedGiven [[a, b, c]] then transposed it is expected to be [[a], [b], [c]]
    • 105 ms
      Finding mirror position in a pattern
      • 17 ms
        passedGiven a pattern of "#.##..##." then the expected vertical mirror position is 5
      • 55 ms
        passedGiven a pattern of "..#.##.#." then the expected vertical mirror position is 5
      • 2 ms
        passedGiven a pattern of "##......#" then the expected vertical mirror position is 5
      • 1 ms
        passed(1) Given a pattern of "##......#" then the expected vertical mirror position is 5
      • 1 ms
        passed(1) Given a pattern of "..#.##.#." then the expected vertical mirror position is 5
      • 3 ms
        passedGiven a pattern of "..##..##." then the expected vertical mirror position is 5
      • 0 ms
        passedGiven a pattern of "#.#.##.#." then the expected vertical mirror position is 5
      • 0 ms
        passedGiven example pattern 1 then the expected (vertical) mirror position is 5
      • 2 ms
        passedGiven example pattern 2 then the expected (vertical) mirror position is 4
      • 2 ms
        passedGiven example pattern 3 then the expected (vertical) mirror position is 16
      • 1 ms
        passedGiven example pattern 3 then the expected (vertical) mirror position is 8
      • 1 ms
        passedGiven Example Patterns then the expected score is 405
      • 20 ms
        passedGiven Custom Patterns then the expected score is 33780
  • 73 ms
    Day13p2Tests
    • 6 ms
      passedGiven the example patterns then it can be parsed correctly as 2 patterns
    • 5 ms
      test transpose
      • 4 ms
        passedGiven listOf("ab") then transposed it is expected to be listOf("a", "b")
      • 0 ms
        passedGiven [[a]] then transposed it is expected to be [[a]]
      • 0 ms
        passedGiven [[a, b]] then transposed it is expected to be [[a], [b]]
      • 1 ms
        passedGiven [[a, b, c]] then transposed it is expected to be [[a], [b], [c]]
    • 29 ms
      Finding mirror position in a pattern
      • 1 ms
        passedGiven a pattern of "#.##..##." then the expected vertical mirror position is 5
      • 2 ms
        passedGiven a pattern of "..#.##.#." then the expected vertical mirror position is 5
      • 1 ms
        passedGiven a pattern of "##......#" then the expected vertical mirror position is 5
      • 1 ms
        passed(1) Given a pattern of "##......#" then the expected vertical mirror position is 5
      • 2 ms
        passed(1) Given a pattern of "..#.##.#." then the expected vertical mirror position is 5
      • 3 ms
        passedGiven a pattern of "..##..##." then the expected vertical mirror position is 5
      • 0 ms
        passedGiven a pattern of "#.#.##.#." then the expected vertical mirror position is 5
      • 1 ms
        passedGiven example pattern 1 then the expected (vertical) mirror position is 5
      • 0 ms
        passedGiven example pattern 2 then the expected (horizontal) mirror position is 4
      • 1 ms
        passedGiven example pattern 3 then the expected (vertical) mirror position is 16
      • 1 ms
        passedGiven example pattern 3 then the expected (vertical) mirror position is
      • 0 ms
        passedGiven Example Patterns then the expected score is 405
      • 16 ms
        passedGiven Custom Patterns then the expected score is 33780
    • 33 ms
      Find smudge
      • 1 ms
        passedGiven example pattern 1 then after the smudge is fixed the mirror position score should be 300
      • 1 ms
        passedGiven example pattern 2 then after the smudge is fixed the mirror position score should be 100
      • 1 ms
        passedGiven Example Patterns when finding and fixing smudge then the expected score is 400
      • 30 ms
        passedGiven Custom Patterns when finding and fixing smudge then the expected score is 23479
  • 23 ms
    Day14p1Tests
    • 7 ms
      passedGiven the example platform when tilted north then it looks as expected
    • 3 ms
      passedGiven the example platform when tilted north then the total load is 136
    • 13 ms
      passedGiven the custom platform when tilted north then the total load is 106990
  • 702 ms
    Day14p2Tests
    • 8 ms
      passedGiven the example platform when tilted north then it looks as expected
    • 3 ms
      passedGiven the example platform when tilted north then the total load is 136
    • 9 ms
      passedGiven the custom platform when tilted north then the total load is 106990
    • 8 ms
      test spinning
      • 1 ms
        passedGiven the example platform when spun for 1 cycle then it looks as expected
      • 2 ms
        passedGiven the example platform when spun for 2 cycles then it looks as expected
      • 1 ms
        passedGiven the example platform when spun for 1 + 1 cycles then it looks as expected
      • 3 ms
        passedGiven the example platform when spun for 3 cycles then it looks as expected
      • 1 ms
        passedGiven the example platform when spun for 1 + 1 + 1 cycles then it looks as expected
    • 8 ms
      passedGiven the example platform when spun for 1 000 000 000 cycles then the total load is 64
    • 666 ms
      passedGiven the custom platform when spun for 1 000 000 000 cycles then the total load is 100531
  • 17 ms
    Day15p1Tests
    • 3 ms
      Tests with HASH
      • 2 ms
        passedGiven the example input of "H" when running HASH("H") then the result is 200
      • 1 ms
        passedGiven the example input of "HA" when running HASH("HA") then the result is 153
      • 0 ms
        passedGiven the example input of "HAS" when running HASH("HAS") then the result is 172
      • 0 ms
        passedGiven the example input of "HASH" when running HASH("HASH") then the result is 52
    • 6 ms
      Tests with exampleInitSeqInput
      • 1 ms
        passedGiven 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 ms
        passedGiven the example input of "rn=1" when running HASH("rn=1") then the result is 30
      • 0 ms
        passedGiven the example input of "cm-" when running HASH("cm-") then the result is 253
      • 0 ms
        passedGiven the example input of "qp=3" when running HASH("qp=3") then the result is 97
      • 1 ms
        passedGiven the example input of "cm=2" when running HASH("cm=2") then the result is 47
      • 0 ms
        passedGiven the example input of "qp-" when running HASH("qp-") then the result is 14
      • 1 ms
        passedGiven the example input of "pc=4" when running HASH("pc=4") then the result is 180
      • 1 ms
        passedGiven the example input of "ot=9" when running HASH("ot=9") then the result is 9
      • 0 ms
        passedGiven the example input of "ab=5" when running HASH("ab=5") then the result is 197
      • 1 ms
        passedGiven the example input of "pc-" when running HASH("pc-") then the result is 48
      • 1 ms
        passedGiven the example input of "pc=6" when running HASH("pc=6") then the result is 214
      • 0 ms
        passedGiven the example input of "ot=7" when running HASH("ot=7") then the result is 231
    • 1 ms
      passedGiven the example init sequence when running HASH for all parts the sum of the hashes is 1320
    • 7 ms
      passedGiven the custom init sequence when running HASH for all parts the sum of the hashes is 516804
  • 33 ms
    Day15p2Tests
    • 6 ms
      Tests with HASH
      • 4 ms
        passedGiven the example input of "H" when running HASH("H") then the result is 200
      • 1 ms
        passedGiven the example input of "HA" when running HASH("HA") then the result is 153
      • 1 ms
        passedGiven the example input of "HAS" when running HASH("HAS") then the result is 172
      • 0 ms
        passedGiven the example input of "HASH" when running HASH("HASH") then the result is 52
    • 7 ms
      Tests with exampleInitSeqInput
      • 1 ms
        passedGiven 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 ms
        passedGiven the lens label of "rn=1" when running HASH("rn") then the result is 0
      • 1 ms
        passedGiven the lens label of "cm-" when running HASH("cm") then the result is 0
      • 1 ms
        passedGiven the lens label of "qp=3" when running HASH("qp") then the result is 1
      • 0 ms
        passedGiven the lens label of "cm=2" when running HASH("cm") then the result is 0
      • 0 ms
        passedGiven the lens label of "qp-" when running HASH("qp") then the result is 1
      • 1 ms
        passedGiven the lens label of "pc=4" when running HASH("pc") then the result is 3
      • 0 ms
        passedGiven the lens label of "ot=9" when running HASH("ot") then the result is 3
      • 1 ms
        passedGiven the lens label of "ab=5" when running HASH("ab") then the result is 3
      • 1 ms
        passedGiven the lens label of "pc-" when running HASH("pc") then the result is 3
      • 1 ms
        passedGiven the lens label of "pc=6" when running HASH("pc") then the result is 3
      • 0 ms
        passedGiven the lens label of "ot=7" when running HASH("ot") then the result is 3
    • 5 ms
      passedGiven the example init sequence when processing the steps the total focusing power is 145
    • 15 ms
      passedGiven the custom init sequence when processing the steps the total focusing power is 231844
  • 58 ms
    Day16p1Tests
    • 11 ms
      testing light directions and mirrors/splitters
      • 9 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
      parsing tile types
      • 0 ms
        passedGiven tile sign . then tile type should be EmptySpace
      • 1 ms
        passedGiven tile sign / then tile type should be SlashMirror
      • 0 ms
        passedGiven tile sign \ then tile type should be BackslashMirror
      • 0 ms
        passedGiven tile sign | then tile type should be VerticalSplitter
      • 1 ms
        passedGiven tile sign - then tile type should be HorizontalSplitter
    • 7 ms
      passedGiven the example contraction when parsed then it looks as expected
    • 4 ms
      passedGiven the example contraption when parsed and the light beam simulated then the light beams and energized tiles should look as expected
    • 3 ms
      passedGiven the example contraption when parsed and light beams simulated then the number of energized tiles should be 46
    • 31 ms
      passedGiven the custom contraption when parsed and light beams simulated then the number of energized tiles should be 8539
  • 1.26 s
    Day16p2Tests
    • 11 ms
      testing light directions and mirrors/splitters
      • 9 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
      parsing tile types
      • 1 ms
        passedGiven tile sign . then tile type should be EmptySpace
      • 0 ms
        passedGiven tile sign / then tile type should be SlashMirror
      • 0 ms
        passedGiven tile sign \ then tile type should be BackslashMirror
      • 1 ms
        passedGiven tile sign | then tile type should be VerticalSplitter
      • 0 ms
        passedGiven tile sign - then tile type should be HorizontalSplitter
    • 7 ms
      passedGiven the example contraction when parsed then it looks as expected
    • 7 ms
      passedGiven the example contraption when parsed and the light beam simulated then the light beams and energized tiles should look as expected
    • 2 ms
      passedGiven the example contraption when parsed and light beams simulated then the number of energized tiles should be 46
    • 36 ms
      passedGiven the custom contraption when parsed and light beams simulated then the number of energized tiles should be 8539
    • 2 ms
      passedGiven 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 ms
      passedGiven the example contraption when parsed and light beams simulated then the max number of energized tiles should be 51
    • 1.18 s
      passedGiven the custom contraption when parsed and light beams simulated then the max number of energized tiles should be 8674
  • 3.03 s
    Day17p1Tests
    • 6 ms
      passedGiven the example heat loss map then it can be parsed from text and turned back into text
    • 10 ms
      passedGiven the custom heat loss map then it can be parsed from text and turned back into text
    • 80 ms
      passedGiven the example heat loss map when the minimized heat loss path is calculated then the result is 102
    • 2.93 s
      passedGiven the custom heat loss map when the minimized heat loss path is calculated then the result is 1110
  • 32.53 s
    Day17p2Tests
    • 7 ms
      passedGiven the example heat loss map 1 then it can be parsed from text and turned back into text
    • 8 ms
      passedGiven the custom heat loss map then it can be parsed from text and turned back into text
    • 42 ms
      passedGiven the example heat loss map 1 when the minimized heat loss path is calculated then the result is 94
    • 3 ms
      passedGiven the example heat loss map 2 when the minimized heat loss path is calculated then the result is 71
    • 32.47 s
      passedGiven the custom heat loss map when the minimized heat loss path is calculated then the result is 1294
  • 331 ms
    Day18p1Tests
    • 15 ms
      passedGiven the example dig plan then it can be parsed
    • 7 ms
      passedGiven the example dig plan then it should form a loop with the length of 38 and size of 10 x 7
    • 8 ms
      passedGiven the example dig plan when we dig it out then it should look as expected
    • 2 ms
      passedGiven the example dig plan then the lava capacity is 62
    • 299 ms
      passedGiven the custom dig plan then the lava capacity is 49578
  • 177 ms
    Day18p2Tests
    • 10 ms
      passed(Original) Given the example dig plan then it can be parsed
    • 1 ms
      passedGiven the example dig plan then it can be parsed
    • 6 ms
      passed(Original) Given the example dig plan then it should form a loop with the length of 38 and size 10 x 7
    • 1 ms
      passedGiven the example dig plan then it should form a loop with the length of 6405262 and size 1186329 x 1186329
    • 4 ms
      passed(Original) Given the custom dig plan then it should form a loop with the length of 3466 and size 264 x 387
    • 4 ms
      passedGiven the custom dig plan then it should form a loop with the length of 176096896 and size 12454594 x 20066754
    • 18 ms
      passed(Original) Given the example dig plan when we dig it out then it should look as expected
    • 2 ms
      passedGiven the example dig plan when we dig it out then it should look as expected
    • 1 ms
      passed(Original) Given the example dig plan then the lava capacity is 62
    • 2 ms
      passedGiven the example dig plan then the lava capacity is 952408144115
    • 61 ms
      passed(Original) Given the custom dig plan (with original parsing) then the lava capacity is 49578
    • 67 ms
      passedGiven the custom dig plan (with original parsing) then the lava capacity is 52885384955882
  • 29 ms
    Day19p1Tests
    • 14 ms
      parsing
      • 2 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven the example list of part ratings when parsed then the total of all ratings is 27957
      • 3 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven a rule input of "a>30:R" then it can be correctly parsed as IntervalRule(category=A, range=31..9999, next=R)
      • 0 ms
        passedGiven a rule input of "A" then it can be correctly parsed as A
      • 0 ms
        passedGiven a rule input of "R" then it can be correctly parsed as R
      • 3 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven the example input of workflows and parts when parsed then the number of workflows is 2 and the number of parts is 5
    • 15 ms
      part processing
      • 2 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven the example input of workflows and parts when sorting the parts with the workflows then the total is 19114
      • 10 ms
        passedGiven the custom input of workflows and parts when sorting the parts with the workflows then the total is 575412
  • 605 ms
    Day19p2Tests
    • 18 ms
      parsing
      • 3 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven the example list of part ratings when parsed then the total of all ratings is 27957
      • 3 ms
        passedGiven a rule input of "x>10:one" then it can be correctly parsed as 11<=X<=4000:one
      • 0 ms
        passedGiven a rule input of "m<20:two" then it can be correctly parsed as 1<=M<=19:two
      • 1 ms
        passedGiven a rule input of "a>30:R" then it can be correctly parsed as 31<=A<=4000:R
      • 0 ms
        passedGiven a rule input of "A" then it can be correctly parsed as A
      • 0 ms
        passedGiven a rule input of "R" then it can be correctly parsed as R
      • 3 ms
        passedGiven 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 ms
        passedGiven a workflow input of "pv{a>1716:R,A}" then it can be correctly parsed as pv{1717<=A<=4000:R,A}
      • 4 ms
        passedGiven the example input of workflows and parts when parsed then the number of workflows is 2 and the number of parts is 5
    • 45 ms
      part processing
      • 2 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven the example input of workflows and parts when sorting the parts with the workflows then the total is 19114
      • 11 ms
        passedGiven the custom input of workflows and parts when sorting the parts with the workflows then the total is 575412
      • 9 ms
        passedGiven the example input of workflows and parts when sorting the parts with the simplified workflows then the total is 19114
      • 18 ms
        passedGiven the custom input of workflows and parts when sorting the parts with the simplified workflows then the total is 575412
    • 542 ms
      Part 2, counting possibilities
      • 0 ms
        passedGiven 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 ms
        passedGiven the example input of workflows then the workflows can be DAG ordered
      • 1 ms
        passedGiven the example input of workflows then the whole workflow can be simplified as expected
      • 50 ms
        passedGiven the custom input of workflows then the workflows can be DAG ordered
      • 8 ms
        passedGiven the custom input of workflows then the whole workflow can be simplified as expected
      • 21 ms
        passedGiven the example input of workflows then the number of accepted part combinations is 167409079868000
      • 461 ms
        passedGiven the custom input of workflows then the number of accepted part combinations is 126107942006821
  • 453 ms
    Day20p1Tests
    • 29 ms
      parsing modules
      • 27 ms
        passedGiven the first example modules input then the modules can be parsed as expected
      • 2 ms
        passedGiven the second example modules input then the modules can be parsed as expected
    • 424 ms
      pressing the button
      • 3 ms
        passedGiven the first example modules input when the button is pressed then the pulses are sent in the correct order
      • 341 ms
        passedGiven the second example modules input when the button is pressed multiple times then the pulses are sent in the correct order
      • 19 ms
        passedGiven the first example modules input when the button is pressed 1000 times then the product of the number of pulses is 32000000
      • 9 ms
        passedGiven the second example modules input when the button is pressed 1000 times then the product of the number of pulses is 11687500
      • 52 ms
        passedGiven the custom example modules input when the button is pressed 1000 times then the product of the number of pulses is 821985143
  • 393 ms
    Day20p2Tests
    • 33 ms
      parsing modules
      • 31 ms
        passedGiven the first example modules input then the modules can be parsed as expected
      • 2 ms
        passedGiven the second example modules input then the modules can be parsed as expected
    • 360 ms
      pressing the button
      • 4 ms
        passedGiven the first example modules input when the button is pressed then the pulses are sent in the correct order
      • 86 ms
        passedGiven the second example modules input when the button is pressed multiple times then the pulses are sent in the correct order
      • 17 ms
        passedGiven the first example modules input when the button is pressed 1000 times then the product of the number of pulses is 32000000
      • 9 ms
        passedGiven the second example modules input when the button is pressed 1000 times then the product of the number of pulses is 11687500
      • 64 ms
        passedGiven the custom example modules input when the button is pressed 1000 times then the product of the number of pulses is 821985143
      • 180 ms
        passedGiven the custom example modules input the rx output module first gets a low pulse with 240853834793347 number of button presses
  • 81 ms
    Day21p1Tests
    • 12 ms
      parsing inputs
      • 12 ms
        passedGiven the example map input then the map can be parsed as expected
    • 5 ms
      passedGiven the example map then the min number of steps to reach each garden plot are calculated correctly
    • 4 ms
      passedGiven the example map then the possible targets at 1 step distance can be calculated correctly
    • 2 ms
      passedGiven the example map then the possible targets at 2 steps distance can be calculated correctly
    • 2 ms
      passedGiven the example map then the possible targets at 3 steps distance can be calculated correctly
    • 2 ms
      passedGiven the example map then the possible targets at 6 steps distance can be calculated correctly
    • 4 ms
      passedGiven the example map when walking exactly 6 steps then the elf can reach 16 different garden plots
    • 50 ms
      passedGiven the custom map when walking exactly 64 steps then the elf can reach 3503 different garden plots
  • 2.03 s
    Day21p2Tests
    • 10 ms
      parsing inputs
      • 10 ms
        passedGiven the example map input then the map can be parsed as expected
    • 7 ms
      passedGiven the example map then the min number of steps to reach each garden plot are calculated correctly
    • 5 ms
      passedGiven the example map then the possible targets at 1 step distance can be calculated correctly
    • 2 ms
      passedGiven the example map then the possible targets at 2 steps distance can be calculated correctly
    • 2 ms
      passedGiven the example map then the possible targets at 3 steps distance can be calculated correctly
    • 2 ms
      passedGiven the example map then the possible targets at 6 steps distance can be calculated correctly
    • 4 ms
      passedGiven the example map when walking exactly 6 steps then the elf can reach 16 different garden plots
    • 43 ms
      passedGiven the custom map when walking exactly 64 steps then the elf can reach 3503 different garden plots
    • 9 ms
      passedGiven the example map when expanding 3 times it looks as expected
    • 1.95 s
      Given the custom map then the possible targets at (gridSize/2 + n * gridSize) steps can be calculated with a polynomial function
      • 0 ms
        passedGiven the custom map then the grid size should be 131
      • 194 ms
        passedGiven the custom map then the possible targets at 65 steps can be calculated with a polynomial function
      • 180 ms
        passedGiven the custom map then the possible targets at 196 steps can be calculated with a polynomial function
      • 183 ms
        passedGiven the custom map then the possible targets at 327 steps can be calculated with a polynomial function
      • 188 ms
        passedGiven the custom map then the possible targets at 458 steps can be calculated with a polynomial function
      • 189 ms
        passedGiven the custom map then the possible targets at 589 steps can be calculated with a polynomial function
      • 199 ms
        passedGiven the custom map then the possible targets at 720 steps can be calculated with a polynomial function
      • 193 ms
        passedGiven the custom map then the possible targets at 851 steps can be calculated with a polynomial function
      • 201 ms
        passedGiven the custom map then the possible targets at 982 steps can be calculated with a polynomial function
      • 205 ms
        passedGiven the custom map then the possible targets at 1113 steps can be calculated with a polynomial function
      • 212 ms
        passedGiven the custom map then the possible targets at 1244 steps can be calculated with a polynomial function
      • 1 ms
        passedGiven the custom map then the possible targets at 26501365 steps should be 584211423220706
  • 115 ms
    Day22p1Tests
    • 24 ms
      parsing
      • 12 ms
        passedGiven the example snapshot input then it can be parsed as expected
      • 12 ms
        passedGiven the custom snapshot input then it can be parsed as expected
    • 12 ms
      passedGiven the example snapshot input when settled then the bricks will be settled as expected
    • 34 ms
      passedGiven the custom snapshot input when settled then the bricks will be settled as expected
    • 3 ms
      passedGiven the example snapshot input then the bricks that can be disintegrated can be calculated correctly
    • 1 ms
      passedGiven the example snapshot input then the number of bricks that can be disintegrated is 5
    • 41 ms
      passedGiven the custom snapshot input then the number of bricks that can be disintegrated is 512
  • 1.94 s
    Day22p2Tests
    • 34 ms
      parsing
      • 18 ms
        passedGiven the example snapshot input then it can be parsed as expected
      • 16 ms
        passedGiven the custom snapshot input then it can be parsed as expected
    • 9 ms
      passedGiven the example snapshot input when settled then the bricks will be settled as expected
    • 49 ms
      passedGiven the custom snapshot input when settled then the bricks will be settled as expected
    • 3 ms
      passedGiven the example snapshot input then the bricks that can be disintegrated can be calculated correctly
    • 2 ms
      passedGiven the example snapshot input then the number of bricks that can be disintegrated is 5
    • 47 ms
      passedGiven the custom snapshot input then the number of bricks that can be disintegrated is 512
    • 10 ms
      passedGiven the example snapshot input then the sum of other bricks to fall in chain reactions is 7
    • 1.78 s
      passedGiven the custom snapshot input then the sum of other bricks to fall in chain reactions is 98167
  • 572 ms
    Day23p1Tests
    • 153 ms
      Accessible map init
      • 18 ms
        passedGiven the example map then the path, slope and start and end tiles can be extracted correctly
      • 135 ms
        passedGiven the custom map then the path, slope and start and end tiles can be extracted correctly
    • 254 ms
      Accessible map keep important only
      • 31 ms
        passedGiven the accessible map created from example map then it can be simplified to keep the important parts only
      • 223 ms
        passedGiven the accessible map created from custom map then it can be simplified to keep the important parts only
    • 165 ms
      Accessible map hike finding
      • 7 ms
        passedGiven the accessible map created from example map then the length of the longest hike is 94
      • 158 ms
        passedGiven the accessible map created from custom map then the length of the longest hike is 2134
  • 2 m 23 s
    Day23p2Tests
    • 150 ms
      Accessible map init
      • 23 ms
        passedGiven the example map then the path, slope and start and end tiles can be extracted correctly
      • 127 ms
        passedGiven the custom map then the path, slope and start and end tiles can be extracted correctly
    • 149 ms
      Accessible map keep important only
      • 18 ms
        passedGiven the accessible map created from example map then it can be simplified to keep the important parts only
      • 131 ms
        passedGiven the accessible map created from custom map then it can be simplified to keep the important parts only
    • 2 m 23 s
      Accessible map hike finding
      • 6 ms
        passedGiven the accessible map created from example map then the length of the longest hike is 154
      • 2 m 23 s
        passedGiven the accessible map created from custom map then the length of the longest hike is 6298
  • 77 ms
    Day24p1Tests
    • 29 ms
      parsing
      • 12 ms
        passedGiven an example hailstone as 19, 13, 30 @ -2, 1, -2 then it should be parsed correctly
      • 2 ms
        passedGiven the example input then the list of hailstones should be parsed correctly
      • 15 ms
        passedGiven the custom input then the list of hailstones should be parsed correctly
    • 48 ms
      test 2d intersection
      • 16 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven the example hailstone list and test range then the number of intersections should be 2
      • 22 ms
        passedGiven the custom hailstone list and test range then the number of intersections should be 20434
  • 3.47 s
    Day24p2Tests
    • 18 ms
      parsing
      • 11 ms
        passedGiven an example hailstone as 19, 13, 30 @ -2, 1, -2 then it should be parsed correctly
      • 2 ms
        passedGiven the example input then the list of hailstones should be parsed correctly
      • 5 ms
        passedGiven the custom input then the list of hailstones should be parsed correctly
    • 3.45 s
      test 2d intersection
      • 11 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven 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 ms
        passedGiven the example hailstone list and test range then the number of intersections should be 2
      • 308 ms
        passedGiven the custom hailstone list and test range then the number of intersections should be 20434
      • 3.10 s
        passedGiven the custom hailstone list then the collision stone should be (344525619959965, 437880958119624, 242720827369528, -99, -269, 81) with px + py + pz = 1025127405449117
  • 12.89 s
    Day25p1Tests
    • 102 ms
      passedGiven the example wiring diagram then the sizes of the 2 groups multiplied together is 54
    • 12.78 s
      passedGiven the custom wiring diagram then the sizes of the 2 groups multiplied together is 619225
  • 2 ms
    IOTests
    • 2 ms
      passedgiven a file, when calling readInput() it should return the content of the file

Generated by IntelliJ IDEA on 2024. 01. 31. 23:08