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

specs: need new generic-function-method spec type #97

Open
cgay opened this issue Apr 24, 2019 · 1 comment
Open

specs: need new generic-function-method spec type #97

cgay opened this issue Apr 24, 2019 · 1 comment
Labels
specs Relates to testworks specs
Milestone

Comments

@cgay
Copy link
Member

cgay commented Apr 24, 2019

In the System test suite the spec says:

  open generic-function \= (<date>, <date>) => (<boolean>);

The failure says:

      date-protocol-functions-test failed
        function = argument 0 type {class <object>} is a supertype of the specified
            type {class <date>} failed [expression "subtype?(actual, spec)" evaluates
            to #f, not a true value.]

(The sense of sub/super-type in the error is incorrect but that's not the issue here.)

This is checking the wrong thing. What this spec wants to check is that there is a specific method on = for (<date>, <date>) but what it's actually checking is that the = gf exists and is defined on parameters that are subtypes of <date>.

I propose a new spec:

  generic-function-method \= (<date>, <date>) => (<boolean>);

to do the needful here.

@cgay cgay added the specs Relates to testworks specs label Apr 24, 2019
@cgay
Copy link
Member Author

cgay commented Nov 26, 2019

In #112 I remove generic-function specs because generic function does exactly the same thing. That works for define function, define generic, and for implicit generic functions defined by define method (not that that's much use).

I think the spec for checking that a particular method exists should just be called method, assuming that doesn't cause any parsing problems.

@cgay cgay added this to the Prioritization Test milestone Dec 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
specs Relates to testworks specs
Projects
None yet
Development

No branches or pull requests

1 participant