2 use Test::More qw(no_plan);
3 use Data::Query::ExprBuilder::Identifier;
4 use Data::Query::Constants qw(DQ_IDENTIFIER DQ_OPERATOR DQ_VALUE);
11 local $_ = Data::Query::ExprBuilder::Identifier->new({
13 type => DQ_IDENTIFIER,
22 is_deeply(_mk_expr($sub), @_);
27 type => DQ_IDENTIFIER,
30 'Simple identifier ok';
33 expr_is { $_->foo->bar }
35 type => DQ_IDENTIFIER,
36 elements => [ 'foo', 'bar' ]
38 'Nested identifier ok';
40 expr_is { $_->foo == 3 }
43 operator => { perl => '==' },
48 subtype => { perl => 'Scalar' },
55 expr_is { $_->foo == 3 }
58 operator => { perl => '==' },
63 subtype => { perl => 'Scalar' },
70 expr_is { 3 == $_->foo }
73 operator => { perl => '==' },
77 subtype => { perl => 'Scalar' },
83 'Operand reversed equality ok';