Commit Graph

24 Commits

Author SHA1 Message Date
Treeston 1eca51b417 [3.3.5] ChatCommands, the other half: chat command resolution refactor (PR #25463) 2020-09-20 02:50:38 +02:00
Treeston 090e3da96b Core/Chat: Fix hyperlink validation for inspected item links, for real this time. 2020-09-12 20:27:46 +02:00
Treeston 75f9e7396e [3.3.5] Core/ChatCommands: Show error messages from argument parsers (PR #25443) 2020-09-12 19:42:10 +02:00
Treeston 67b112f8a4 Revert "Tests: Use .empty() to test for empty string instead of == """
This reverts commit 697fb48747.
2020-09-06 22:08:19 +02:00
Carbenium 697fb48747 Tests: Use .empty() to test for empty string instead of == "" 2020-09-06 22:03:09 +02:00
Treeston f45aa5cac1 Common/Util: Trinity::StringTo<double> support (PR #25364) 2020-09-02 22:04:45 +02:00
Treeston 470f45db7a UnitTests: |Hspell and |Htalent unit testing 2020-09-02 12:42:02 +02:00
Treeston d0b91f6927 Core/Misc: More DBC std::array refactors, stricter |Hitem checks, and more hyperlink unit tests 2020-09-01 22:02:22 +02:00
Treeston 3fbbe7cfbe Core/Misc: DBC std::array refactors, and |Hachievement unit tests 2020-09-01 00:38:46 +02:00
Treeston 5394b2ef0f UnitTests: Add a first set of item hyperlink tests 2020-08-31 16:56:56 +02:00
Treeston 86e6438008 UnitTests: Add basic hyperlink unit test 2020-08-30 22:40:33 +02:00
Treeston 2f7d2ef3e9 Core/ChatCommands: C++17 cleanup (again) (PR #25323) 2020-08-30 02:50:25 +02:00
Treeston 8ce3635d39 UnitTests: Cleanup + StringConvert/ChatCommand tests (PR #25353) 2020-08-29 22:03:22 +02:00
Shauren f8a5783327 Build/Tests: Set all our compile flags on tests
Closes #25349
2020-08-29 12:06:12 +02:00
Shauren 19f69fcf06 Build: Put tests-common and sfmt under correct folders when WITH_SOURCE_TREE is set to hierarchical-folders 2020-08-28 15:10:21 +02:00
Carbenium 228696bf80 Core/Common: Merge TimeTrackerSmall with TimeTracker 2020-08-01 12:43:55 +02:00
Carbenium e55516348d Core/Common: Add a std::chrono interface to TimeTrackerSmall
New methods:
TimeTrackerSmall(Milliseconds expiry);
void Update(Milliseconds diff);
void Reset(Milliseconds expiry)
Milliseconds GetExpiry() const

Removed methods:
int32 GetExpiry() const

Also add basic unit tests.

Core/Scripts: Use std::chrono interface of TimeTrackerSmall
2020-08-01 12:43:55 +02:00
Carbenium e6f36f83b8 tests/EventMap: Add tests for Repeat 2020-07-26 23:20:11 +02:00
Carbenium 7865c1c197 Core/EventMap: Clarify documentation of ScheduleEvent 2020-07-26 23:20:11 +02:00
Carbenium 4470b91223 Core/EventMap: Unify semantics of DelayEvents
DelayEvents(Milliseconds delay) had different semantics than
DelayEvents(Milliseconds delay, uint32 group).
The first method delayed the events only in the case the internal timer
already ticked at least for the amount of delay. In contrast the latter method
delayed events regardless of the internal timer value.

Use the latter semantics for DelayEvents(Milliseconds delay) as well which makes
the outcome more predictable. Adapt tests accordingly.
2020-07-26 23:20:11 +02:00
Carbenium e877f988d1 tests/EventMap: Test for event past it's execution time
With the switch to std::chrono return type of GetTimeUntilEvent
we don't run into an overflow condition which happend with the previous
uint32 return value if the events scheduled execution time is in the past.
Test for this case.
2020-07-26 23:20:11 +02:00
Carbenium 8cb35b0d5f EventMap: Change GetTimeUntilEvent to return std::chrono types 2020-07-26 23:20:11 +02:00
Carbenium 7950275697 tests: Add some basic tests for EventMap 2020-07-24 12:00:54 +02:00
Carbenium 6a28ee7b2a dep: Add catch2 unit test framework and wire it up
To enable the test suite, make sure to configure CMake with -DBUILD_TESTING=1 , since it is disabled by default. The catch2 dependency will be downloaded during configure time.

Also add a new target "tests-common", which includes unit tests for the "common" project. To finally run the tests use the "test" target.

CircleCI: Run unit tests
2020-07-24 12:00:54 +02:00