File: Exception.t

package info (click to toggle)
libtest-simple-perl 1.302075-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,844 kB
  • ctags: 628
  • sloc: perl: 10,369; makefile: 2
file content (17 lines) | stat: -rw-r--r-- 446 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use strict;
use warnings;
use Test2::Tools::Tiny;
use Test2::Event::Exception;

my $exception = Test2::Event::Exception->new(
    trace => 'fake',
    error => "evil at lake_of_fire.t line 6\n",
);

ok($exception->causes_fail, "Exception events always cause failure");

is($exception->summary, "Exception: evil at lake_of_fire.t line 6", "Got summary");

ok($exception->diagnostics, "Exception events are counted as diagnostics");

done_testing;