PageRenderTime 17ms CodeModel.GetById 12ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/test/language/address_of/test_address_of3.e

http://github.com/tybor/Liberty
Specman e | 28 lines | 22 code | 6 blank | 0 comment | 0 complexity | e2a7b64b64e4ded2427de91578a7edb8 MD5 | raw file
 1class TEST_ADDRESS_OF3
 2
 3insert
 4   EIFFELTEST_TOOLS
 5   
 6create {}
 7   main
 8
 9feature {}
10   main
11      local
12         i: INTEGER
13      do
14         i := call_foo_with_pointer($foo)
15         assert(i = 7)
16      end
17
18   foo: INTEGER
19      do
20         Result := 7
21      end
22
23   call_foo_with_pointer (pointer: POINTER): INTEGER
24      external "C inline"
25      alias "((int (*) (void*))$pointer)(C)"
26      end
27
28end