Advertisement
Guest User

Untitled

a guest
Mar 26th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. use t::FanLang 'no_plan';
  2.  
  3. #no_diff();
  4. run_tests();
  5.  
  6. __DATA__
  7.  
  8. === TEST 1: hello world
  9. --- fan
  10. say("hello, world");
  11. --- out
  12. hello, world
  13.  
  14.  
  15.  
  16. === TEST 2: simple arithmetic
  17. --- fan
  18. say(3+5*2);
  19. --- out
  20. 13
  21.  
  22.  
  23.  
  24. === TEST 3: code block
  25. --- fan
  26. {
  27. print("hi, ");
  28. say(56.4);
  29. }
  30. --- out
  31. hi, 56.4
  32.  
  33.  
  34.  
  35. === TEST 4: with unary -
  36. --- fan
  37. say(-32 + 1);
  38. --- out
  39. -31
  40.  
  41.  
  42.  
  43. === TEST 5: with unary +
  44. --- fan
  45. say(+32 + 1);
  46. --- out
  47. 33
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement