/[eiffelstudio]/trunk/eweasel/tests/scoop045/logger.e
ViewVC logotype

Contents of /trunk/eweasel/tests/scoop045/logger.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 96579 - (show annotations)
Wed Feb 4 10:06:26 2015 UTC (4 years, 11 months ago) by romanschmocker
File size: 819 byte(s)
Eweasel tests for SCOOP exception handling.

The tests are written against the new semantics
by Benjamin Morandi, and currently they all fail.
Initially the tests were part of a naster thesis 
at ETH by Florian Besser.

The patch also includes a test for a bug
(test#scoop041) where the behaviour in molten
and frozen code differs when evaluating a
precondition on a controlled object.



1 note
2 description: "Mock class for a result logger."
3 author: "Florian Besser, Roman Schmocker"
4 date: "$Date$"
5 revision: "$Revision$"
6
7 class
8 LOGGER
9
10 feature
11
12 solution: INTEGER
13 -- The last solution found in one of the searchers.
14
15 log (a_first_searcher, a_second_searcher: separate SEARCHER)
16 -- Try to log the solution of the first searcher, and if that fails,
17 -- log from the second searcher.
18 local
19 retried: BOOLEAN
20 do
21 if not retried then
22 if a_first_searcher.has_solution then
23 print ("In {LOGGER}.log: Using first solution.%N")
24 solution := a_first_searcher.solution
25 else
26 print ("In {LOGGER}.log: Using second solution.%N")
27 solution := a_second_searcher.solution
28 end
29 end
30 rescue
31 print ("In rescue of {LOGGER}.log.%N")
32 retried := True
33 retry
34 end
35
36 end

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.23