implement ->equals for values
[scpubgit/DX.git] / t / 01basics.t
CommitLineData
efad53c4 1use strictures 1;
2use Test::More;
3use Module::Runtime qw(use_module);
1e812b19 4use DX::Utils qw(:builders deparse);
efad53c4 5
6my $ab = use_module('DX::ActionBuilder::UnsetValue')->new(
7 target_path => [ 0, 'X' ]
8);
9
10my $scope = use_module('DX::Scope')->new(
11 predicates => {
12 '=' => use_module('DX::Predicate::Equals')->new,
13 member_at => use_module('DX::Predicate::MemberAt')->new,
14 is_dict => use_module('DX::Predicate::IsDict')->new,
15 },
16 globals => dict(),
17 locals => [
18 dict(
19 X => use_module('DX::Value::Unset')->new(
20 identity_path => [ 0, 'X' ],
21 action_builder => $ab,
22 ),
23 ),
24 ],
25);
26
27my $hyp = use_module('DX::Hypothesis')->new(
28 scope => $scope,
29 resolved_propositions => use_module('DX::ResolvedPropositionSet')->new_empty,
30 outstanding_propositions => [
31 proposition(is_dict => 'X'),
0498469a 32 proposition(member_at => 'X', string('a'), string('b')),
9e13b86b 33 proposition(member_at => 'X', string('a'), string('b')),
efad53c4 34 ],
35 actions => [],
36);
37
38my $ss = use_module('DX::SearchState')->new(
39 current_hypothesis => $hyp,
40 alternatives => [],
41);
42
1e812b19 43#::Dwarn($ss->with_one_step->with_one_step);
9e13b86b 44warn deparse($ss->with_one_step->with_one_step->with_one_step);