member_at starting to work
[scpubgit/DX.git] / t / 01basics.t
CommitLineData
efad53c4 1use strictures 1;
2use Test::More;
3use Module::Runtime qw(use_module);
4use DX::Utils qw(:builders);
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')),
efad53c4 33 ],
34 actions => [],
35);
36
37my $ss = use_module('DX::SearchState')->new(
38 current_hypothesis => $hyp,
39 alternatives => [],
40);
41
0498469a 42::Dwarn($ss->with_one_step->with_one_step);