Artifact 9d478962741dcfb967eb6573e4b396559148f33e6efeb2bde4eb7c2f470c2d1b:
- File .github/workflows/CXXTest.mm — part of check-in [089d52ca9a] at 2024-11-04 01:05:50 on branch trunk — GitHub Actions: Add ObjC++ tests (user: js, size: 511) [annotate] [blame] [check-ins using]
#import <ObjFW/ObjFW.h> #include <string> @interface CXXTest: OFObject <OFApplicationDelegate> @end OF_APPLICATION_DELEGATE(CXXTest) @implementation CXXTest - (void)applicationDidFinishLaunching: (OFNotification *)notification { std::string output; try { @try { throw @"Hello "; } @catch (OFString *string) { output += string.UTF8String; } throw std::string("C++"); } catch (std::string &string) { output += "C++"; } OFLog(@"%s", output.c_str()); [OFApplication terminate]; } @end