summaryrefslogtreecommitdiff
path: root/tests/cocoa/test_ownership.m
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cocoa/test_ownership.m')
-rw-r--r--tests/cocoa/test_ownership.m22
1 files changed, 5 insertions, 17 deletions
diff --git a/tests/cocoa/test_ownership.m b/tests/cocoa/test_ownership.m
index 4efd164..10aae99 100644
--- a/tests/cocoa/test_ownership.m
+++ b/tests/cocoa/test_ownership.m
@@ -3,6 +3,7 @@
#include "common/backend.h"
#import <AppKit/AppKit.h>
#import <Metal/Metal.h>
+#import <QuartzCore/QuartzCore.h>
#include "common/types.h"
#include <assert.h>
#include <errno.h>
@@ -41,16 +42,8 @@ int main(void)
assert(!hidden.isVisible && hidden.styleMask == NSWindowStyleMaskBorderless);
yasl_private_surface_destroy(gpu);
- struct yasl_surface *gl = d->ops->surface_create_gl(d, &gpu_spec, NULL, NULL);
- if (gl) {
- assert(gl->presenter == YASL_PRIVATE_PRESENTER_GL);
- assert(d->ops->gl_make_current(d, gl));
- assert(d->ops->gl_get_proc_address(d, "glClear") != NULL);
- assert(d->ops->gl_swap_interval(d, gl, 1));
- assert(d->ops->gl_swap_buffers(d, gl));
- assert(d->ops->gl_make_current(d, NULL));
- d->ops->surface_destroy(gl);
- }
+ assert(!d->ops->surface_create_gl && !d->ops->gl_make_current &&
+ !d->ops->gl_get_proc_address && !d->ops->gl_swap_interval && !d->ops->gl_swap_buffers);
assert(yasl_private_surface_set_size(s, (struct yasl_private_vector2i){180, 110}));
assert(yasl_private_surface_set_fullscreen(s, false));
@@ -58,7 +51,7 @@ int main(void)
assert(!yasl_private_surface_set_size(s, (struct yasl_private_vector2i){0, 100}));
assert(errno == EINVAL);
struct yasl_private_popup_spec popup_spec = {
- .positioner_explicit = true,
+
.anchor_edges = 4, .gravity = 3, .constraints = 63,
.size = {80, 40}, .anchor = {10, 10, 2, 2},
};
@@ -117,7 +110,7 @@ int main(void)
}
const char *last = event.paste.data;
assert(!yasl_private_display_poll_event(d, &event));
- @autoreleasepool { yasl_private_display_copy(d, YASL_PRIVATE_CLIPBOARD, "new selection"); }
+ @autoreleasepool { yasl_private_clipboard_set(d, YASL_PRIVATE_CLIPBOARD, "new selection"); }
assert(strcmp(last, "paste-599") == 0);
assert(!yasl_private_clipboard_set(d, YASL_PRIVATE_CLIPBOARD, "\xc3"));
assert(errno == EILSEQ);
@@ -131,11 +124,6 @@ int main(void)
assert(unavailable_id && yasl_private_display_poll_event(d, &event));
assert(event.type == YASL_PRIVATE_EVENT_PASTE && event.paste.request_id == unavailable_id);
assert(event.paste.status == YASL_PRIVATE_TRANSFER_UNAVAILABLE && !event.paste.len);
- yasl_private_display_copy(d, YASL_PRIVATE_CLIPBOARD, "legacy paste");
- yasl_private_display_paste(d, YASL_PRIVATE_CLIPBOARD, s);
- assert(yasl_private_display_poll_event(d, &event));
- assert(event.type == YASL_PRIVATE_EVENT_PASTE && event.paste.request_id == 0);
- assert(event.paste.status == YASL_PRIVATE_TRANSFER_OK && strcmp(event.text.data, "legacy paste") == 0);
yasl_private_surface_destroy(s);
yasl_private_display_close(d);
return 0;