/test/language/unclassified/jvm/test_jvm9.e

http://github.com/tybor/Liberty · Specman e · 65 lines · 41 code · 3 blank · 21 comment · 0 complexity · 371fbcab096e5ad7b08455db2ad9dc83 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_JVM9
  5. create {}
  6. make
  7. feature {ANY}
  8. make
  9. local
  10. s: STRING; c: CHARACTER; value: INTEGER
  11. do
  12. c := 'a'
  13. check
  14. c /= 'b'
  15. end
  16. s := "foo"
  17. c := s.first
  18. check
  19. s.count = 3
  20. c = 'f'
  21. end
  22. value := s.count
  23. check
  24. value = 3
  25. value = s.count
  26. end
  27. value := 6
  28. check
  29. value = 6
  30. end
  31. s.clear_count
  32. check
  33. s.count = 0
  34. end
  35. s := "oo"
  36. s.extend('f')
  37. check
  38. s.count = 3
  39. end
  40. check
  41. 4 >= 3
  42. end
  43. end
  44. end -- class TEST_JVM9
  45. --
  46. -- ------------------------------------------------------------------------------------------------------------------------------
  47. -- Copyright notice below. Please read.
  48. --
  49. -- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License,
  50. -- as published by the Free Software Foundation; either version 2, or (at your option) any later version.
  51. -- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty
  52. -- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have
  53. -- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free
  54. -- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
  55. --
  56. -- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P. - University of Nancy 1 - FRANCE
  57. -- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
  58. --
  59. -- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
  60. --
  61. -- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
  62. -- ------------------------------------------------------------------------------------------------------------------------------