/test/language/unclassified/jvm/test_jvm13.e

http://github.com/tybor/Liberty · Specman e · 68 lines · 12 code · 4 blank · 52 comment · 0 complexity · 1b6c00c618c257294dd80f05a81bbc4b MD5 · raw file

  1. -- This file is part of SmartEiffel The GNU Eiffel Compiler Tools and Libraries.
  2. -- See the Copyright notice at the end of this file.
  3. --
  4. class TEST_JVM13
  5. create {}
  6. make
  7. feature {ANY}
  8. make
  9. local
  10. dog: DOG
  11. do
  12. -- s1, s2: STRING;
  13. -- a: ANIMAL;
  14. -- cat: CAT;
  15. -- s1 := foo;
  16. -- s2 := foo;
  17. -- check
  18. -- s1 = s2;
  19. -- not (s1 /= s2);
  20. -- end;
  21. --
  22. -- !!cat;
  23. -- check
  24. -- cat /= Void;
  25. -- not cat.is_dog;
  26. -- cat.is_cat;
  27. -- end;
  28. create dog
  29. -- a := dog;
  30. -- check
  31. -- not a.is_cat;
  32. -- a.is_dog;
  33. -- end;
  34. -- a := Void;
  35. -- check
  36. -- a = Void;
  37. -- not (a /= Void)
  38. -- end;
  39. -- !CAT!a;
  40. -- check
  41. -- cat.is_cat;
  42. -- not cat.is_dog;
  43. -- end;
  44. end
  45. foo: STRING "foo"
  46. end -- class TEST_JVM13
  47. --
  48. -- ------------------------------------------------------------------------------------------------------------------------------
  49. -- Copyright notice below. Please read.
  50. --
  51. -- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License,
  52. -- as published by the Free Software Foundation; either version 2, or (at your option) any later version.
  53. -- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty
  54. -- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have
  55. -- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free
  56. -- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
  57. --
  58. -- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P. - University of Nancy 1 - FRANCE
  59. -- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
  60. --
  61. -- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
  62. --
  63. -- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
  64. -- ------------------------------------------------------------------------------------------------------------------------------