PageRenderTime 20ms CodeModel.GetById 12ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/test/language/exceptions/test_exceptions23.e

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