Debian Codegraph @

t/03-h2x-oop.t

raw
1
2 use strict;
3 use warnings;
4
5 use Test::More tests => 2;
6
7 use XML::Hash::XS qw();
8
9 our $conv = XML::Hash::XS->new();
10 our $xml_decl = qq{<?xml version="1.0" encoding="utf-8"?>};
11
12 {
13 is
14 $conv->hash2xml( { node1 => sub { 'value1' } } ),
15 qq{$xml_decl\n<root><node1>value1</node1></root>},
16 'code reference',
17 ;
18 }
19
20 {
21 is
22 XML::Hash::XS::hash2xml( { node1 => sub { 'value1' } } ),
23 qq{$xml_decl\n<root><node1>value1</node1></root>},
24 'code reference',
25 ;
26 }