-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
290f455
commit 7a8b476
Showing
3 changed files
with
64 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#include "phasar/Utils/Logger.h" | ||
|
||
#include "gtest/gtest.h" | ||
|
||
TEST(LoggerTest, BasicWithinPsr) { | ||
using namespace psr; | ||
Logger::initializeStderrLogger(SeverityLevel::INFO); | ||
Logger::initializeStderrLogger(SeverityLevel::DEBUG, "LLVMAliasSet"); | ||
PHASAR_LOG("This should not be shown"); | ||
PHASAR_LOG_LEVEL(INFO, "Basic category-less message"); | ||
PHASAR_LOG_LEVEL_CAT(DEBUG, "LLVMAliasSet", | ||
"Some message specific to LLVMAliasSet"); | ||
} | ||
|
||
TEST(LoggerTest, BasicOutsidePsr) { | ||
psr::Logger::initializeStderrLogger(psr::SeverityLevel::INFO); | ||
psr::Logger::initializeStderrLogger(psr::SeverityLevel::DEBUG, | ||
"LLVMAliasSet"); | ||
PHASAR_LOG("This should not be shown"); | ||
PHASAR_LOG_LEVEL(INFO, "Basic category-less message"); | ||
PHASAR_LOG_LEVEL_CAT(DEBUG, "LLVMAliasSet", | ||
"Some message specific to LLVMAliasSet"); | ||
} | ||
|
||
int main(int Argc, char **Argv) { | ||
::testing::InitGoogleTest(&Argc, Argv); | ||
return RUN_ALL_TESTS(); | ||
} |