diff options
author | Matt Ronge <mronge@mronge.com> | 2013-01-31 20:33:49 -0600 |
---|---|---|
committer | Matt Ronge <mronge@mronge.com> | 2013-01-31 20:33:49 -0600 |
commit | 3d95ea21fa92fe859eb14781c44185c5da4a62b9 (patch) | |
tree | 955a95f8fe5e9da040f158acbd2f046688cefde5 /tests | |
parent | b1eb6ca70a0399a6202bc34e26bd5501ae0c3ac9 (diff) |
Start of an Obj-C async API
Diffstat (limited to 'tests')
-rw-r--r-- | tests/main.mm | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/tests/main.mm b/tests/main.mm index 56a270fa..fe1efb2e 100644 --- a/tests/main.mm +++ b/tests/main.mm @@ -270,6 +270,24 @@ static void testAsyncPOP() [[NSRunLoop currentRunLoop] run]; } +void testObjc() +{ + MCOIMAPSession *session = [[MCOIMAPSession alloc] init]; + session.username = @"username"; + session.password = @"password"; + session.hostname = @"imap.gmail.com"; + session.port = 993; + session.connectionType = MCOConnectionTypeTLS; + + [session checkAccount:^(NSError *err, MCOOperation *op, id result) { + NSLog(@"CONNECTED? %@", err); + }]; + + [[NSRunLoop currentRunLoop] run]; + [session release]; +} + + void testAll() { u_setDataDirectory("/usr/local/share/icu"); @@ -286,7 +304,9 @@ void testAll() //testAsyncSMTP(data); //testAsyncIMAP(); //testAsyncPOP(); - + + testObjc(); + MCLog("pool release"); pool->release(); } |