-
Notifications
You must be signed in to change notification settings - Fork 4
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
8520192
commit 05c9bc3
Showing
6 changed files
with
80 additions
and
38 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
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 |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
|
||
namespace | ||
{ | ||
|
||
using kn::float32_t; | ||
using kn::float64_t; | ||
using kn::overflow::isProductValid; | ||
|
This file was deleted.
Oops, something went wrong.
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,43 @@ | ||
#include <iostream> | ||
#include <string> | ||
|
||
#include "gtest/gtest.h" | ||
|
||
#include "ErrorLogger.hpp" | ||
#include "Window.hpp" | ||
|
||
namespace | ||
{ | ||
|
||
class WindowTest : public ::testing::Test | ||
{ | ||
protected: | ||
WindowTest() : m_size(320, 240), m_scale(2) {} | ||
|
||
virtual ~WindowTest() {} | ||
|
||
virtual void SetUp() { kn::window::init(m_size, m_scale); } | ||
|
||
virtual void TearDown() { kn::window::quit(); } | ||
|
||
kn::math::Vec2 m_size; | ||
int m_scale; | ||
}; | ||
|
||
TEST_F(WindowTest, WindowInit) | ||
{ | ||
EXPECT_EQ(kn::window::getSize().x, m_size.x); | ||
EXPECT_EQ(kn::window::getSize().y, m_size.y); | ||
EXPECT_EQ(kn::window::getScale(), m_scale); | ||
EXPECT_EQ(kn::window::getTitle(), std::string("Kraken Window")); | ||
} | ||
|
||
TEST_F(WindowTest, WindowFullscreen) | ||
{ | ||
kn::window::setFullscreen(true); | ||
EXPECT_EQ(kn::window::getFullscreen(), true); | ||
kn::window::setFullscreen(false); | ||
EXPECT_EQ(kn::window::getFullscreen(), false); | ||
} | ||
|
||
} // namespace |