Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import static com.google.common.truth.Truth.assertThat;
import static com.google.common.truth.extensions.proto.ProtoTruth.assertThat;
import static com.google.protobuf.LegacyUnredactedTextFormat.legacyUnredactedStringValueOf;
import static dev.cel.testing.utils.ExprValueUtils.toExprValue;

import dev.cel.expr.ExprValue;
Expand Down Expand Up @@ -69,7 +70,7 @@ public void match(ResultMatcherParams params, Cel cel) throws Exception {
if (params.computedOutput().kind().equals(ComputedOutput.Kind.EXPR_VALUE)) {
throw new AssertionError(
"Evaluation was successful but no value was provided. Computed output: "
+ params.computedOutput().exprValue());
+ legacyUnredactedStringValueOf(params.computedOutput().exprValue()));
}
assertThat(params.computedOutput().error().toString())
.contains(result.evalError().get(0).toString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ public void match_expectedEvalErrorAndComputedExprValue_failure() throws Excepti

assertThat(thrown)
.hasMessageThat()
.contains("Evaluation was successful but no value was provided. Computed output:");
assertThat(thrown).hasMessageThat().contains("value {\n int64_value: 3\n}");
.contains(
"Evaluation was successful but no value was provided. Computed output: value {\n"
+ " int64_value: 3\n"
+ "}");
}
}