/test/language/unclassified/test_pn1.e

http://github.com/tybor/Liberty · Specman e · 47 lines · 30 code · 10 blank · 7 comment · 1 complexity · cad3c69af638b277a22e2dd35077fafc MD5 · raw file

  1. -----------------------------------------------------------------------------
  2. note
  3. title : "C Code Bug";
  4. cluster : "";
  5. project : "";
  6. copyright : "";
  7. author : "Philipp Niedermaier";
  8. original : "08.12.99";
  9. version : "1.0";
  10. -----------------------------------------------------------------------------
  11. class TEST_PN1
  12. -- From: "Philipp Niedermaier" <pn@cpg.de>
  13. create {}
  14. make
  15. -----------------------------------------------------------------------------
  16. feature {}
  17. -----------------------------------------------------------------------------
  18. make
  19. local
  20. point_array: ARRAY[AUX_PN1]
  21. do
  22. create point_array.make (0, 1)
  23. c_code_bug (point_array)
  24. end
  25. -----------------------------------------------------------------------------
  26. c_code_bug (points_p: ARRAY[AUX_PN1])
  27. local
  28. a: REAL
  29. do
  30. if points_p.item (0).y < 0 then
  31. a := points_p.item (0).x
  32. elseif points_p.item (0).y < 0 then
  33. a := points_p.item (0).x
  34. end
  35. end -- c_code_bug
  36. -----------------------------------------------------------------------------
  37. end