Select Git revision
BoidSuite.scala 872 B
package cosc250.boids
/**
* A place for you to write some boid tests.
*
* Boids are an immutable class containing functions. That makes them relatively straightforward to test --
* except that the values within them are doubles, which are hard to compare exactly. Instead, test if they
* are close (i.e. within a certain amount +/- what you're looking for).
*/
class BoidSuite extends munit.FunSuite {
// A place for you to write tests. Some suggested tests to start with have been sketched below
// Let's start with the extension methods closeTo, centroid and averageVelocity on Seq[Boid]...
test("Seq[Boid] should be able to filter just those close to a certain point") {
???
}
test("Seq[Boid] should be able to calculate its centroid") {
???
}
test("Seq[Boid] should be able to calculate its average velocity") {
???
}
}