tor-android/external/badvpn_dns/ncd/tests/multidepend.ncd

31 lines
694 B
Plaintext
Raw Normal View History

2015-01-25 11:08:34 +00:00
process main {
var("0") x;
process_manager() mgr;
var("false") backtrack_check;
backtrack_point() point;
If (backtrack_check) {
val_equal(x, "2") a; # must not have rebound temporarily to A during backtracking
assert(a);
exit("0");
};
multiprovide("A");
mgr->start("t1", "t1", {});
val_equal(x, "1") a; # must have bound to A immediately
assert(a);
multiprovide("B") mgr;
val_equal(x, "2") a; # must have rebound to B immediately
assert(a);
backtrack_check->set("true");
point->go();
}
template t1 {
multidepend({"B", "A"}) dep;
num_add(dep.x, "1") new_x;
dep.x->set(new_x);
}