testautomation_platform.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597
  1. /**
  2. * Original code: automated SDL platform test written by Edgar Simo "bobbens"
  3. * Extended and updated by aschiffler at ferzkopp dot net
  4. */
  5. #include <stdio.h>
  6. #include "SDL.h"
  7. #include "SDL_test.h"
  8. /* ================= Test Case Implementation ================== */
  9. /* Helper functions */
  10. /**
  11. * @brief Compare sizes of types.
  12. *
  13. * @note Watcom C flags these as Warning 201: "Unreachable code" if you just
  14. * compare them directly, so we push it through a function to keep the
  15. * compiler quiet. --ryan.
  16. */
  17. static int _compareSizeOfType( size_t sizeoftype, size_t hardcodetype )
  18. {
  19. return sizeoftype != hardcodetype;
  20. }
  21. /* Test case functions */
  22. /**
  23. * @brief Tests type sizes.
  24. */
  25. int platform_testTypes(void *arg)
  26. {
  27. int ret;
  28. ret = _compareSizeOfType( sizeof(Uint8), 1 );
  29. SDLTest_AssertCheck( ret == 0, "sizeof(Uint8) = %lu, expected 1", sizeof(Uint8) );
  30. ret = _compareSizeOfType( sizeof(Uint16), 2 );
  31. SDLTest_AssertCheck( ret == 0, "sizeof(Uint16) = %lu, expected 2", sizeof(Uint16) );
  32. ret = _compareSizeOfType( sizeof(Uint32), 4 );
  33. SDLTest_AssertCheck( ret == 0, "sizeof(Uint32) = %lu, expected 4", sizeof(Uint32) );
  34. ret = _compareSizeOfType( sizeof(Uint64), 8 );
  35. SDLTest_AssertCheck( ret == 0, "sizeof(Uint64) = %lu, expected 8", sizeof(Uint64) );
  36. return TEST_COMPLETED;
  37. }
  38. /**
  39. * @brief Tests platform endianness and SDL_SwapXY functions.
  40. */
  41. int platform_testEndianessAndSwap(void *arg)
  42. {
  43. int real_byteorder;
  44. Uint16 value = 0x1234;
  45. Uint16 value16 = 0xCDAB;
  46. Uint16 swapped16 = 0xABCD;
  47. Uint32 value32 = 0xEFBEADDE;
  48. Uint32 swapped32 = 0xDEADBEEF;
  49. Uint64 value64, swapped64;
  50. value64 = 0xEFBEADDE;
  51. value64 <<= 32;
  52. value64 |= 0xCDAB3412;
  53. swapped64 = 0x1234ABCD;
  54. swapped64 <<= 32;
  55. swapped64 |= 0xDEADBEEF;
  56. if ((*((char *) &value) >> 4) == 0x1) {
  57. real_byteorder = SDL_BIG_ENDIAN;
  58. } else {
  59. real_byteorder = SDL_LIL_ENDIAN;
  60. }
  61. /* Test endianness. */
  62. SDLTest_AssertCheck( real_byteorder == SDL_BYTEORDER,
  63. "Machine detected as %s endian, appears to be %s endian.",
  64. (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? "little" : "big",
  65. (real_byteorder == SDL_LIL_ENDIAN) ? "little" : "big" );
  66. /* Test 16 swap. */
  67. SDLTest_AssertCheck( SDL_Swap16(value16) == swapped16,
  68. "SDL_Swap16(): 16 bit swapped: 0x%X => 0x%X",
  69. value16, SDL_Swap16(value16) );
  70. /* Test 32 swap. */
  71. SDLTest_AssertCheck( SDL_Swap32(value32) == swapped32,
  72. "SDL_Swap32(): 32 bit swapped: 0x%X => 0x%X",
  73. value32, SDL_Swap32(value32) );
  74. /* Test 64 swap. */
  75. SDLTest_AssertCheck( SDL_Swap64(value64) == swapped64,
  76. #ifdef _MSC_VER
  77. "SDL_Swap64(): 64 bit swapped: 0x%I64X => 0x%I64X",
  78. #else
  79. "SDL_Swap64(): 64 bit swapped: 0x%llX => 0x%llX",
  80. #endif
  81. value64, SDL_Swap64(value64) );
  82. return TEST_COMPLETED;
  83. }
  84. /* !
  85. * \brief Tests SDL_GetXYZ() functions
  86. * \sa
  87. * http://wiki.libsdl.org/moin.cgi/SDL_GetPlatform
  88. * http://wiki.libsdl.org/moin.cgi/SDL_GetCPUCount
  89. * http://wiki.libsdl.org/moin.cgi/SDL_GetCPUCacheLineSize
  90. * http://wiki.libsdl.org/moin.cgi/SDL_GetRevision
  91. * http://wiki.libsdl.org/moin.cgi/SDL_GetRevisionNumber
  92. */
  93. int platform_testGetFunctions (void *arg)
  94. {
  95. char *platform;
  96. char *revision;
  97. int ret;
  98. int len;
  99. platform = (char *)SDL_GetPlatform();
  100. SDLTest_AssertPass("SDL_GetPlatform()");
  101. SDLTest_AssertCheck(platform != NULL, "SDL_GetPlatform() != NULL");
  102. if (platform != NULL) {
  103. len = SDL_strlen(platform);
  104. SDLTest_AssertCheck(len > 0,
  105. "SDL_GetPlatform(): expected non-empty platform, was platform: '%s', len: %i",
  106. platform,
  107. len);
  108. }
  109. ret = SDL_GetCPUCount();
  110. SDLTest_AssertPass("SDL_GetCPUCount()");
  111. SDLTest_AssertCheck(ret > 0,
  112. "SDL_GetCPUCount(): expected count > 0, was: %i",
  113. ret);
  114. ret = SDL_GetCPUCacheLineSize();
  115. SDLTest_AssertPass("SDL_GetCPUCacheLineSize()");
  116. SDLTest_AssertCheck(ret >= 0,
  117. "SDL_GetCPUCacheLineSize(): expected size >= 0, was: %i",
  118. ret);
  119. revision = (char *)SDL_GetRevision();
  120. SDLTest_AssertPass("SDL_GetRevision()");
  121. SDLTest_AssertCheck(revision != NULL, "SDL_GetRevision() != NULL");
  122. ret = SDL_GetRevisionNumber();
  123. SDLTest_AssertPass("SDL_GetRevisionNumber()");
  124. return TEST_COMPLETED;
  125. }
  126. /* !
  127. * \brief Tests SDL_HasXYZ() functions
  128. * \sa
  129. * http://wiki.libsdl.org/moin.cgi/SDL_Has3DNow
  130. * http://wiki.libsdl.org/moin.cgi/SDL_HasAltiVec
  131. * http://wiki.libsdl.org/moin.cgi/SDL_HasMMX
  132. * http://wiki.libsdl.org/moin.cgi/SDL_HasRDTSC
  133. * http://wiki.libsdl.org/moin.cgi/SDL_HasSSE
  134. * http://wiki.libsdl.org/moin.cgi/SDL_HasSSE2
  135. * http://wiki.libsdl.org/moin.cgi/SDL_HasSSE3
  136. * http://wiki.libsdl.org/moin.cgi/SDL_HasSSE41
  137. * http://wiki.libsdl.org/moin.cgi/SDL_HasSSE42
  138. * http://wiki.libsdl.org/moin.cgi/SDL_HasAVX
  139. */
  140. int platform_testHasFunctions (void *arg)
  141. {
  142. int ret;
  143. /* TODO: independently determine and compare values as well */
  144. ret = SDL_HasRDTSC();
  145. SDLTest_AssertPass("SDL_HasRDTSC()");
  146. ret = SDL_HasAltiVec();
  147. SDLTest_AssertPass("SDL_HasAltiVec()");
  148. ret = SDL_HasMMX();
  149. SDLTest_AssertPass("SDL_HasMMX()");
  150. ret = SDL_Has3DNow();
  151. SDLTest_AssertPass("SDL_Has3DNow()");
  152. ret = SDL_HasSSE();
  153. SDLTest_AssertPass("SDL_HasSSE()");
  154. ret = SDL_HasSSE2();
  155. SDLTest_AssertPass("SDL_HasSSE2()");
  156. ret = SDL_HasSSE3();
  157. SDLTest_AssertPass("SDL_HasSSE3()");
  158. ret = SDL_HasSSE41();
  159. SDLTest_AssertPass("SDL_HasSSE41()");
  160. ret = SDL_HasSSE42();
  161. SDLTest_AssertPass("SDL_HasSSE42()");
  162. ret = SDL_HasAVX();
  163. SDLTest_AssertPass("SDL_HasAVX()");
  164. return TEST_COMPLETED;
  165. }
  166. /* !
  167. * \brief Tests SDL_GetVersion
  168. * \sa
  169. * http://wiki.libsdl.org/moin.cgi/SDL_GetVersion
  170. */
  171. int platform_testGetVersion(void *arg)
  172. {
  173. SDL_version linked;
  174. int major = SDL_MAJOR_VERSION;
  175. int minor = SDL_MINOR_VERSION;
  176. SDL_GetVersion(&linked);
  177. SDLTest_AssertCheck( linked.major >= major,
  178. "SDL_GetVersion(): returned major %i (>= %i)",
  179. linked.major,
  180. major);
  181. SDLTest_AssertCheck( linked.minor >= minor,
  182. "SDL_GetVersion(): returned minor %i (>= %i)",
  183. linked.minor,
  184. minor);
  185. return TEST_COMPLETED;
  186. }
  187. /* !
  188. * \brief Tests SDL_VERSION macro
  189. */
  190. int platform_testSDLVersion(void *arg)
  191. {
  192. SDL_version compiled;
  193. int major = SDL_MAJOR_VERSION;
  194. int minor = SDL_MINOR_VERSION;
  195. SDL_VERSION(&compiled);
  196. SDLTest_AssertCheck( compiled.major >= major,
  197. "SDL_VERSION() returned major %i (>= %i)",
  198. compiled.major,
  199. major);
  200. SDLTest_AssertCheck( compiled.minor >= minor,
  201. "SDL_VERSION() returned minor %i (>= %i)",
  202. compiled.minor,
  203. minor);
  204. return TEST_COMPLETED;
  205. }
  206. /* !
  207. * \brief Tests default SDL_Init
  208. */
  209. int platform_testDefaultInit(void *arg)
  210. {
  211. int ret;
  212. int subsystem;
  213. subsystem = SDL_WasInit(SDL_INIT_EVERYTHING);
  214. SDLTest_AssertCheck( subsystem != 0,
  215. "SDL_WasInit(0): returned %i, expected != 0",
  216. subsystem);
  217. ret = SDL_Init(SDL_WasInit(SDL_INIT_EVERYTHING));
  218. SDLTest_AssertCheck( ret == 0,
  219. "SDL_Init(0): returned %i, expected 0, error: %s",
  220. ret,
  221. SDL_GetError());
  222. return TEST_COMPLETED;
  223. }
  224. /* !
  225. * \brief Tests SDL_Get/Set/ClearError
  226. * \sa
  227. * http://wiki.libsdl.org/moin.cgi/SDL_GetError
  228. * http://wiki.libsdl.org/moin.cgi/SDL_SetError
  229. * http://wiki.libsdl.org/moin.cgi/SDL_ClearError
  230. */
  231. int platform_testGetSetClearError(void *arg)
  232. {
  233. int result;
  234. const char *testError = "Testing";
  235. char *lastError;
  236. int len;
  237. SDL_ClearError();
  238. SDLTest_AssertPass("SDL_ClearError()");
  239. lastError = (char *)SDL_GetError();
  240. SDLTest_AssertPass("SDL_GetError()");
  241. SDLTest_AssertCheck(lastError != NULL,
  242. "SDL_GetError() != NULL");
  243. if (lastError != NULL)
  244. {
  245. len = SDL_strlen(lastError);
  246. SDLTest_AssertCheck(len == 0,
  247. "SDL_GetError(): no message expected, len: %i", len);
  248. }
  249. result = SDL_SetError("%s", testError);
  250. SDLTest_AssertPass("SDL_SetError()");
  251. SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result);
  252. lastError = (char *)SDL_GetError();
  253. SDLTest_AssertCheck(lastError != NULL,
  254. "SDL_GetError() != NULL");
  255. if (lastError != NULL)
  256. {
  257. len = SDL_strlen(lastError);
  258. SDLTest_AssertCheck(len == SDL_strlen(testError),
  259. "SDL_GetError(): expected message len %i, was len: %i",
  260. SDL_strlen(testError),
  261. len);
  262. SDLTest_AssertCheck(SDL_strcmp(lastError, testError) == 0,
  263. "SDL_GetError(): expected message %s, was message: %s",
  264. testError,
  265. lastError);
  266. }
  267. /* Clean up */
  268. SDL_ClearError();
  269. SDLTest_AssertPass("SDL_ClearError()");
  270. return TEST_COMPLETED;
  271. }
  272. /* !
  273. * \brief Tests SDL_SetError with empty input
  274. * \sa
  275. * http://wiki.libsdl.org/moin.cgi/SDL_SetError
  276. */
  277. int platform_testSetErrorEmptyInput(void *arg)
  278. {
  279. int result;
  280. const char *testError = "";
  281. char *lastError;
  282. int len;
  283. result = SDL_SetError("%s", testError);
  284. SDLTest_AssertPass("SDL_SetError()");
  285. SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result);
  286. lastError = (char *)SDL_GetError();
  287. SDLTest_AssertCheck(lastError != NULL,
  288. "SDL_GetError() != NULL");
  289. if (lastError != NULL)
  290. {
  291. len = SDL_strlen(lastError);
  292. SDLTest_AssertCheck(len == SDL_strlen(testError),
  293. "SDL_GetError(): expected message len %i, was len: %i",
  294. SDL_strlen(testError),
  295. len);
  296. SDLTest_AssertCheck(SDL_strcmp(lastError, testError) == 0,
  297. "SDL_GetError(): expected message '%s', was message: '%s'",
  298. testError,
  299. lastError);
  300. }
  301. /* Clean up */
  302. SDL_ClearError();
  303. SDLTest_AssertPass("SDL_ClearError()");
  304. return TEST_COMPLETED;
  305. }
  306. /* !
  307. * \brief Tests SDL_SetError with invalid input
  308. * \sa
  309. * http://wiki.libsdl.org/moin.cgi/SDL_SetError
  310. */
  311. int platform_testSetErrorInvalidInput(void *arg)
  312. {
  313. int result;
  314. const char *invalidError = NULL;
  315. const char *probeError = "Testing";
  316. char *lastError;
  317. int len;
  318. /* Reset */
  319. SDL_ClearError();
  320. SDLTest_AssertPass("SDL_ClearError()");
  321. /* Check for no-op */
  322. result = SDL_SetError(invalidError);
  323. SDLTest_AssertPass("SDL_SetError()");
  324. SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result);
  325. lastError = (char *)SDL_GetError();
  326. SDLTest_AssertCheck(lastError != NULL,
  327. "SDL_GetError() != NULL");
  328. if (lastError != NULL)
  329. {
  330. len = SDL_strlen(lastError);
  331. SDLTest_AssertCheck(len == 0,
  332. "SDL_GetError(): expected message len 0, was len: %i",
  333. 0,
  334. len);
  335. SDLTest_AssertCheck(SDL_strcmp(lastError, "") == 0,
  336. "SDL_GetError(): expected message '', was message: '%s'",
  337. lastError);
  338. }
  339. /* Set */
  340. result = SDL_SetError(probeError);
  341. SDLTest_AssertPass("SDL_SetError()");
  342. SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result);
  343. /* Check for no-op */
  344. result = SDL_SetError(invalidError);
  345. SDLTest_AssertPass("SDL_SetError()");
  346. SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result);
  347. lastError = (char *)SDL_GetError();
  348. SDLTest_AssertCheck(lastError != NULL,
  349. "SDL_GetError() != NULL");
  350. if (lastError != NULL)
  351. {
  352. len = SDL_strlen(lastError);
  353. SDLTest_AssertCheck(len == SDL_strlen(probeError),
  354. "SDL_GetError(): expected message len %i, was len: %i",
  355. SDL_strlen(probeError),
  356. len);
  357. SDLTest_AssertCheck(SDL_strcmp(lastError, probeError) == 0,
  358. "SDL_GetError(): expected message '%s', was message: '%s'",
  359. probeError,
  360. lastError);
  361. }
  362. /* Reset */
  363. SDL_ClearError();
  364. SDLTest_AssertPass("SDL_ClearError()");
  365. /* Set and check */
  366. result = SDL_SetError(probeError);
  367. SDLTest_AssertPass("SDL_SetError()");
  368. SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result);
  369. lastError = (char *)SDL_GetError();
  370. SDLTest_AssertCheck(lastError != NULL,
  371. "SDL_GetError() != NULL");
  372. if (lastError != NULL)
  373. {
  374. len = SDL_strlen(lastError);
  375. SDLTest_AssertCheck(len == SDL_strlen(probeError),
  376. "SDL_GetError(): expected message len %i, was len: %i",
  377. SDL_strlen(probeError),
  378. len);
  379. SDLTest_AssertCheck(SDL_strcmp(lastError, probeError) == 0,
  380. "SDL_GetError(): expected message '%s', was message: '%s'",
  381. probeError,
  382. lastError);
  383. }
  384. /* Clean up */
  385. SDL_ClearError();
  386. SDLTest_AssertPass("SDL_ClearError()");
  387. return TEST_COMPLETED;
  388. }
  389. /* !
  390. * \brief Tests SDL_GetPowerInfo
  391. * \sa
  392. * http://wiki.libsdl.org/moin.cgi/SDL_GetPowerInfo
  393. */
  394. int platform_testGetPowerInfo(void *arg)
  395. {
  396. SDL_PowerState state;
  397. SDL_PowerState stateAgain;
  398. int secs;
  399. int secsAgain;
  400. int pct;
  401. int pctAgain;
  402. state = SDL_GetPowerInfo(&secs, &pct);
  403. SDLTest_AssertPass("SDL_GetPowerInfo()");
  404. SDLTest_AssertCheck(
  405. state==SDL_POWERSTATE_UNKNOWN ||
  406. state==SDL_POWERSTATE_ON_BATTERY ||
  407. state==SDL_POWERSTATE_NO_BATTERY ||
  408. state==SDL_POWERSTATE_CHARGING ||
  409. state==SDL_POWERSTATE_CHARGED,
  410. "SDL_GetPowerInfo(): state %i is one of the expected values",
  411. (int)state);
  412. if (state==SDL_POWERSTATE_ON_BATTERY)
  413. {
  414. SDLTest_AssertCheck(
  415. secs >= 0,
  416. "SDL_GetPowerInfo(): on battery, secs >= 0, was: %i",
  417. secs);
  418. SDLTest_AssertCheck(
  419. (pct >= 0) && (pct <= 100),
  420. "SDL_GetPowerInfo(): on battery, pct=[0,100], was: %i",
  421. pct);
  422. }
  423. if (state==SDL_POWERSTATE_UNKNOWN ||
  424. state==SDL_POWERSTATE_NO_BATTERY)
  425. {
  426. SDLTest_AssertCheck(
  427. secs == -1,
  428. "SDL_GetPowerInfo(): no battery, secs == -1, was: %i",
  429. secs);
  430. SDLTest_AssertCheck(
  431. pct == -1,
  432. "SDL_GetPowerInfo(): no battery, pct == -1, was: %i",
  433. pct);
  434. }
  435. /* Partial return value variations */
  436. stateAgain = SDL_GetPowerInfo(&secsAgain, NULL);
  437. SDLTest_AssertCheck(
  438. state==stateAgain,
  439. "State %i returned when only 'secs' requested",
  440. stateAgain);
  441. SDLTest_AssertCheck(
  442. secs==secsAgain,
  443. "Value %i matches when only 'secs' requested",
  444. secsAgain);
  445. stateAgain = SDL_GetPowerInfo(NULL, &pctAgain);
  446. SDLTest_AssertCheck(
  447. state==stateAgain,
  448. "State %i returned when only 'pct' requested",
  449. stateAgain);
  450. SDLTest_AssertCheck(
  451. pct==pctAgain,
  452. "Value %i matches when only 'pct' requested",
  453. pctAgain);
  454. stateAgain = SDL_GetPowerInfo(NULL, NULL);
  455. SDLTest_AssertCheck(
  456. state==stateAgain,
  457. "State %i returned when no value requested",
  458. stateAgain);
  459. return TEST_COMPLETED;
  460. }
  461. /* ================= Test References ================== */
  462. /* Platform test cases */
  463. static const SDLTest_TestCaseReference platformTest1 =
  464. { (SDLTest_TestCaseFp)platform_testTypes, "platform_testTypes", "Tests predefined types", TEST_ENABLED};
  465. static const SDLTest_TestCaseReference platformTest2 =
  466. { (SDLTest_TestCaseFp)platform_testEndianessAndSwap, "platform_testEndianessAndSwap", "Tests endianess and swap functions", TEST_ENABLED};
  467. static const SDLTest_TestCaseReference platformTest3 =
  468. { (SDLTest_TestCaseFp)platform_testGetFunctions, "platform_testGetFunctions", "Tests various SDL_GetXYZ functions", TEST_ENABLED};
  469. static const SDLTest_TestCaseReference platformTest4 =
  470. { (SDLTest_TestCaseFp)platform_testHasFunctions, "platform_testHasFunctions", "Tests various SDL_HasXYZ functions", TEST_ENABLED};
  471. static const SDLTest_TestCaseReference platformTest5 =
  472. { (SDLTest_TestCaseFp)platform_testGetVersion, "platform_testGetVersion", "Tests SDL_GetVersion function", TEST_ENABLED};
  473. static const SDLTest_TestCaseReference platformTest6 =
  474. { (SDLTest_TestCaseFp)platform_testSDLVersion, "platform_testSDLVersion", "Tests SDL_VERSION macro", TEST_ENABLED};
  475. static const SDLTest_TestCaseReference platformTest7 =
  476. { (SDLTest_TestCaseFp)platform_testDefaultInit, "platform_testDefaultInit", "Tests default SDL_Init", TEST_ENABLED};
  477. static const SDLTest_TestCaseReference platformTest8 =
  478. { (SDLTest_TestCaseFp)platform_testGetSetClearError, "platform_testGetSetClearError", "Tests SDL_Get/Set/ClearError", TEST_ENABLED};
  479. static const SDLTest_TestCaseReference platformTest9 =
  480. { (SDLTest_TestCaseFp)platform_testSetErrorEmptyInput, "platform_testSetErrorEmptyInput", "Tests SDL_SetError with empty input", TEST_ENABLED};
  481. static const SDLTest_TestCaseReference platformTest10 =
  482. { (SDLTest_TestCaseFp)platform_testSetErrorInvalidInput, "platform_testSetErrorInvalidInput", "Tests SDL_SetError with invalid input", TEST_ENABLED};
  483. static const SDLTest_TestCaseReference platformTest11 =
  484. { (SDLTest_TestCaseFp)platform_testGetPowerInfo, "platform_testGetPowerInfo", "Tests SDL_GetPowerInfo function", TEST_ENABLED };
  485. /* Sequence of Platform test cases */
  486. static const SDLTest_TestCaseReference *platformTests[] = {
  487. &platformTest1,
  488. &platformTest2,
  489. &platformTest3,
  490. &platformTest4,
  491. &platformTest5,
  492. &platformTest6,
  493. &platformTest7,
  494. &platformTest8,
  495. &platformTest9,
  496. &platformTest10,
  497. &platformTest11,
  498. NULL
  499. };
  500. /* Platform test suite (global) */
  501. SDLTest_TestSuiteReference platformTestSuite = {
  502. "Platform",
  503. NULL,
  504. platformTests,
  505. NULL
  506. };