Pattern-matching for associated-value enum done with test cases