Skip to content

Commit

Permalink
testing out test_notice
Browse files Browse the repository at this point in the history
  • Loading branch information
FalloutFalcon committed Oct 7, 2024
1 parent a3f7492 commit 4ced5cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions code/modules/unit_tests/_unit_tests.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
/// Intended to be used in the manner of `TEST_FOCUS(/datum/unit_test/math)`
#define TEST_FOCUS(test_path) ##test_path { focus = TRUE; }

/// Logs a noticable message on GitHub, but will not mark as an error.
/// Use this when something shouldn't happen and is of note, but shouldn't block CI.
/// Does not mark the test as failed.
#define TEST_NOTICE(source, message) source.log_for_test((##message), "notice", __FILE__, __LINE__)

/// Constants indicating unit test completion status
#define UNIT_TEST_PASSED 0
#define UNIT_TEST_FAILED 1
Expand Down
3 changes: 3 additions & 0 deletions code/modules/unit_tests/pills.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@
human.Life()

TEST_ASSERT(human.reagents.has_reagent(/datum/reagent/iron), "Human doesn't have iron after taking pill")

TEST_NOTICE(src, "The pillbox sucks")

Check notice on line 12 in code/modules/unit_tests/pills.dm

View workflow job for this annotation

GitHub Actions / Integration Tests (BASIC_TESTS) / run_integration_tests

: /datum/unit_test/pills

The pillbox sucks
log_test("The pillbox is epic")

0 comments on commit 4ced5cc

Please sign in to comment.