Skip to content

Commit 8835891

Browse files
authored
Minor compatibility fixes for google3-import. (#1198)
1 parent 9453cde commit 8835891

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

cel/folding.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func MaxConstantFoldIterations(limit int) ConstantFoldingOption {
3838
}
3939
}
4040

41-
// Adds an Activation which provides known values for the folding evaluator
41+
// FoldKnownValues adds an Activation which provides known values for the folding evaluator
4242
//
4343
// Any values the activation provides will be used by the constant folder and turned into
4444
// literals in the AST.

cel/folding_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,9 @@ func TestConstantFoldingOptimizer(t *testing.T) {
332332
EnableMacroCallTracking(),
333333
Types(&proto3pb.TestAllTypes{}),
334334
Variable("x", DynType),
335-
Constant("c", IntType, types.Int(proto3pb.ImportedGlobalEnum_IMPORT_BAZ)),
335+
// work around different package convention in piper vs github.
336+
// google.expr.proto3.test.ImportedGlobalEnum.IMPORT_BAZ
337+
Constant("c", IntType, types.Int(2)),
336338
)
337339
if err != nil {
338340
t.Fatalf("NewEnv() failed: %v", err)

0 commit comments

Comments
 (0)