Commit Graph

5 Commits

Author SHA1 Message Date
Jeremiah a5a4b83a25 Sets prettier to run on the repo (#91379)
Prettier (an auto formatter) is set to only run within the tgui folder
currently. This removes that limitation, allowing it to automatically
format all supported files in the repo (.js, .html, .yml
[etc](https://prettier.io/docs/))

I made a few exceptions for bundled and generated files
I'm of the opinion that code should look uniform and am lazy enough to
want CTRL-S to format files without having to think beyond that
2025-06-05 19:13:02 -04:00
SyncIt21 c6d794180c Update README.md of unit tests folder for VS code support (#87758)
## About The Pull Request
Turns out using dream daemon isn't the only way to run unit tests.

You can do it from VS code itself & can see the output of each test in
the fancy chat window.
![Screenshot
(448)](https://github.com/user-attachments/assets/33aca6b5-3414-4560-9cc4-dd90fe80e2d1)

With the added advantage of using your debugger to step through each
line of code this should be the preferred way so I've updated the read
me file of the unit tests folder to specify that

You can also check the runtimes log in your game to see the output of
each unit test

## Changelog
🆑
N/A
/🆑
2024-11-09 11:11:57 +01:00
Zephyr 1900eb9484 Unit Tests use a consistent human subtype (#71515)
title
2022-11-26 20:36:20 +01:00
Tastyfish bca463316b Makes integration test results be in color and have annotations (#66649)
About The Pull Request

    Separated compiling the integration tests and running them as separate steps for organization purposes.
    Added a TEST_ASSERT_NULL(value, reason) and TEST_ASSERT_NOTNULL(value, reason) because those are conceptually simple tests.
    Makes the PASS and FAIL prefixes in the integration test log be green and red for better readability.
    Failure reasons now display the file and line number.
        In order to achieve this, direct calls to Fail() are now wrapped in a macro, TEST_FAIL(), as Fail() itself needs preprocessor stuff passed to it.
        In the midst of updating it, I noticed multiple cases of tests directly calling Fail() and returning when they should have used a better macro, so those were updated. There was at least one case where it appeared that the code assumed that the test ended at Fail(), but made no attempt to do so, such as with the RCD test.
        Feel free to double check all of the changed unit tests in case I made a functional behavior change, but they currently pass.
    To take advantage of the previous change, failures are now marked as annotations. Note that outside of github, this creates an ugly-looking line but the primary environment is as a github action.

Examples with intentionally botched unit test:

image

image

image
Why It's Good For The Game

Makes inspecting failed unit tests significantly easier.
Changelog

N/A
2022-05-04 13:19:01 +12:00
Tad Hardesty 8cc90f06ef Add Mothblocks's unit test documentation and guide 2020-11-29 22:46:38 -08:00