source:
NEMO/branches/UKMO/r8395_obs_oper_update/NEMOGCM/EXTERNAL/fcm/t/Fcm/Keyword/Exception.t
@
11350
Last change on this file since 11350 was 11350, checked in by jcastill, 5 years ago | |
---|---|
File size: 569 bytes |
Rev | Line | |
---|---|---|
[1980] | 1 | #!/usr/bin/perl |
2 | ||
3 | use strict; | |
4 | use warnings; | |
5 | ||
6 | use Test::More qw{no_plan}; | |
7 | ||
8 | main(); | |
9 | ||
10 | sub main { | |
11 | my $class = 'Fcm::Keyword::Exception'; | |
12 | use_ok($class); | |
13 | test_normal($class); | |
14 | } | |
15 | ||
16 | ################################################################################ | |
17 | # Tests normal usage | |
18 | sub test_normal { | |
19 | my ($class) = @_; | |
20 | my $prefix = 'normal'; | |
21 | my $e = $class->new({message => 'message'}); | |
22 | isa_ok($e, $class, $prefix); | |
23 | is("$e", "$class: message\n", "$prefix: as_string()"); | |
24 | is($e->get_message(), 'message', "$prefix: get_message()"); | |
25 | } | |
26 | ||
27 | __END__ |
Note: See TracBrowser
for help on using the repository browser.