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

test_Globals should be converted into two separate fixtures #655

Open
ghost opened this issue Nov 4, 2018 · 2 comments
Open

test_Globals should be converted into two separate fixtures #655

ghost opened this issue Nov 4, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Nov 4, 2018

Actual approach - makro - doesn't fulfill to well its task. Also two fixtures should be more flexible tool.

@ghost ghost changed the title test_Globals shoud be converted into two separate fixtures test_Globals should be converted into two separate fixtures Nov 4, 2018
@madebr
Copy link
Contributor

madebr commented Nov 14, 2018

Can you give more specifics about this issue? Do you mean #355 ?
I have refactored test_Globals in my proposed branch in that issue.

@ghost
Copy link
Author

ghost commented Nov 14, 2018

Partially, it fixes mess caused by makro, but there's is still that connected with constructing world.

Problem:
There's is a lot lines of code like:

gw.state = new GameState();

You need to build world on your self, know structure of it, remember to cleanup. It adds many unneeded lines of code. Prevent fixing leaks (without using shared_ptrs).

Fixing that can be done, by preparing two separate fixtures (with data and without) which are able to construct as simple as possible, but working world(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant