Skip to content

Commit

Permalink
Update assignments (#30)
Browse files Browse the repository at this point in the history
* Improve descriptions (#28)

* Add more races
  • Loading branch information
basdgrt authored Oct 20, 2023
1 parent 759b040 commit 31b8947
Show file tree
Hide file tree
Showing 4 changed files with 2,398 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fun groupConstructorsByNationality(results: List<Result>): Map<String, List<Stri
}

/**
* Return a pair where first contains a list of all results with the 'Finished' status, and second
* Return a pair where [first] contains a list of all results with the 'Finished' status, and [second]
* contains all other results.
*/
fun partitionByStatus(results: List<Result>): Pair<List<Result>, List<Result>> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Collections01Test {

@Test
fun `total amount of races in the 2023 season`() {
assertEquals(3, amountOfRacesIn2023(F1DataSet.races))
assertEquals(6, amountOfRacesIn2023(F1DataSet.races))
}

@Test
Expand All @@ -16,7 +16,10 @@ class Collections01Test {
setOf(
"Bahrain International Circuit",
"Jeddah Corniche Circuit",
"Albert Park Grand Prix Circuit"
"Albert Park Grand Prix Circuit",
"Baku City Circuit",
"Miami International Autodrome",
"Circuit de Monaco"
), circuitNames(F1DataSet.races)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ class Collections06Test {
@Test
fun `total amount of points for driver`() {
val result = totalPointsForDriver("Verstappen", F1DataSet.races)
assertEquals(69, result)
assertEquals(138, result)
}
}
Loading

0 comments on commit 31b8947

Please sign in to comment.