I hereby claim:
- I am kjcolley7 on github.
- I am kjcolley7 (https://keybase.io/kjcolley7) on keybase.
- I have a public key ASD91aTRhRKgUwWxRzQ8lkB39AyV3zHd15uEQCkfGVnB9Qo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
module ExtraChessTests where | |
import Chess | |
import Testing | |
extra_pos_tests = | |
-- Test legal positions | |
assertTrue (isLegalPosition ('h', 4)) | |
+> assertTrue (isLegalPosition ('a', 1)) | |
+> assertTrue (isLegalPosition ('h', 8)) |
There are two headers in this gist which both define the destroy()
macro with the same
behavior but in slightly different ways.
##destroy.h##
This version of the destroy()
macro works with any compiler that supports __typeof__
, which
includes gcc and clang but unfortunately not MSVC. This version is completely type safe,
because no casts are used and therefore the compiler can check that all types are convertible.