aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Matt Ronge <mronge@mronge.com>2013-01-31 20:33:49 -0600
committerGravatar Matt Ronge <mronge@mronge.com>2013-01-31 20:33:49 -0600
commit3d95ea21fa92fe859eb14781c44185c5da4a62b9 (patch)
tree955a95f8fe5e9da040f158acbd2f046688cefde5 /tests
parentb1eb6ca70a0399a6202bc34e26bd5501ae0c3ac9 (diff)
Start of an Obj-C async API
Diffstat (limited to 'tests')
-rw-r--r--tests/main.mm22
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();
}