diff options
author | ancarola <raffaele.ancarola@epfl.ch> | 2019-01-19 13:07:37 +0100 |
---|---|---|
committer | ancarola <raffaele.ancarola@epfl.ch> | 2019-01-19 13:07:37 +0100 |
commit | 3922c797671cdc23d9233ff76909489e45fd0006 (patch) | |
tree | d385754f00159b93a8966fb5080a51dc2d0eb4a0 /test | |
parent | edas (diff) | |
download | flatland-3922c797671cdc23d9233ff76909489e45fd0006.tar.gz flatland-3922c797671cdc23d9233ff76909489e45fd0006.zip |
Test two completed successfully
Diffstat (limited to 'test')
-rw-r--r-- | test/main.cpp | 4 | ||||
-rwxr-xr-x | test/test | bin | 14248 -> 14248 bytes | |||
-rw-r--r-- | test/test1.cpp | 30 |
3 files changed, 32 insertions, 2 deletions
diff --git a/test/main.cpp b/test/main.cpp index c30e5f9..5a441a7 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -10,7 +10,7 @@ int main() FlatWindow win(600, 900, "Stocazzo"); flat_status status; - init_flatland(win, loop, status, 60); + init_flatland(&win, loop, status, 60); return 0; } @@ -23,7 +23,7 @@ void loop(float dt) { ++count; - if (count == 100) + if (count == 1000) quit_flatland(); cout << "Loop number: " << count << endl; Binary files differdiff --git a/test/test1.cpp b/test/test1.cpp new file mode 100644 index 0000000..4d7c71f --- /dev/null +++ b/test/test1.cpp @@ -0,0 +1,30 @@ +#include "flatland.h" +#include "flatwindow.h" + +int count = 0; + +void loop(float); + +int main() +{ + FlatWindow win(600, 900, "Stocazzo"); + flat_status status; + + init_flatland(&win, loop, status, 60); + + return 0; +} + +#include <iostream> + +using namespace std; + +void loop(float dt) +{ + ++count; + + if (count == 100) + quit_flatland(); + + cout << "Loop number: " << count << endl; +} |