Advertisement
Guest User

Untitled

a guest
Nov 12th, 2018
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. use v6.c;
  2. use Test; # a Standard module included with Rakudo
  3. use lib 'lib';
  4.  
  5. use AI::Agent::Agent;
  6. use AI::Agent::HashedAgent;
  7.  
  8. my $num-tests = 2;
  9.  
  10. plan $num-tests;
  11.  
  12. # .... tests
  13. #
  14.  
  15. my $msg = "ask about";
  16. my %optargs;
  17. my $ag = AI::Agent::Agent.new( x => 0 );
  18. ok $ag.dispatch($msg, %optargs),
  19. "You can ask me the following :
  20. RET
  21. agent, dispatch args=agent, agent instance
  22. RET
  23. ";
  24.  
  25. my $hag = AI::Agent::HashedAgent.new( x => 0 );
  26. ok $hag.dispatch($msg, %optargs),
  27. "You can ask me the following:
  28. RET
  29. agent, dispatch args = \{ agent, agent instance \}
  30. RET
  31. ";
  32.  
  33. done-testing; # optional with 'plan'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement