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

Deduplicate stub game arena elements in tests #286

Closed
Mikolaj opened this issue Dec 7, 2021 · 8 comments
Closed

Deduplicate stub game arena elements in tests #286

Mikolaj opened this issue Dec 7, 2021 · 8 comments

Comments

@Mikolaj
Copy link
Member

Mikolaj commented Dec 7, 2021

Perhaps some values from UnitTestHelpers can be replaced by those in Game.LambdaHack.Common.Kind and surely some in other tests can be replaced by those in UnitTestHelpers, because in some cases they are identical.

If there is a benefit in the stub game arena elements being different in test files than in UnitTestHelpers, perhaps the extra ones should be moved to UnitTestHelpers, as well, and perhaps different blocks of tests in the same file could use different such elements, not just one.

@Mikolaj
Copy link
Member Author

Mikolaj commented Dec 7, 2021

Example elements to deduplicate: testLevel, stubItem, testItemBase.

@kayvank
Copy link
Contributor

kayvank commented Mar 8, 2022

@Mikolaj I would like to take this task plz.

@Mikolaj
Copy link
Member Author

Mikolaj commented Mar 8, 2022

Good choice. I don't have comments at this point, but please feel free to ask questions at any time.

@kayvank
Copy link
Contributor

kayvank commented Mar 9, 2022

@Mikolaj

testItemBase
is used in [test/ItemDescriptionUnitTests.hs(https://github.com/LambdaHack/LambdaHack/blob/master/test/ItemDescriptionUnitTests.hs#L23) only. Does it still need to be moved to UnitTestHelpers?

@Mikolaj
Copy link
Member Author

Mikolaj commented Mar 9, 2022

Your call.

@kayvank
Copy link
Contributor

kayvank commented Mar 9, 2022

I'll leave it there for now till we find a reuse for it down the line.
#292 is ready for your review please. than you for your help.

@Mikolaj
Copy link
Member Author

Mikolaj commented Mar 9, 2022

My pleasure. PR's can be referenced as in #292 as well.

@Mikolaj
Copy link
Member Author

Mikolaj commented Mar 12, 2022

Closed by #292.

@Mikolaj Mikolaj closed this as completed Mar 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants