Fix {JSON_OBJECT}.hash_code implementation
Don't call {HASH_TABLE}.item_for_iteration when {HASH_TABLE}.off
Use {HASH_TABLE}.out instead
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
*.swp
|
*.swp
|
||||||
|
EIFGENs
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ feature -- Report
|
|||||||
do
|
do
|
||||||
from
|
from
|
||||||
object.start
|
object.start
|
||||||
Result := object.item_for_iteration.hash_code
|
Result := object.out.hash_code
|
||||||
until
|
until
|
||||||
object.off
|
object.off
|
||||||
loop
|
loop
|
||||||
|
|||||||
@@ -778,6 +778,17 @@ feature -- Test
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test_json_object_hash_code
|
||||||
|
local
|
||||||
|
ht: HASH_TABLE [ANY, JSON_VALUE]
|
||||||
|
jo: JSON_OBJECT
|
||||||
|
do
|
||||||
|
create ht.make (1)
|
||||||
|
create jo.make
|
||||||
|
ht.force ("", jo)
|
||||||
|
assert ("ht.has_key (jo)", ht.has_key (jo))
|
||||||
|
end
|
||||||
|
|
||||||
test_json_failed_json_conversion
|
test_json_failed_json_conversion
|
||||||
-- Test converting an Eiffel object to JSON that is based on a class
|
-- Test converting an Eiffel object to JSON that is based on a class
|
||||||
-- for which no JSON converter has been registered.
|
-- for which no JSON converter has been registered.
|
||||||
|
|||||||
Reference in New Issue
Block a user