Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to collection tests #615

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sources/dylan/tests/collections.dylan
Original file line number Diff line number Diff line change
Expand Up @@ -834,9 +834,9 @@ define method test-element
element(collection, -1, default: default),
default);
unless (type == <object>)
check-condition(format-to-string("%s element wrong default type errors", name),
<error>,
element(collection, -1, default: #"wrong-default-type"));
check-equal(format-to-string("%s element wrong default type allowed", name),
element(collection, -1, default: #"wrong-default-type"),
#"wrong-default-type");
end unless;
for (key in key-sequence(collection))
check-equal(format-to-string("%s element %=", name, key),
Expand Down
6 changes: 4 additions & 2 deletions sources/dylan/tests/specification.dylan
Original file line number Diff line number Diff line change
Expand Up @@ -280,15 +280,17 @@ define protocol-spec collections ()
function head-setter (<object>, <pair>) => (<object>);
function tail-setter (<object>, <pair>) => (<object>);
open generic-function add (<sequence>, <object>) => (<sequence>);
open generic-function add! (<sequence>, <object>) => (<sequence>);
//--- DRM defines add! for <sequence>, but OD supports it for all <collection>.
open generic-function add! (<collection>, <object>) => (<collection>);
open generic-function add-new
(<sequence>, <object>, #"key", #"test") => (<sequence>);
open generic-function add-new!
(<sequence>, <object>, #"key", #"test") => (<sequence>);
open generic-function remove
(<sequence>, <object>, #"key", #"test", #"count") => (<sequence>);
//--- DRM defines remove! for <sequence>, but OD supports it for all <collection>.
open generic-function remove!
(<sequence>, <object>, #"key", #"test", #"count") => (<sequence>);
(<collection>, <object>, #"key", #"test", #"count") => (<collection>);
open generic-function push (<deque>, <object>) => (<object>);
open generic-function pop (<deque>) => (<object>);
open generic-function push-last (<deque>, <object>) => (<object>);
Expand Down