Skip to content

Commit

Permalink
No public description
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 606668350
  • Loading branch information
CEL Dev Team authored and copybara-github committed Feb 13, 2024
1 parent f98b582 commit 4a723aa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ maven_install(
"com.google.protobuf:protobuf-java:3.24.4",
"com.google.protobuf:protobuf-java-util:3.24.4",
"com.google.re2j:re2j:1.7",
"com.google.testparameterinjector:test-parameter-injector:1.14",
"com.google.testparameterinjector:test-parameter-injector:1.15",
"com.google.truth.extensions:truth-java8-extension:1.4.0",
"com.google.truth.extensions:truth-proto-extension:1.4.0",
"com.google.truth:truth:1.4.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableList;
import com.google.testing.junit.testparameterinjector.TestParameter.TestParameterValuesProvider;
import com.google.testing.junit.testparameterinjector.TestParameterValuesProvider;
import dev.cel.common.annotations.Internal;
import java.util.stream.IntStream;

Expand All @@ -34,11 +34,11 @@
*/
@Internal
@VisibleForTesting
public final class RepeatedTestProvider implements TestParameterValuesProvider {
public final class RepeatedTestProvider extends TestParameterValuesProvider {
private static final int REPEATED_TEST_RUN_COUNT = 50;

@Override
public ImmutableList<Integer> provideValues() {
public ImmutableList<Integer> provideValues(Context context) {
return IntStream.rangeClosed(1, REPEATED_TEST_RUN_COUNT).boxed().collect(toImmutableList());
}
}
10 changes: 5 additions & 5 deletions parser/src/test/java/dev/cel/parser/CelUnparserImplTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import static org.junit.Assert.assertThrows;

import com.google.testing.junit.testparameterinjector.TestParameter;
import com.google.testing.junit.testparameterinjector.TestParameter.TestParameterValuesProvider;
import com.google.testing.junit.testparameterinjector.TestParameterInjector;
import com.google.testing.junit.testparameterinjector.TestParameterValuesProvider;
import dev.cel.common.CelAbstractSyntaxTree;
import dev.cel.common.CelOptions;
import dev.cel.common.CelProtoAbstractSyntaxTree;
Expand All @@ -46,9 +46,9 @@ public final class CelUnparserImplTest {

private final CelUnparserImpl unparser = new CelUnparserImpl();

private static final class ValidExprDataProvider implements TestParameterValuesProvider {
private static final class ValidExprDataProvider extends TestParameterValuesProvider {
@Override
public List<String> provideValues() {
public List<String> provideValues(Context context) {
return Arrays.asList(
"a + b - c",
"a && b && c && d && e",
Expand Down Expand Up @@ -182,9 +182,9 @@ public void unparse_succeeds(
.isEqualTo(CelProtoAbstractSyntaxTree.fromCelAst(astOne).toParsedExpr());
}

private static final class InvalidExprDataProvider implements TestParameterValuesProvider {
private static final class InvalidExprDataProvider extends TestParameterValuesProvider {
@Override
public List<CelExpr> provideValues() {
public List<CelExpr> provideValues(Context context) {
return Arrays.asList(
CelExpr.newBuilder().build(), // empty expr
CelExpr.newBuilder()
Expand Down

0 comments on commit 4a723aa

Please sign in to comment.