Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Glavo committed Jul 14, 2024
1 parent d16d3be commit 8c9dd23
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 68 deletions.
15 changes: 15 additions & 0 deletions src/test/java/kala/collection/ArraySeqTest.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2024 Glavo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kala.collection;

import kala.collection.factory.CollectionFactory;
Expand Down
53 changes: 34 additions & 19 deletions src/test/java/kala/collection/SimpleIterable.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
package kala.collection;

import org.jetbrains.annotations.NotNull;

import java.util.Iterator;

@SuppressWarnings("unchecked")
public final class SimpleIterable<E> implements Iterable<E> {
private final Iterable<? extends E> source;

public SimpleIterable(Iterable<? extends E> source) {
this.source = source;
}

@Override
public @NotNull Iterator<E> iterator() {
return (Iterator<E>) source.iterator();
}
}
/*
* Copyright 2024 Glavo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kala.collection;

import org.jetbrains.annotations.NotNull;

import java.util.Iterator;

@SuppressWarnings("unchecked")
public final class SimpleIterable<E> implements Iterable<E> {
private final Iterable<? extends E> source;

public SimpleIterable(Iterable<? extends E> source) {
this.source = source;
}

@Override
public @NotNull Iterator<E> iterator() {
return (Iterator<E>) source.iterator();
}
}
15 changes: 15 additions & 0 deletions src/test/java/kala/collection/SimpleSeqTest.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2024 Glavo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kala.collection;

import kala.collection.factory.CollectionFactory;
Expand Down
Loading

0 comments on commit 8c9dd23

Please sign in to comment.