]> git.saurik.com Git - apple/security.git/blobdiff - certificates/ota_cert_tool/TestValidator/TestValidator.m
Security-57031.1.35.tar.gz
[apple/security.git] / certificates / ota_cert_tool / TestValidator / TestValidator.m
diff --git a/certificates/ota_cert_tool/TestValidator/TestValidator.m b/certificates/ota_cert_tool/TestValidator/TestValidator.m
new file mode 100644 (file)
index 0000000..43dde58
--- /dev/null
@@ -0,0 +1,30 @@
+//
+//  TestValidator.m
+//  TestValidator
+//
+//  Created by James Murphy on 12/13/12.
+//  Copyright 2012 James Murphy. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "ValidateAsset.h"
+
+int main (int argc, const char * argv[])
+{
+    @autoreleasepool
+    {
+        NSLog(@"Starting the TestValidator");
+        NSString* resource_path = [[NSBundle mainBundle] resourcePath];
+        const char* asset_dir_path = [resource_path UTF8String];
+        if (ValidateAsset(asset_dir_path, 99))
+        {
+            NSLog(@"The assert did not validate");
+        }
+        else
+        {
+            NSLog(@"The assert validated!");
+        }
+    
+    }
+    return 0;
+}