1/*
2 * Copyright (c) 2010 Apple Inc. All rights reserved.
3 *
4 * @APPLE_LLVM_LICENSE_HEADER@
5 */
6
7//
8//  byrefaccess.m
9//  test that byref access to locals is accurate
10//  testObjects
11//
12//  Created by Blaine Garst on 5/13/08.
13//  Copyright 2008 __MyCompanyName__. All rights reserved.
14//
15// TEST_CONFIG
16
17#include <stdio.h>
18#include "test.h"
19
20void callVoidVoid(void (^closure)(void)) {
21    closure();
22}
23
24int main() {
25    __block int i = 10;
26
27    callVoidVoid(^{ ++i; });
28
29    if (i != 11) {
30        fail("didn't update i");
31        return 1;
32    }
33
34    succeed(__FILE__);
35}
36