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

Testing Termloop #22

Open
JoelOtter opened this issue Dec 1, 2015 · 8 comments
Open

Testing Termloop #22

JoelOtter opened this issue Dec 1, 2015 · 8 comments

Comments

@JoelOtter
Copy link
Owner

We don't really have any tests other than running the included examples. If anyone has any ideas about the best way to go about this, please say!

@aquilax
Copy link
Contributor

aquilax commented Dec 1, 2015

Most of the units are easily testable as they don't directly interact with termbox so IMO it's just a matter of picking the way of tasting (native or any framework) and start writing them. I quite like http://goconvey.co/ for writing tests but mileage may vary :)

@JoelOtter
Copy link
Owner Author

@aquilax Thanks, I'll look into that! Wondering what we're going to do for drawing-based methods - perhaps we could run a fake 'game loop' and a fixed-size canvas, and check after a certain number of iterations that given cells are correct.

@aquilax
Copy link
Contributor

aquilax commented Dec 1, 2015

If all interaction with termbox is through an Interface then it would be easy to mock that. Also creates some opportunities for other drawing engines 😄

@JoelOtter
Copy link
Owner Author

That's a really interesting idea. We currently interact with things based on whether or not they're Drawables, but that still relies on having a Screen. If the screen could be an interface and the concrete version could be, say, TerminalScreen, that would work well. Might be a bit beyond the scope of this project though - I'd like to keep it in the terminal if possible. 😃

@aquilax
Copy link
Contributor

aquilax commented Dec 1, 2015

Definitely keep the terminal 👍 but having ncurses adapter is also a possibility.

@JoelOtter
Copy link
Owner Author

What would be the advantage of having an ncurses adapter over Termbox? (I've never actually used it.)

@aquilax
Copy link
Contributor

aquilax commented Dec 1, 2015

It's widely used and well tested, so someone may prefer it but that does not mean that you have to implement it. The idea is to allow the flexibility for someone to implement it if one wishes to.

@JoelOtter
Copy link
Owner Author

Very true.

On 1 Dec 2015, at 12:23, Evgeniy Vasilev [email protected] wrote:

It's widely used and well tested, so someone may prefer it but that does not mean that you have to implement it. The idea is to allow the flexibility for someone to implement it if one wishes to.


Reply to this email directly or view it on GitHub #22 (comment).

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

No branches or pull requests

2 participants