/test/language/instruction/precursor/test_precursor20.e

http://github.com/tybor/Liberty · Specman e · 63 lines · 25 code · 6 blank · 32 comment · 0 complexity · 764a3a8e826c792dda6a819f67860c67 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_PRECURSOR20
  5. --
  6. -- Written by Cyril Adrian
  7. -- This bug shows a bad compilation when using both inspect and
  8. -- Precursor at the same time
  9. --
  10. -- test_precursor201.c: In function 'r25_P_26_find_string':
  11. -- test_precursor201.c:1769: error: '_2' undeclared (first use in this function)
  12. -- test_precursor201.c:1769: error: (Each undeclared identifier is reported only once
  13. -- test_precursor201.c:1769: error: for each function it appears in.)
  14. -- test_precursor201.c:1778: error: '_3' undeclared (first use in this function)
  15. --
  16. inherit
  17. AUX_PRECURSOR20
  18. redefine
  19. find_string
  20. end
  21. insert
  22. EIFFELTEST_TOOLS
  23. create {}
  24. make
  25. feature {}
  26. find_string (string: STRING): BOOLEAN
  27. do
  28. inspect string
  29. when "dummy" then
  30. Result := True
  31. else
  32. Result := Precursor(string)
  33. end
  34. end
  35. make
  36. do
  37. assert(find_string("dummy"))
  38. end
  39. end -- class TEST_PRECURSOR19
  40. --
  41. -- ------------------------------------------------------------------------------------------------------------------------------
  42. -- Copyright notice below. Please read.
  43. --
  44. -- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License,
  45. -- as published by the Free Software Foundation; either version 2, or (at your option) any later version.
  46. -- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty
  47. -- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have
  48. -- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free
  49. -- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
  50. --
  51. -- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P. - University of Nancy 1 - FRANCE
  52. -- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
  53. --
  54. -- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
  55. --
  56. -- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
  57. -- ------------------------------------------------------------------------------------------------------------------------------