mattiadg / BoardGames

Two-players board games with AI engines. A project for learning software development in C++ and game programming.
Other
11 stars 13 forks source link

[TicTacToe] Add tests #3

Open mattiadg opened 6 years ago

mattiadg commented 6 years ago

Unit tests and game tests are required. It is useful to learn about test tools in C++.

Pansaai commented 6 years ago

Is there a certain testing framework that should be used, or anything would do ?

I have never done this before but i would like to play around with it and try to implement this.

mattiadg commented 6 years ago

I have never used testing frameworks for C++. So, if there are some that you find interesting, we can choose among them.

Pansaai commented 6 years ago

Well i have been looking around and this is what i found.

I would personally like to have a look at google test as this is also the one where I can find the most documentation.

mattiadg commented 6 years ago

By looking at the features it looks great, but maybe Catch2 is more immediate to use. Try Google test first if you like it, if it's easy to use and to integrate into the project we can continue with it.

Il 14/Ott/2018 06:52 PM, "Thomas Pans" notifications@github.com ha scritto:

Well i have been looking around and this is what i found.

-

Catch2 https://github.com/catchorg/Catch2: Header only, easy to start but doe not support mock objects

Google test https://github.com/google/googletest: mocking out of the box and supports death tests. Is a little heavier though and needs to be embedded.

I would personally like to have a look at google test as this is also the one where I can find the most documentation.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mattiadg/BoardGames/issues/3#issuecomment-429642361, or mute the thread https://github.com/notifications/unsubscribe-auth/AD6xog3t_DsC8oWymMsMlaij5KKeRN4sks5uk2vDgaJpZM4XNcBR .

Pansaai commented 6 years ago

Just quick update after a few days of messing around.

I think catch2 will be the best choice here, it is really straight forward.

google test was just a pain to setup and integrate.

@mattiadg If you agree i will continue with catch2 as the testing framework

mattiadg commented 6 years ago

If it's easier, it's fine for me. When we have now experience we can move to more complex tools

Il 17/Ott/2018 09:32 PM, "Thomas Pans" notifications@github.com ha scritto:

Just quick update after a few days of messing around.

I think catch2 will be the best choice here, it is really straight forward.

google test was just a pain to setup and integrate.

@mattiadg https://github.com/mattiadg If you agree i will continue with catch2 as the testing framework

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/mattiadg/BoardGames/issues/3#issuecomment-430758997, or mute the thread https://github.com/notifications/unsubscribe-auth/AD6xoqXYu8TDDTbYDy1g-FgSEVgVyaD_ks5ul4W7gaJpZM4XNcBR .

mattiadg commented 6 years ago

Addressed in #26. Closing