1/* 2 * Copyright (c) 2010 Apple Inc. All rights reserved. 3 * 4 * @APPLE_LLVM_LICENSE_HEADER@ 5 */ 6 7/* 8 * driver.h 9 * ClosureTest 10 * 11 * Created by Blaine Garst on 1/25/08. 12 * Copyright 2008 __MyCompanyName__. All rights reserved. 13 * 14 */ 15 16#include <stdio.h> 17#include "../Block.h" 18#include "../Block_private.h" 19 20// test routines to set/get a global. Note that getting is destructive - do it once only. 21void setGlobalInt(int value); 22int getGlobalInt() ; 23 24 25// call void returning closure that takes void 26//void callVoidVoid(void (^voidvoid)(void)); 27void callVoidVoid(void *voidvoid); 28 29// error checking 30int error_found(const char *name, int globalValue, int desiredValue, int verbose); 31 32 33enum { 34 VERBOSE = 1, 35}; 36 37// when byref closures can be copied turn this on to try out copying case 38//#define FULL_CLOSURES 39 40// when objc4-377 then 41#define NEWER_OBJC 1 42 43int parameters_example(int verbose); 44int result_value_example(int verbose); 45int imports_example(int verbose); 46int imports_example2(int verbose); 47int import_byref_interim(int verbose); 48int import_byref(int verbose); 49int import_global(int verbose); 50int test_blocks(int verbose); 51int test_objc(int verbose); 52