/test/language/assertion/aux_require1_d.e
Specman e | 109 lines | 69 code | 19 blank | 21 comment | 0 complexity | e776ac4f337e4891f2bf945185e8e75f 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 AUX_REQUIRE1_D 5 6inherit 7 AUX_REQUIRE1_A 8 AUX_REQUIRE1_C 9 10create {ANY} 11 default_create 12 13feature {} 14 d_only 15 require 16 counting_require 17 do 18 end 19 20 d_or_a_and_c 21 require else 22 bad_counting_require 23 do 24 end 25 26 d_or_a_and_b 27 require else 28 bad_counting_require 29 do 30 end 31 32 everywhere 33 require else 34 bad_counting_require 35 do 36 end 37 38 partial 39 require else 40 counting_require 41 bad_counting_require 42 counting_require 43 do 44 end 45 46feature {ANY} 47 foo 48 do 49 counter.reset 50 a_only 51 assert(counter.item = 1) 52 53 counter.reset 54 b_only 55 assert(counter.item = 1) 56 57 counter.reset 58 c_only 59 assert(counter.item = 1) 60 61 counter.reset 62 d_only 63 assert(counter.item = 1) 64 65 counter.reset 66 a_and_c 67 assert(counter.item = 2) 68 69 counter.reset 70 d_or_a_and_c 71 assert(counter.item = 3) 72 73 counter.reset 74 a_and_b 75 assert(counter.item = 3) 76 77 counter.reset 78 d_or_a_and_b 79 assert(counter.item = 4) 80 81 counter.reset 82 everywhere 83 assert(counter.item = 5) 84 85 counter.reset 86 partial 87 assert(counter.item = 7) 88 89 end 90 91end -- class AUX_REQUIRE1_D 92-- 93-- ------------------------------------------------------------------------------------------------------------------------------ 94-- Copyright notice below. Please read. 95-- 96-- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, 97-- as published by the Free Software Foundation; either version 2, or (at your option) any later version. 98-- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty 99-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have 100-- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free 101-- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. 102-- 103-- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P. - University of Nancy 1 - FRANCE 104-- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE 105-- 106-- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN 107-- 108-- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr 109-- ------------------------------------------------------------------------------------------------------------------------------