/t/core_multi.t

http://github.com/PerlGameDev/SDL · Perl · 59 lines · 50 code · 8 blank · 1 comment · 2 complexity · 82ddb926895adb874dae58ff002ddb53 MD5 · raw file

  1. #!/usr/bin/perl -w
  2. use strict;
  3. use warnings;
  4. use SDL;
  5. use Test::More;
  6. plan( tests => 4 );
  7. my @done = qw/ none /;
  8. use_ok('SDL::MultiThread');
  9. SKIP:
  10. {
  11. skip 'Not implemented', 1;
  12. can_ok( 'SDL::MultiThread ', @done );
  13. }
  14. my @left = qw/
  15. create_thread
  16. thread_id
  17. get_thread_id
  18. wait_thread
  19. kill_thread
  20. create_mutex
  21. destroy_mutex
  22. mutex_P
  23. mutex_V
  24. create_semaphore
  25. destroy_semaphore
  26. sem_wait
  27. sem_try_wait
  28. sem_wait_timeout
  29. sem_post
  30. sem_value
  31. create_cond
  32. destroy_cond
  33. cond_signal
  34. cond_broadcast
  35. cond_wait
  36. cond_wait_timeout
  37. /;
  38. my $why =
  39. '[Percentage Completion] '
  40. . int( 100 * $#done / ( $#done + $#left ) )
  41. . "\% implementation. $#done / "
  42. . ( $#done + $#left );
  43. TODO:
  44. {
  45. local $TODO = $why;
  46. pass "\nThe following functions:\n" . join ",", @left;
  47. }
  48. if ( $done[0] eq 'none' ) { print '0% done 0/' . $#left . "\n" }
  49. else { print "$why\n" }
  50. pass 'Are we still alive? Checking for segfaults';
  51. sleep(2);