/tutorial/triangle/version1/example3.e

http://github.com/tybor/Liberty · Specman e · 26 lines · 18 code · 4 blank · 4 comment · 0 complexity · e065c232a97fe6a7d2aa03f7dd0304a9 MD5 · raw file

  1. class EXAMPLE3
  2. -- Again, compile with: compile -sedb example1
  3. -- ... and try to understand what happens at run-time.
  4. create {ANY}
  5. main
  6. feature {ANY}
  7. main
  8. local
  9. x, y, z: POINT; t: TRIANGLE
  10. do
  11. create x
  12. x.translate(1.0, 2.0)
  13. create z
  14. z.translate(5.0, 6.0)
  15. create t
  16. t.make(x, y, z)
  17. t.translate(1, 2)
  18. -- It is now time to look at version2 of class
  19. -- TRIANGLE
  20. sedb_breakpoint
  21. end
  22. end -- class EXAMPLE3