chiark / gitweb /
Move unused dependency to test deps
[nailing-cargo.git] / t / toml-test / valid / inline-table.t
index 4019c15c2f82adeea2481304e2413ee52ba7d7d5..53aeb0660da6b73b53e216f159cdd3fa1773528b 100644 (file)
@@ -2,6 +2,10 @@
 use utf8;
 use Test2::V0;
 use Data::Dumper;
+use DateTime;
+use DateTime::Format::RFC3339;
+use Math::BigInt;
+use Math::BigFloat;
 use TOML::Tiny;
 
 binmode STDIN,  ':encoding(UTF-8)';
@@ -9,49 +13,48 @@ binmode STDOUT, ':encoding(UTF-8)';
 
 my $expected1 = {
                'name' => {
-                           'first' => 'Tom',
-                           'last' => 'Preston-Werner'
+                           'last' => 'Preston-Werner',
+                           'first' => 'Tom'
                          },
                'point' => {
-                            'y' => bless( {
-                                            '_file' => '(eval 399)',
+                            'x' => bless( {
+                                            '_lines' => [
+                                                          6
+                                                        ],
                                             'code' => sub {
                                                           BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x54"}
                                                           use strict;
                                                           no feature ':all';
                                                           use feature ':5.16';
                                                           require Math::BigInt;
-                                                          'Math::BigInt'->new('2')->beq($_);
+                                                          'Math::BigInt'->new('1')->beq($_);
                                                       },
+                                            '_file' => '(eval 401)',
+                                            'name' => '<Custom Code>',
+                                            'operator' => 'CODE(...)'
+                                          }, 'Test2::Compare::Custom' ),
+                            'y' => bless( {
                                             '_lines' => [
                                                           6
                                                         ],
-                                            'operator' => 'CODE(...)',
-                                            'name' => '<Custom Code>'
-                                          }, 'Test2::Compare::Custom' ),
-                            'x' => bless( {
-                                            'name' => '<Custom Code>',
-                                            'operator' => 'CODE(...)',
                                             'code' => sub {
                                                           BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x54"}
                                                           use strict;
                                                           no feature ':all';
                                                           use feature ':5.16';
                                                           require Math::BigInt;
-                                                          'Math::BigInt'->new('1')->beq($_);
+                                                          'Math::BigInt'->new('2')->beq($_);
                                                       },
-                                            '_lines' => [
-                                                          6
-                                                        ],
-                                            '_file' => '(eval 400)'
+                                            '_file' => '(eval 400)',
+                                            'operator' => 'CODE(...)',
+                                            'name' => '<Custom Code>'
                                           }, 'Test2::Compare::Custom' )
                           },
                'simple' => {
                              'a' => bless( {
-                                             '_file' => '(eval 401)',
-                                             '_lines' => [
-                                                           6
-                                                         ],
+                                             'name' => '<Custom Code>',
+                                             'operator' => 'CODE(...)',
+                                             '_file' => '(eval 399)',
                                              'code' => sub {
                                                            BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x54"}
                                                            use strict;
@@ -60,36 +63,17 @@ my $expected1 = {
                                                            require Math::BigInt;
                                                            'Math::BigInt'->new('1')->beq($_);
                                                        },
-                                             'operator' => 'CODE(...)',
-                                             'name' => '<Custom Code>'
+                                             '_lines' => [
+                                                           6
+                                                         ]
                                            }, 'Test2::Compare::Custom' )
                            },
-               'str-key' => {
-                              'a' => bless( {
-                                              'name' => '<Custom Code>',
-                                              'operator' => 'CODE(...)',
-                                              '_lines' => [
-                                                            6
-                                                          ],
-                                              'code' => sub {
-                                                            BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x54"}
-                                                            use strict;
-                                                            no feature ':all';
-                                                            use feature ':5.16';
-                                                            require Math::BigInt;
-                                                            'Math::BigInt'->new('1')->beq($_);
-                                                        },
-                                              '_file' => '(eval 404)'
-                                            }, 'Test2::Compare::Custom' )
-                            },
                'table-array' => [
                                   {
                                     'a' => bless( {
-                                                    'operator' => 'CODE(...)',
                                                     'name' => '<Custom Code>',
-                                                    '_lines' => [
-                                                                  6
-                                                                ],
+                                                    'operator' => 'CODE(...)',
+                                                    '_file' => '(eval 403)',
                                                     'code' => sub {
                                                                   BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x54"}
                                                                   use strict;
@@ -98,17 +82,15 @@ my $expected1 = {
                                                                   require Math::BigInt;
                                                                   'Math::BigInt'->new('1')->beq($_);
                                                               },
-                                                    '_file' => '(eval 402)'
+                                                    '_lines' => [
+                                                                  6
+                                                                ]
                                                   }, 'Test2::Compare::Custom' )
                                   },
                                   {
                                     'b' => bless( {
-                                                    '_file' => '(eval 403)',
-                                                    'operator' => 'CODE(...)',
                                                     'name' => '<Custom Code>',
-                                                    '_lines' => [
-                                                                  6
-                                                                ],
+                                                    'operator' => 'CODE(...)',
                                                     'code' => sub {
                                                                   BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x54"}
                                                                   use strict;
@@ -116,10 +98,32 @@ my $expected1 = {
                                                                   use feature ':5.16';
                                                                   require Math::BigInt;
                                                                   'Math::BigInt'->new('2')->beq($_);
-                                                              }
+                                                              },
+                                                    '_file' => '(eval 404)',
+                                                    '_lines' => [
+                                                                  6
+                                                                ]
                                                   }, 'Test2::Compare::Custom' )
                                   }
-                                ]
+                                ],
+               'str-key' => {
+                              'a' => bless( {
+                                              '_file' => '(eval 402)',
+                                              'code' => sub {
+                                                            BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x54"}
+                                                            use strict;
+                                                            no feature ':all';
+                                                            use feature ':5.16';
+                                                            require Math::BigInt;
+                                                            'Math::BigInt'->new('1')->beq($_);
+                                                        },
+                                              'name' => '<Custom Code>',
+                                              'operator' => 'CODE(...)',
+                                              '_lines' => [
+                                                            6
+                                                          ]
+                                            }, 'Test2::Compare::Custom' )
+                            }
              };