cases pattern tests