diff options
Diffstat (limited to 'tests/test_api.cpp')
| -rw-r--r-- | tests/test_api.cpp | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/tests/test_api.cpp b/tests/test_api.cpp index acfbbb8..beec36d 100644 --- a/tests/test_api.cpp +++ b/tests/test_api.cpp @@ -1,35 +1,24 @@ #include <yasl/yasl.h> -#include <yasl/cpu.h> -#include <yasl/gl.h> -#include <yasl/metal.h> -#include <yasl/desktop.h> #if YASL_HAS_VULKAN #include <yasl/vulkan.h> #endif -#if YASL_HAS_WAYLAND -#include <yasl/native/wayland.h> -#endif -#if YASL_HAS_X11 -#include <yasl/native/x11.h> -#endif -#if YASL_HAS_COCOA -#include <yasl/native/cocoa.h> -#endif #include <cassert> int main() { yasl_event e{}; - e.pen.x = 1.5; + e.x = 1.5; e.pen.pressure = 0.25; - assert(e.pen.pressure == 0.25); + assert(e.pen.pressure == 0.25 && e.text == nullptr); yasl_surface_options options{}; options.width = -1; options.height = 10; assert(!yasl_surface_create(&options) && errno == EINVAL); - yasl_gl_options gl = YASL_GL_OPTIONS_INIT; - assert(gl.major == 3 && gl.minor == 2 && gl.share == nullptr); - yasl_cpu_buffer buffer{}; - assert(yasl_cpu_acquire(nullptr, &buffer) == -ENODEV); + yasl_gl_options gl{}; + assert(gl.major == 0 && gl.share == nullptr); + int w = 0, h = 0; + assert(!yasl_cpu_pixels(nullptr, &w, &h) && errno == ENODEV); + yasl_native native{}; + assert(yasl_surface_get_native(nullptr, &native) == -ENODEV); yasl_shutdown(); return 0; } |
