Commit Graph

27 Commits

Author SHA1 Message Date
Zhengwen Jiang
74de34c8b8 improve the performance for specific tests
Co-authored-by: Martin Griffin <martin.griffin@algosport.co.uk>
2023-11-13 01:53:39 -06:00
Martin Griffin
b0b6e16042 Separate ASSIGN_TEST from NEXT_TEST
Silences a warning about an invalid pointer when building with modern.
2023-10-23 07:58:45 +01:00
Alex
8ab2fbd9a2
Fixes tests rng (#3433)
* Seed RNG before setUp

Co-authored-by: Martin Griffin <martinrgriffin@gmail.com>
2023-10-22 10:20:27 +01:00
Martin Griffin
f5b149b971
Test improvements (#3408)
* Run assumptions on all runners

* Make i const in battle tests

This avoids the pitfall of using i in a PARAMETRIZEd test and confusing
the runner.
2023-10-12 12:14:07 +02:00
DizzyEggg
a4041d0f6a
Fix ASSUMPTIONS not working (#3368) 2023-10-10 22:42:36 -03:00
Eduardo Quezada D'Ottone
d62c0d6d51
Organized tests into subfolders (#2822) 2023-08-12 20:00:15 +01:00
Martin Griffin
f6e6a1f383
Initialize save to empty in test runner (#3215) 2023-08-09 10:06:03 -04:00
Martin Griffin
25986be089 Prevent corrupted heaps causing infinite loops 2023-07-15 11:48:53 +01:00
Martin Griffin
4637d7e7ee Recover from test crashes 2023-07-15 11:48:52 +01:00
Eduardo Quezada D'Ottone
81522554c2
Fixed KNOWN_FAILING tests running memory leak checks when unneeded (#3102) 2023-07-04 17:19:38 +01:00
Eduardo Quezada D'Ottone
f3be4e1ac5
Fixed 2 test runner issues (#3076)
* Fixed 2 test runner issues

Thanks to MGriffin for the help
- Fixed non-battle tests omitting errors when failing.
- Fixed non-battle tests showing false positive memory leak errors due to the test failing for a different cause.

* Update test/test_runner.c

Co-authored-by: Martin Griffin <martinrgriffin@gmail.com>
2023-06-26 19:26:42 +01:00
Martin Griffin
a2ca2aa7d9 Report errors in estimateCost 2023-05-07 07:50:41 +01:00
Martin Griffin
76f02774ea Detect memory leaks in tests
Can use KNOWN_LEAKING; to specify that a test is known to leak memory.

The location information is available in regular game builds. Thus it is
available for use in debugging leaks in-game too. In the future we
should consider replacing it with NULL if NDEBUG is defined. This is not
currently possible because the tests do not force NDEBUG to be
undefined.
2023-04-20 20:35:22 +01:00
Eduardo Quezada
32b2c01619 Merge branch 'RHH/upcoming' into RHH/pr/fix/GassyTerrain
# Conflicts:
#	test/test.h
2023-03-26 16:06:04 -03:00
Eduardo Quezada D'Ottone
c922ff69b9 Added To-Do test results 2023-03-23 22:34:08 -03:00
Martin Griffin
509ff4c7e0 Generic TEST that executes a function 2023-03-15 13:28:46 +00:00
Eduardo Quezada D'Ottone
dd686ee606
More detailed hydra test results (#2722) 2023-03-08 10:11:11 -03:00
Eduardo Quezada
24d8d3fbee Updated switch format 2023-03-08 09:09:48 -03:00
Eduardo Quezada
eb49e28e6c Renamed TEST_RESULT_SKIP to TEST_RESULT_ASSUMPTION_FAIL 2023-03-08 08:26:33 -03:00
Eduardo Quezada
5808e82434 Added assumption fail total, made fails into their own counter and changed "SKIP" to "ASSUMPTION_FAIIL" in log 2023-02-22 15:05:39 -03:00
Jaizu
403a6f4544
Merge pull request #2712 from DizzyEggg/fix_abilities_empty_field
Fix switch-in abilities activating on an empty field
2023-02-22 09:49:13 +01:00
Eduardo Quezada
54e388a375 More detailed hydra test results 2023-02-22 00:30:12 -03:00
Martin Griffin
f3c6b647c0
Hydra fixes and improvements (#2718)
* Build tools for check

* Display PASSes when Hydra exits

* Print buffered output at exit

* Remove unused test summaries

* Show SKIP if ASSUMPTIONS fails
2023-02-21 16:30:42 +01:00
DizzyEggg
7d23d5433b try fix tests failing 2023-02-20 16:38:37 +01:00
DizzyEggg
03915524c5 Fix switch-in abilities activating on empty field 2023-02-20 12:42:06 +01:00
sbird
0d78b29902 [test, output] display KNOWN_FAILING in yellow 2023-02-16 15:31:28 +01:00
Martin Griffin
f1b9872bf0 Test moves, items, and abilities in battle
Thank you to SBird for providing mgba-rom-test binaries and Spikes/Toxic
Spikes tests!

Co-authored-by: sbird <sbird@no.tld>
2023-02-01 13:53:57 +00:00