Raffaello / sdl2-vga-terminal

SDL2 VGA Terminal
MIT License
6 stars 1 forks source link

mocking functionality and create a sort of interface for the rendering part #114

Open Raffaello opened 4 years ago

Raffaello commented 4 years ago

the scope of this ticket is to aggregate with a render, not exposing a render interface

In this way should be possible to avoid the virtual and decoupling the SDL rendering.

Still not sure if it makes sense apart from testing, because SDL is treated as "hardware" but without it is almost impossible test automatically some functionality.

for example with template method of gmock https://github.com/google/googletest/blob/master/googlemock/docs/cook_book.md#MockingNonVirtualMethods

Raffaello commented 4 years ago

so it is required to remove the inheritance window <- vgaterminal too and compose vgaterminal with a window (SDLwindow specifically) and a SDLRender ?

not sure if it is better. at this point might make sense review the whole code structure...