summaryrefslogtreecommitdiffstats
path: root/test/window_test.cpp
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2019-01-21 04:48:16 +0100
committerNao Pross <naopross@thearcway.org>2019-01-21 04:48:16 +0100
commit08ac57ec67c50e7331685a557642fa57e8e3427d (patch)
tree343cb2182300ffabafd709ceef00a5de4222c0fc /test/window_test.cpp
parentAdd basic window wrapper (diff)
downloadlibwsdl2-08ac57ec67c50e7331685a557642fa57e8e3427d.tar.gz
libwsdl2-08ac57ec67c50e7331685a557642fa57e8e3427d.zip
Add window test
Diffstat (limited to 'test/window_test.cpp')
-rw-r--r--test/window_test.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/window_test.cpp b/test/window_test.cpp
new file mode 100644
index 0000000..70fcb1a
--- /dev/null
+++ b/test/window_test.cpp
@@ -0,0 +1,24 @@
+#include "wrapsdl2.hpp"
+#include "video.hpp"
+
+#include <iostream>
+
+int main(int argc, char *argv[]) {
+ wrapsdl2::initialize();
+
+ {
+ wrapsdl2::window win("Window Test", 800, 600);
+
+ std::cout << "press ENTER to show the window" << std::endl;
+ std::cin.get();
+
+ win.show();
+ win.update();
+
+ std::cout << "press ENTER to quit" << std::endl;
+ std::cin.get();
+ }
+
+ wrapsdl2::quit();
+ return 0;
+}