mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #107] Feature Request: Supporting unittests on MSVC #90
Labels
No labels
awaiting user feedback
bug
cmake
cmake
docs
feature request
in progress
long term
medium term
medium term
pull-request
question
question
ready to close
short term
under investigation
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/libxlsxwriter#90
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Alexhuszagh on GitHub (Jun 21, 2017).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/107
Originally assigned to: @jmcnamara on GitHub.
Hi jmcnamara,
I've written a patch that would allow fully functional unittests on MSVC, with a few small patches.
__attribute__to#defines, which are removed on MSVC (so the same functionality is kept elsewhere) inctest.h.gettimeofdayimplementation for Windows, forctest.h.iowin32.cif using MSVC, but not with MinGW or MSYS2.Combined, these relatively small changes make the entire unittest suite work on Windows, without changing any other build systems. If this is of interest, I will submit a PR so you can review the changes. I have tested the changes on MSYS2, MSVC 2015, MSVC 2017, macOS with GCC and Clang, Linux with GCC and Clang, and all build normally.
@jmcnamara commented on GitHub (Jun 22, 2017):
Hi Alex,
Thanks for the suggestion.
At the moment getting the unittests to work with MSVC isn't a high priority.
A guide to building a sample app, or all the sample apps, with CMake and MSVC would be much more useful. Pinging @jimzshi on this as well.
John
@jmcnamara commented on GitHub (Jun 22, 2017):
P.S. It looks like the latest version of Ctest may be more Windows compatible: https://github.com/bvdberg/ctest
@Alexhuszagh commented on GitHub (Jun 22, 2017):
@jmcnamara I quickly looked over it: it's most of the way there but it's missing a
gettimeofdayimplementation, which was suggested in a PR.For the other issue, I can create a sample app using cmake later today.
As far as the total diff to get CTest working, here it is (there are the other changes in IOAPI, but those are a single line). If you would like, I can make a PR there and then you can integrate the changes here.
@jmcnamara commented on GitHub (Jun 23, 2017):
That would be the best option. If you can't get it upstream into CTest you can submit a PR here and I'll add it into the libxlsxwriter copy.
@jmcnamara commented on GitHub (Jun 27, 2017):
Hi @Alexhuszagh, just submit a PR for the changes above and I'll merge it. No need to try upstream it to CTest first.
@Alexhuszagh commented on GitHub (Jul 10, 2017):
Hi @jmcnamara, sorry for the delay, I've been busy on another project. I'll make a PR for this, and have separate commits for each of the changes.