Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions t/01-test_adapter.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/perl
use warnings;
use strict;

{ package Foo;
use Measure::Everything qw( $stats );

sub frobnicate {
$stats->write(Foo => @_);
}
}

use Test::More tests => 3;

use Measure::Everything::Adapter;
my $m = Measure::Everything::Adapter->set('Test');

is_deeply $m->get_stats, [], 'initialized';

Foo::frobnicate(42);
Foo::frobnicate(13);
is_deeply $m->get_stats, [['Foo', 42], ['Foo', 13]], 'store';

$m->reset;
is_deeply $m->get_stats, [], 'reset';