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

32 lines
619 B
Plaintext
Raw Normal View History

2015-01-25 11:08:34 +00:00
process main {
value({}) list;
var("0") i;
backtrack_point() point;
num_lesser(i, "100") do_more;
If (do_more) {
list->insert(i);
num_add(i, "1") new_i;
i->set(new_i);
point->go();
};
val_equal(list.length, "100") a;
assert(a);
value({}) list;
var("0") i;
blocker() blk;
blk->up();
blk->use();
num_lesser(i, "100") do_more;
If (do_more) {
list->insert(i);
num_add(i, "1") new_i;
i->set(new_i);
blk->downup();
};
val_equal(list.length, "100") a;
assert(a);
exit("0");
}