/test/language/instruction/inspect/test_inspect11.e

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