public void Test_0001_ClauseConstructor() { Clause target = new Clause(new[] { 2, 3, 6 }, new [] { 1, 4 }); Assert.IsNotNull(target, "Could not create clause instance."); Assert.IsFalse(target.IsUnsat); }
public void Test_0005_Clone() { Clause source = new Clause(new [] { 2, 3, 6 }, new [] { 1, 4 }); Clause clone = source.Clone() as Clause; Assert.IsNotNull(clone, "Could not clone instance."); clone.SubstituteAsTrue(1); clone.SubstituteAsFalse(2); }
public object Clone() { Clause c = new Clause { _variables = new HashSet<int>(_variables), _negatedVariables = new HashSet<int>(_negatedVariables), _isUnsat = _isUnsat }; return c; }
public void Test_0004_ClauseConstructor() { Clause target = new Clause(new [] { 2, 0, 6 }, null); Assert.IsNotNull(target); }
public void Test_0003_ClauseConstructor() { Clause target = new Clause(null, new [] { 1, 2, 4 }); Assert.IsNotNull(target); }