@@ -554,6 +554,10 @@ public void isSatisfiable_timeout_throwsException() throws Exception {
554554
555555 private enum IsAlwaysTrueTestCase {
556556 LOGICAL_OR_CONSTANTS ("true || false" ),
557+ BOOL_ORDERING (
558+ "false < true && !(true < false) && false <= true && !(true <= false) && true > false"
559+ + " && !(false > true) && true >= false && !(false >= true)" ),
560+ BOOL_ORDERING_REFLEXIVE ("a <= a && a >= a && !(a < a) && !(a > a)" ),
557561 TIMESTAMP_GREATER_EQUALS ("timestamp(200) >= timestamp(100)" ),
558562 DURATION_GREATER_EQUALS (
559563 "(timestamp(200) - timestamp(100)) >= (timestamp(150) - timestamp(100))" ),
@@ -2853,6 +2857,27 @@ public void verifyEquivalence_identicalFunctionCalls_equivalent() throws Excepti
28532857 assertThat (result .status ()).isEqualTo (VerificationStatus .VERIFIED );
28542858 }
28552859
2860+ @ Test
2861+ public void isSatisfiable_customOperatorOverload_inconclusive () throws Exception {
2862+ // The custom overload has no axiom, so it must not fall through to the type-mismatch error.
2863+ CelCompiler celCompiler =
2864+ CEL .toCompilerBuilder ()
2865+ .addFunctionDeclarations (
2866+ CelFunctionDecl .newFunctionDeclaration (
2867+ Operator .LESS .getFunction (),
2868+ CelOverloadDecl .newGlobalOverload (
2869+ "less_list_int" ,
2870+ SimpleType .BOOL ,
2871+ ListType .create (SimpleType .INT ),
2872+ ListType .create (SimpleType .INT ))))
2873+ .build ();
2874+ CelAbstractSyntaxTree ast = celCompiler .compile ("!(int_list < int_list_2)" ).getAst ();
2875+
2876+ CelVerificationResult result = VERIFIER .isSatisfiable (ast );
2877+
2878+ assertThat (result .status ()).isEqualTo (VerificationStatus .INCONCLUSIVE );
2879+ }
2880+
28562881 @ Test
28572882 @ SuppressWarnings ("GoodTime-ApiWithNumericTimeUnit" ) // Test only
28582883 public void setTimeout_invalidDuration_throws (@ TestParameter ({"0" , "-1" }) long timeoutSeconds ) {
0 commit comments