/test/language/gc/ISMM98/PMO/test_bench.e
Specman e | 71 lines | 41 code | 6 blank | 24 comment | 0 complexity | 9dc68b1a9529c4e97f1e63efd01f856e 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_BENCH 5 6create {} 7 make 8 9feature {ANY} 10 fruit_array: ARRAY[FRUIT] 11 12 apple: APPLE 13 14 peach: PEACH 15 16 make 17 local 18 i, limit: INTEGER 19 do 20 limit := 300000 21 create fruit_array.make(1, limit) 22 -- Filling `fruit_array' with apples : 23 from 24 i := 1 25 until 26 i > limit 27 loop 28 create apple.make(i) 29 fruit_array.put(apple, i) 30 i := i + 1 31 end 32 -- To clear `fruit_array' contents : 33 from 34 i := 1 35 until 36 i > limit 37 loop 38 fruit_array.put(Void, i) 39 i := i + 1 40 end 41 -- Filling `fruit_array' with peaches : 42 from 43 i := 1 44 until 45 i > limit 46 loop 47 create peach.make(i) 48 fruit_array.put(peach, i) 49 i := i + 1 50 end 51 end 52 53end -- class TEST_BENCH 54-- 55-- ------------------------------------------------------------------------------------------------------------------------------ 56-- Copyright notice below. Please read. 57-- 58-- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, 59-- as published by the Free Software Foundation; either version 2, or (at your option) any later version. 60-- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty 61-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have 62-- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free 63-- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. 64-- 65-- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P. - University of Nancy 1 - FRANCE 66-- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE 67-- 68-- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN 69-- 70-- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr 71-- ------------------------------------------------------------------------------------------------------------------------------