diff options
| author | Mike Will <myQwil@gmail.com> | 2025-07-15 16:24:40 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-15 22:24:40 +0200 |
| commit | 8453fbf4eb0af2e3265fd34a693b7d0e9167f4d2 (patch) | |
| tree | 06f0f728453228226388f1cad124f306a538c60a /hyprtester/src/shared.hpp | |
| parent | e15014e031589e1df2dc29a5ce94325676796ac4 (diff) | |
snap: fix `border_overlap` option for monitor snapping (#10987)
Diffstat (limited to 'hyprtester/src/shared.hpp')
| -rw-r--r-- | hyprtester/src/shared.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hyprtester/src/shared.hpp b/hyprtester/src/shared.hpp index cfce1ba7..8bea4c54 100644 --- a/hyprtester/src/shared.hpp +++ b/hyprtester/src/shared.hpp @@ -44,13 +44,13 @@ namespace Colors { } while (0) #define EXPECT_CONTAINS(haystack, needle) \ - if (!std::string{haystack}.contains(needle)) { \ - NLog::log("{}Failed: {}{} should contain {} but doesn't. Source: {}@{}. Haystack is:\n{}", Colors::RED, Colors::RESET, #haystack, #needle, __FILE__, __LINE__, \ + if (const auto EXPECTED = needle; !std::string{haystack}.contains(EXPECTED)) { \ + NLog::log("{}Failed: {}{} should contain {} but doesn't. Source: {}@{}. Haystack is:\n{}", Colors::RED, Colors::RESET, #haystack, EXPECTED, __FILE__, __LINE__, \ std::string{haystack}); \ ret = 1; \ TESTS_FAILED++; \ } else { \ - NLog::log("{}Passed: {}{} contains {}.", Colors::GREEN, Colors::RESET, #haystack, #needle); \ + NLog::log("{}Passed: {}{} contains {}.", Colors::GREEN, Colors::RESET, #haystack, EXPECTED); \ TESTS_PASSED++; \ } |
