Classification

org.scalatest.prop.Classification
case class Classification(totalGenerated: PosInt, totals: Map[String, PosZInt])

The results of a call to CommonGenerators.classify.

The classify function takes a PartialFunction and a Generator, and organizes the values created by the Generator based on the PartialFunction. It returns this data structure, which describes how many of the values went into each bucket.

If the PartialFunction did not cover all the possible generated values, then the totals field will not include the others, and the numbers in totals will add up to less than totalGenerated.

Value parameters

totalGenerated

How many values were actually created by the Generator overall.

totals

For each of the buckets defined in the PartialFunction, how many values belonged in each one.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def percentages: Map[String, PosZInt]

For each bucket, what percentage of the generated values fell into it?

For each bucket, what percentage of the generated values fell into it?

This is essentially a lower-precision but easier-to-understand variant of portions.

Attributes

Returns

Approximately what proportion of the values fell into each bucket.

def portions: Map[String, Double]

For each bucket, what fraction of the generated values fell into it?

For each bucket, what fraction of the generated values fell into it?

Attributes

Returns

Exactly what proportion of the values fell into each bucket.

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product