assertSame($expected, $specification->passes()); } /** * @return \Generator */ public function passesProvider() : Generator { yield [ SamplesAreCompatibleWithDistance::with( Unlabeled::quick([ ['swamp', 'island', 'black knight', 'counter spell'], ]), new Hamming() ), true, ]; yield [ SamplesAreCompatibleWithDistance::with( Unlabeled::quick([ [6.0, -1.1, 5, 'college'], ]), new Euclidean() ), false, ]; yield [ SamplesAreCompatibleWithDistance::with( Unlabeled::quick([ [6.0, -1.1, 5, 'college'], ]), new Hamming() ), false, ]; yield [ SamplesAreCompatibleWithDistance::with( Unlabeled::quick([ [1, 2, 3, 4, 5], ]), new Euclidean() ), true, ]; } }