/test/lib/storage/collection/test_fast_has.e

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