d75d00bb19261538fef7df71bfd994e0e79b216c
[scpubgit/DX.git] / t / 01basics.t
1 use strictures 1;
2 use Test::More;
3 use Module::Runtime qw(use_module);
4 use DX::Utils qw(:builders);
5
6 my $ab = use_module('DX::ActionBuilder::UnsetValue')->new(
7   target_path => [ 0, 'X' ]
8 );
9
10 my $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
27 my $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'),
32   ],
33   actions => [],
34 );
35
36 my $ss = use_module('DX::SearchState')->new(
37   current_hypothesis => $hyp,
38   alternatives => [],
39 );
40
41 ::Dwarn($ss->with_one_step);