/[eiffelstudio]/trunk/eweasel/tests/store043/test.e
ViewVC logotype

Contents of /trunk/eweasel/tests/store043/test.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 99262 - (show annotations)
Thu Oct 6 17:21:30 2016 UTC (3 years, 3 months ago) by manus
File size: 1107 byte(s)
New test showing that storable is not handling changes in formal generic constraints

If you change a type to be constrained to A but then change it to B, it should raise a mismatch.

1 note
2 description: "System's root class"
3
4 class
5 TEST
6
7 inherit
8 SERIALIZATION_HELPER
9
10 ARGUMENTS
11
12 create
13 make, default_create
14
15 feature -- Initialization
16
17 make
18 -- Creation procedure.
19 local
20 l_obj: ANY
21 l_objects: like retrieved_objects
22 l_expected_successful_retrieval: INTEGER
23 do
24 set_is_pointer_value_stored (True)
25 -- Only store the object when no argument is provided
26 if argument_count = 0 then
27 l_obj := (create {STORABLE_TEST}.make)
28 store_object (l_obj, "stored")
29 l_expected_successful_retrieval := recoverable_types.count
30 end
31 l_objects := retrieved_recoverable_objects ("stored")
32 if l_objects.count /= l_expected_successful_retrieval then
33 io.put_string ("Got " + l_objects.count.out + " successful retrieval when " + l_expected_successful_retrieval.out + " should have succeeded%N")
34 across l_objects as l_item loop
35 io.put_string ("Retrieved " + l_item.key + "%N")
36 if attached {STORABLE_TEST} l_item.item as l_stored_obj then
37 l_stored_obj.test
38 else
39 io.put_string ("Not of a valid type%N")
40 end
41 end
42 end
43 end
44
45 end

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23