/test/lib/storage/collection/test_old_manifest_array.e

http://github.com/tybor/Liberty · Specman e · 59 lines · 30 code · 8 blank · 21 comment · 0 complexity · ce5b2fa614a16e78c5bc3de23a547a64 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_OLD_MANIFEST_ARRAY
  5. insert
  6. EIFFELTEST_TOOLS
  7. create {}
  8. make
  9. feature {ANY}
  10. foo: STRING "foo"
  11. bar: STRING "bar"
  12. make
  13. do
  14. assert((
  15. <<foo, bar>>).is_equal({ARRAY[STRING] 1, << foo, bar >> }))
  16. assert((
  17. <<1, 1000>>).is_equal({ARRAY[INTEGER_16] 1, << 1, 1000 >> }))
  18. assert((
  19. <<1.5, 100.7>>).is_equal({ARRAY[REAL] 1, << 1.5, 100.7 >> }))
  20. assert((
  21. <<cat, dog>>).is_equal({ARRAY[QUADRUPED] 1, << cat, dog >> }))
  22. assert((
  23. <<1, 2>>).item(1) = 1)
  24. end
  25. cat: CAT
  26. once
  27. create Result
  28. end
  29. dog: DOG
  30. once
  31. create Result
  32. end
  33. end -- class TEST_OLD_MANIFEST_ARRAY
  34. --
  35. -- ------------------------------------------------------------------------------------------------------------------------------
  36. -- Copyright notice below. Please read.
  37. --
  38. -- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License,
  39. -- as published by the Free Software Foundation; either version 2, or (at your option) any later version.
  40. -- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty
  41. -- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have
  42. -- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free
  43. -- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
  44. --
  45. -- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P. - University of Nancy 1 - FRANCE
  46. -- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
  47. --
  48. -- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
  49. --
  50. -- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
  51. -- ------------------------------------------------------------------------------------------------------------------------------