diff --git a/ortools/sat/csharp/SatSolverTests.cs b/ortools/sat/csharp/SatSolverTests.cs index 1ffd859019..9b1c9db5b2 100644 --- a/ortools/sat/csharp/SatSolverTests.cs +++ b/ortools/sat/csharp/SatSolverTests.cs @@ -632,6 +632,20 @@ public class SatSolverTest Console.WriteLine("LinearExprBoolVarNotOperatorTest"); CpModel model = new CpModel(); ILiteral v = model.NewBoolVar("v"); + LinearExpr e = v.NotAsExpr() * 2; + Console.WriteLine(e); + e = 2 * v.NotAsExpr(); + Console.WriteLine(e); + e = v.NotAsExpr() + 2; + Console.WriteLine(e); + e = 2 + v.NotAsExpr(); + Console.WriteLine(e); + e = v.NotAsExpr(); + Console.WriteLine(e); + e = -v.NotAsExpr(); + Console.WriteLine(e); + e = 1 - v.NotAsExpr(); + Console.WriteLine(e); e = v.NotAsExpr() - 1; Console.WriteLine(e); }