Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add test for RT#48928

  • Loading branch information...
commit 418f0fc953bc4f76acea0e5b3c811c4026599ca8 1 parent 3fd315b
Ash Berlin authored September 07, 2009
27  t/lib/NoType.pm
... ...
@@ -0,0 +1,27 @@
  1
+package NoType;
  2
+
  3
+use strict;
  4
+use warnings;
  5
+
  6
+#use Moose;
  7
+use TryCatch;
  8
+
  9
+BEGIN { 
  10
+    package Error;
  11
+    sub new { bless {}, $_[0]}
  12
+    #use Moose;
  13
+}
  14
+my $t = Error->new;
  15
+
  16
+sub error {
  17
+    die bless {}, 'Error';
  18
+}
  19
+
  20
+try {
  21
+    error();
  22
+}
  23
+catch(Error $e) {
  24
+    print "Error catched\n";
  25
+}
  26
+
  27
+1;
20  t/types.t
... ...
@@ -0,0 +1,20 @@
  1
+use strict;
  2
+use warnings;
  3
+use Test::More;
  4
+
  5
+use FindBin qw/$Bin/;
  6
+
  7
+use lib "$Bin/lib";
  8
+use TryCatch;
  9
+
  10
+try {
  11
+  require NoType;
  12
+  pass("Types dont need to be pre-declared");
  13
+}
  14
+catch ($e) {
  15
+  fail("Types dont need to be pre-declared");
  16
+  diag($e);
  17
+}
  18
+
  19
+done_testing;
  20
+

0 notes on commit 418f0fc

Please sign in to comment.
Something went wrong with that request. Please try again.