diff --git a/test/test-sat.js b/test/test-sat.js new file mode 100644 index 0000000..e387a2e --- /dev/null +++ b/test/test-sat.js @@ -0,0 +1,17 @@ +var m = sat.solver() +sat.R(m,sat.L.atMostOne("Alice", "Bob")) +sat.R(m,sat.L.or("Bob", "Charlie")) +sat.solve(m); +print(sat.solve(m)) +print(sat.solve(m,'Alice')) + +var m1 = sat.solver() +sat.R(m1,sat.L.atMostOne("Alice", "Bob")) + +var m2 = JSON.parse(JSON.stringify(m1)) + +m2.id=null; +sat.R(m2,sat.L.or("Bob", "Charlie")) +print(sat.solve(m2)) +print(sat.solve(m2,'Alice')) +