/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

  1. class TEST_ADDRESS_OF3
  2. insert
  3. EIFFELTEST_TOOLS
  4. create {}
  5. main
  6. feature {}
  7. main
  8. local
  9. i: INTEGER
  10. do
  11. i := call_foo_with_pointer($foo)
  12. assert(i = 7)
  13. end
  14. foo: INTEGER
  15. do
  16. Result := 7
  17. end
  18. call_foo_with_pointer (pointer: POINTER): INTEGER
  19. external "C inline"
  20. alias "((int (*) (void*))$pointer)(C)"
  21. end
  22. end