emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] A few cl-lib tests


From: Przemysław Wojnowski
Subject: Re: [PATCH] A few cl-lib tests
Date: Sun, 22 Feb 2015 00:24:07 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

>> +(ert-deftest cl-lib-test-nth-value ()
>> +  (should (= 1 (cl-nth-value 0 '(1))))
>> +  (should (null (cl-nth-value 1 '(1))))
>> +  (should-error (cl-nth-value 0.0 '(1)) :type 'wrong-type-argument)
>> +  (should-error (cl-nth-value 0 "only lists")  :type 'wrong-type-argument))
> 
> IIUC, this tests the current broken approximation of "multiple values",
> so those tests would likely fail if we were to try and improve the
> implementation of multiple values.  So I think these tests are wrong.
> They should look more like:
> 
>    (ert-deftest cl-lib-test-nth-value ()
>      (should (= 1 (cl-nth-value 0 (values 1))))
>      (should (null (cl-nth-value 1 (values 1))))
>      (should-error (cl-nth-value 0.0 (values 1)) :type 'wrong-type-argument))
> 
> 
> -- Stefan
> 

Thanks for feedback. I've corrected the tests. Now they use cl-values when
expected. I split them into two groups: working tests and those that suppose to
work, but do to lack of support for multiple values they don't. If at some point
multiple values will be implemented, then those tests can be moved to the first
group. Is that ok?

BTW I'm contributing for the first time here and I'm not really sure what is the
next action after sending a patch... If it cannot be committed for some reason I
would like to know why, for example: "We can't add it because of... When you fix
it we will commit it to the repository." or "We won't add it no matter what."
(it's still better than no feedback :-) ).

Thanks,
Przemysław

Attachment: 0001-A-few-cl-lib-tests.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]