Hi,
Currently, when I've placed a stone, I regenerate the possible chains with for each chain a list of its liberties (I use that liberties-list to see if it is dead or not).
After that, I do an assert if the all chains of the color that just placed the stone, if they all have 1 or more liberties.
What I'm wondering: do you people know of any other useful sanity check to perform?
regards
checks
checks
https://www.vanheusden.com/
https://github.com/folkertvanheusden/
https://github.com/folkertvanheusden/
-
- Posts: 219
- Joined: Tue Feb 12, 2008 8:31 pm
- Contact:
Re: checks
Hi Flok,
Here are in general the techniques I use to ensure quality of my C++ software:
Here are in general the techniques I use to ensure quality of my C++ software:
- googletest for unit testing: https://github.com/google/googletest
- gcov to measure test coverage: https://gcc.gnu.org/onlinedocs/gcc/Gcov.html
- run tests with sanitizers: https://github.com/google/sanitizers
- memory sanitizer is a bit tricky to use (the standard C++ library must be recompiled), so I sometimes use valgrind instead: https://valgrind.org/
- compile gcc tests with the -D_GLIBCXX_DEBUG option. This will do bounds checking for std containers, but not C arrays. That's why I use std::array instead of C arrays.
- use fuzzers: https://llvm.org/docs/LibFuzzer.html
- Static analysis: enable as many warnings as possible, use clang-tidy, MSVC's Code Analysis
Re: checks
Thank you but that was not what I meant: I'm looking for Go-specific checks. But, yeah, maybe it is like chess: more than move-gen-verification is not possible to do in a generic way.Rémi Coulom wrote: ↑Mon Apr 03, 2023 11:27 am Hi Flok,
Here are in general the techniques I use to ensure quality of my C++ software:
- googletest for unit testing: https://github.com/google/googletest
- gcov to measure test coverage: https://gcc.gnu.org/onlinedocs/gcc/Gcov.html
- run tests with sanitizers: https://github.com/google/sanitizers
- memory sanitizer is a bit tricky to use (the standard C++ library must be recompiled), so I sometimes use valgrind instead: https://valgrind.org/
- compile gcc tests with the -D_GLIBCXX_DEBUG option. This will do bounds checking for std containers, but not C arrays. That's why I use std::array instead of C arrays.
- use fuzzers: https://llvm.org/docs/LibFuzzer.html
- Static analysis: enable as many warnings as possible, use clang-tidy, MSVC's Code Analysis
https://www.vanheusden.com/
https://github.com/folkertvanheusden/
https://github.com/folkertvanheusden/