Permalink
Browse files

Using can_ok. What is the difference between that and the exists kmx?

  • Loading branch information...
Kartik Thakore
Kartik Thakore committed Mar 5, 2013
1 parent ed52cc4 commit 62dd526e759ef75ce2b93acf2ac4672aefbbb81c
Showing with 5 additions and 1 deletion.
  1. +2 −0 t/101_sdl2_rect.t
  2. +3 −1 t/102_sdl2_window.t
View
@@ -11,6 +11,8 @@ use SDL2::Rect;
ok( exists &SDL2::Rect::new, 'new exists');
+can_ok('SDL2::Rect', qw/new/);
+
my $rect = SDL2::Rect->new(0,0,0,0);
isa_ok($rect, 'SDL2::Rect', 'new makes an SDL2::Rect');
View
@@ -10,7 +10,9 @@ BEGIN {
use SDL2::Window;
ok( exists &SDL2::Window::new, 'new exists');
+can_ok('SDL2::Window', qw/new/);
+
ok 1, 'success 1';
ok 1, 'success 2';
-done_testing();
+done_testing();

0 comments on commit 62dd526

Please sign in to comment.