[MIRROR] Prepares unit tests for vscode extension update. [MDB IGNORE] (#10596)

* Prepares unit tests for vscode extension update. (#63963)

* Prepares unit tests for vscode extension update.

Co-authored-by: AnturK <AnturK@users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-01-11 17:15:56 +00:00
committed by GitHub
co-authored by AnturK
parent e149c9653d
commit 8bd5bf805c
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -117,5 +117,5 @@
#undef TEST_ASSERT
#undef TEST_ASSERT_EQUAL
#undef TEST_ASSERT_NOTEQUAL
#undef TEST_FOCUS
//#undef TEST_FOCUS - This define is used by vscode unit test extension to pick specific unit tests to run and appended later so needs to be used out of scope here
#endif
+4 -2
View File
@@ -110,11 +110,13 @@ GLOBAL_VAR(test_log)
CHECK_TICK
var/list/tests_to_run = subtypesof(/datum/unit_test)
var/list/focused_tests = list()
for (var/_test_to_run in tests_to_run)
var/datum/unit_test/test_to_run = _test_to_run
if (initial(test_to_run.focus))
tests_to_run = list(test_to_run)
break
focused_tests += test_to_run
if(length(focused_tests))
tests_to_run = focused_tests
tests_to_run = sortTim(tests_to_run, /proc/cmp_unit_test_priority)