diff options
Diffstat (limited to 'src/test/mock/mock_GLFW.c')
-rw-r--r-- | src/test/mock/mock_GLFW.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/test/mock/mock_GLFW.c b/src/test/mock/mock_GLFW.c new file mode 100644 index 0000000..f1942fd --- /dev/null +++ b/src/test/mock/mock_GLFW.c @@ -0,0 +1,39 @@ +#include "minunit.h" +#include "test/mock_queue.h" +#include "mock_GLFW.h" + +void glfwGetVersion(int *major, int *minor, int *rev) +{ + *major = mock_front(int); + mock_pop(); + *minor = mock_front(int); + mock_pop(); + *rev = mock_front(int); + mock_pop(); +} + + +int glfwInit() +{ + int result = mock_front(int); + mock_pop(); + return result; +} + + +void glfwTerminate() +{ + mock_queue(bool, true); +} + + +int glfwGetError(const char **description) +{ + int error_code = mock_front(int); + mock_pop(); + if (description != NULL) { + *description = mock_front(const char *); + mock_pop(); + } + return error_code; +} |