bdd.setVarOrder(new int[] { 0, 1, 2, 3, 4 });
try { bdd.setVarOrder(new int[] { 0, 1, 2, 3, 4 }); } catch (UnsupportedOperationException _) { System.err.println("Warning: "+bdd.getVersion()+" does not support setVarOrder()"); continue; }
    public void testVarOrder() {        reset();        Assert.assertTrue(hasNext());        while (hasNext()) {            BDDFactory bdd = nextFactory();            if (bdd.varNum() < 5) bdd.setVarNum(5);            bdd.setVarOrder(new int[] { 0, 1, 2, 3, 4 });            BDD a = bdd.ithVar(0);            BDD b = bdd.ithVar(1);            BDD c = bdd.ithVar(2);            BDD d = bdd.ithVar(3);            BDD e = bdd.ithVar(4);            Assert.assertEquals(0, a.var());            Assert.assertEquals(1, b.var());            Assert.assertEquals(2, c.var());            Assert.assertEquals(3, d.var());            Assert.assertEquals(4, e.var());            bdd.setVarOrder(new int[] { 2, 3, 4, 0, 1 });            Assert.assertEquals(0, a.var());            Assert.assertEquals(1, b.var());            Assert.assertEquals(2, c.var());            Assert.assertEquals(3, d.var());            Assert.assertEquals(4, e.var());            Assert.assertEquals(3, a.level());            Assert.assertEquals(4, b.level());            Assert.assertEquals(0, c.level());            Assert.assertEquals(1, d.level());            Assert.assertEquals(2, e.level());            a.free(); b.free(); c.free(); d.free(); e.free();        }    }