Add NSApplicationTerminateReply and registerClassPair to objc stdlib

The missing registerClassPair function is required to register a class and make it active with objc after allocating with the existing allocateClassPair function.
This commit is contained in:
Glenn
2025-11-26 01:36:58 +00:00
committed by Christoffer Lerno
parent 4f3b6f922d
commit ab1efdda73
3 changed files with 21 additions and 1 deletions

View File

@@ -186,3 +186,14 @@ fn void test_event_mask_64bit_values()
assert(NSEventMask.sizeof == ulong.sizeof);
}
fn void test_application_terminate_reply()
{
NSApplicationTerminateReply cancel = NSApplicationTerminateReply.CANCEL;
NSApplicationTerminateReply now = NSApplicationTerminateReply.NOW;
NSApplicationTerminateReply later = NSApplicationTerminateReply.LATER;
assert(cancel == 0);
assert(now == 1);
assert(later == 2);
}