PageRenderTime 24ms CodeModel.GetById 19ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

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