mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Test framework tentatively working on windows
This commit is contained in:
+18
-2
@@ -1,7 +1,23 @@
|
||||
#include "icsneo/api/eventmanager.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
using namespace icsneo;
|
||||
|
||||
class EventManagerTest : public ::testing::Test {
|
||||
|
||||
};
|
||||
|
||||
TEST_F(EventManagerTest, GetLastErrorTest) {
|
||||
EventManager::GetInstance().add(APIEvent(APIEvent::Type::OutputTruncated, APIEvent::Severity::Error));
|
||||
EXPECT_EQ(EventManager::GetInstance().getLastError().getType(), APIEvent::Type::OutputTruncated);
|
||||
}
|
||||
|
||||
TEST_F(EventManagerTest, CountTest) {
|
||||
EventManager::GetInstance().add(APIEvent(APIEvent::Type::OutputTruncated, APIEvent::Severity::Error));
|
||||
EXPECT_EQ(EventManager::GetInstance().count(), 1);
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
Reference in New Issue
Block a user