Advertisement
Y_Less

YSI_TEST.pwn

May 30th, 2014
368
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 4.03 KB | None | 0 0
  1. #if !defined _DEBUG
  2.     #define _DEBUG -1
  3. #endif
  4. #define FIXES_Single 0
  5.  
  6. #tryinclude "..\compile_flags.txt"
  7. #if !defined COMPILE_FLAGS
  8.     #define COMPILE_FLAGS "Pawno"
  9. #endif
  10.  
  11. // Currently "MTYPE 2" with "GTYPE 2" gives the most horrendous crash when the
  12. // mode ends, that I've ever seen!
  13. // "MTYPE 0", "GTYPE 2" also fails.  Won't fix!  Fixed!
  14. #if !defined MTYPE
  15.     #define MTYPE 1 // 0 - 3 (None  , Server, Cloud , Client)
  16. #endif
  17. #if !defined GTYPE
  18.     #define GTYPE 1 // 0 - 3 (First , Middle, End   , None  )
  19. #endif
  20.  
  21. #if MTYPE == 0
  22.     #define YSI_NO_MASTER
  23. #elseif MTYPE == 1
  24.     #define YSI_IS_SERVER
  25. #elseif MTYPE == 2
  26.     //#define YSI_IS_CLOUD // Doesn't exist (default).
  27. #elseif MTYPE == 3
  28.     #error Can't run tests as "CLIENT" (MTYPE 3).
  29.     #define YSI_IS_CLIENT
  30. #endif
  31.  
  32. #define MODE_NAME "YSI_TEST"
  33. #define PP_WP
  34. #define YSI_HASHMAP_TESTS
  35. #define Y_COMMANDS_NO_IPC
  36. #define YSI_TESTS
  37.  
  38. native WP_Hash(buffer[], len, const str[]);
  39.  
  40. #include <a_samp>
  41. #include <../fixes/fixes>
  42. //#include <fixes>
  43. #include <amx\disasm>
  44.  
  45. //#include <YSI_Server\y_lock>
  46.  
  47. public OnGameModeInit()
  48. {
  49.     #if defined YSI_OnGameModeInit
  50.         YSI_OnGameModeInit();
  51.     #endif
  52.     return 1;
  53. }
  54.  
  55. #if defined _ALS_OnGameModeInit
  56.     #undef OnGameModeInit
  57. #else
  58.     #define _ALS_OnGameModeInit
  59. #endif
  60. #define OnGameModeInit YSI_OnGameModeInit
  61.  
  62. #if defined YSI_OnGameModeInit
  63.     forward YSI_OnGameModeInit();
  64. #endif
  65.  
  66. #pragma dynamic 65536
  67.  
  68. #if GTYPE == 0
  69.     #include <YSI_Players\y_groups>
  70. #endif
  71.  
  72. // Failing tests are removed with "//", slow tests with "////".
  73. #include <YSI_Coding\y_hooks>
  74. #include <YSI_Coding\y_inline>
  75. #include <YSI_Coding\y_malloc>
  76. #include <YSI_Coding\y_remote>
  77. #include <YSI_Coding\y_stringhash>
  78. #include <YSI_Coding\y_timers>
  79. #include <YSI_Coding\y_va>
  80.  
  81. #include <YSI_Core\y_als>
  82. #include <YSI_Core\y_cell>
  83. #include <YSI_Core\y_debug>
  84. #include <YSI_Core\y_functional>
  85. #include <YSI_Core\y_master>
  86. #include <YSI_Core\y_testing>
  87. #include <YSI_Core\y_utils>
  88.  
  89. #include <YSI_Data\y_bintree>
  90. #include <YSI_Data\y_bit>
  91. #include <YSI_Data\y_hashmap>
  92. #include <YSI_Data\y_iterate>
  93. #include <YSI_Data\y_jaggedarray>
  94. #include <YSI_Data\y_playerarray>
  95. #include <YSI_Data\y_playerset>
  96.  
  97. #if GTYPE == 1
  98.     #include <YSI_Players\y_groups>
  99. #endif
  100. #include <YSI_Players\y_languages>
  101. #include <YSI_Players\y_text>
  102. #include <YSI_Players\y_users>
  103.  
  104. #include <YSI_Server\y_colours>
  105. #include <YSI_Server\y_flooding>
  106. #include <YSI_Server\y_punycode>
  107. #include <YSI_Server\y_scriptinit>
  108. #include <YSI_Server\y_td>
  109.  
  110. #include <YSI_Storage\y_amx>
  111. ////#include <YSI_Storage\y_bitmap>
  112. #include <YSI_Storage\y_ini>
  113. //#include <YSI_Storage\y_php>
  114. //#include <YSI_Storage\y_svar>
  115. //#include <YSI_Storage\y_uvar>
  116. #include <YSI_Storage\y_xml>
  117.  
  118. #include <YSI_Visual\y_areas>
  119. //#include <YSI_Visual\y_classes>
  120. #include <YSI_Visual\y_commands>
  121. #include <YSI_Visual\y_dialog>
  122. //#include <YSI_Visual\y_properties>
  123. #include <YSI_Visual\y_races>
  124. #include <YSI_Visual\y_zonenames>
  125. #include <YSI_Visual\y_zonepulse>
  126.  
  127. #if GTYPE == 2
  128.     #include <YSI_Players\y_groups>
  129. #endif
  130.  
  131. main()
  132. {
  133.     print("\n------------------------------");
  134.     print("|                            |");
  135.     print("|     YSI auto-test mode     |");
  136.     print("|                            |");
  137.     printf("| Compiler: 0x%04x           |", __Pawn);
  138.     print("| Flags:                     |");
  139.     printf("|  %24s  |", COMPILE_FLAGS);
  140.     print("|                            |");
  141.     print("------------------------------\n");
  142.     FIXES_ApplyAnimation(0, "", "", 0.0, 0, 0, 0, 0, 0, 0);
  143.     //DisasmDump("YSI_TEST.asm");
  144. }
  145.  
  146. public OnScriptInit()
  147. {
  148.     Langs_Add("English", "EN");
  149.     return 1;
  150. }
  151.  
  152. public OnTestsComplete(tests, fails)
  153. {
  154.     print("\n------------------------------");
  155.     print("|                            |");
  156.     print("|     YSI auto-test done     |");
  157.     print("|                            |");
  158.     printf("| Compiler: 0x%04x           |", __Pawn);
  159.     print("| Flags:                     |");
  160.     printf("|  %24s  |", COMPILE_FLAGS);
  161.     print("|                            |");
  162.     print("------------------------------\n");
  163. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement