Skip to content

Commit

Permalink
add test for privately reported issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Felix committed Jan 14, 2024
1 parent 1bc97d4 commit 54f650e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Tests/UIntTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,24 @@ public void UIntGreaterEqual()
}
}

[TestMethod]
public void ConversionFromLinExpr()
{
var m = new Model();

var J0 = m.AddUIntVar(7);
var J1 = m.AddUIntVar(7);

m.AddConstr(J0 == 7);

m.AddConstr(J1 == ((J0 + 1).ToUInt(m) & 0x7));
m.Solve();

Assert.AreEqual(State.Satisfiable, m.State);
Assert.AreEqual(7, J0.X);
Assert.AreEqual(0, J1.X);
}

[TestMethod]
public void UIntAddBool()
{
Expand Down

0 comments on commit 54f650e

Please sign in to comment.