-
-
Notifications
You must be signed in to change notification settings - Fork 393
Make all Dictionary tests inheritable #17949
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
Make all Dictionary tests inheritable #17949
Conversation
+ Implement ``SystemEnvironment>>#at:update:initial:` and adapt this class' tests
Tx! |
+ With a test similar to `testAtPutNil` + Fix typo in comment
I'm not fan of adding |
It doesn't have to be just for passing the tests, this method has always been part of the |
Hi @Gabriel-Darbord, I think the issue is manyfold
|
I was thinking more along the lines of using the existing SystemEnvironment with the regular Dictionary API, rather than creating new ones and using them as dictionaries, but both are currently possible, so nothing prevents misuse. |
Thanks christophe for your review! Tx all. |
I found 8 tests in DictionaryTest that hardcoded the use of the Dictionary class. This meant that all subclasses of DictionaryTest also ran these tests using dictionaries instead of the class they were supposed to test. This fix replaces those hardcoded occurrences with the use of the
classToBeTested
method, just like all other tests.Now about SystemEnvironment, which is a special cookie. This fix works for all classes except for this one. This required implementing
SystemEnvironment>>#at:update:initial:
, and also adjusting the tests for this class. @jecisc told me about the plans to no longer make this class inherit from Dictionary, so I guess this can be considered a temporary workaround. The API that is tested by these fixed tests is not used anywhere else anyway.