Closed RyanGlScott closed 7 years ago
We should probably add a test for this, but I'm not familiar with how Win32
handles its tests. I don't see a test-suite
stanza in Win32.cabal
either...
Thanks @RyanGlScott LGTM.
Win32
's tests are inline GHC tests. So you just have to write them like you would using the GHC testsuite.
I usually just add a remote to my github to libraries\Win32
to be able to run the tests.
Sweet, thanks @RyanGlScott I'll merge soon.
It turns out the implementation of
poke
forTIME_ZONE_INFORMATION
is incorrect for a number of reasons:copyArray
is completely wrong. The first array is the destination and the second is the source, so we need to flip the order in which the arguments currently appear.withCWStringLen
gives you the length of the string, not the number of bytes. Luckily, this is easily fixed by multiplyinglen
bysizeOf (undefined :: CWchar
).CWstring
with an actualCWchar
, not aWord8
. I've observed that doing the latter can sometimes yield garbage strings.Fixes #64.