Tests of flatten<T>