use strict;
use warnings;
-use base qw(Test::Builder::Module Exporter);
+use base qw(Test::Builder::Module);
use Test::Builder;
use Test::Deep ();
use SQL::Abstract::Tree;
my $sql2 = shift || '';
my $tb = $tb || __PACKAGE__->builder;
+
+ if (my $profile = $ENV{SQL_ABSTRACT_TEST_TREE_PROFILE}) {
+ my $sqlat = SQL::Abstract::Tree->new(profile => $profile);
+ $_ = $sqlat->format($_) for ($sql1, $sql2);
+ }
+
$tb->${\($tb->in_todo ? 'note' : 'diag')} (
"SQL expressions differ\n"
." got: $sql1\n"
sub _bind_differ_diag {
my ($bind_ref1, $bind_ref2) = @_;
- my $tb = __PACKAGE__->builder;
+ my $tb = $tb || __PACKAGE__->builder;
$tb->${\($tb->in_todo ? 'note' : 'diag')} (
"BIND values differ " . dumper({ got => $bind_ref1, want => $bind_ref2 })
);