JBenda / inkcpp

Inkle Ink C++ Runtime with JSON>Binary Compiler
MIT License
70 stars 13 forks source link

Test fails on Debug configuration #41

Closed LilithSilver closed 2 years ago

LilithSilver commented 2 years ago

When ctest -c Debug is run after the project is built with cmake --build . --config Debug , I get the following error:

image

Program: inkcpp_test.exe File: include\xstring Line: 1942 Expression: cannot dereference string iterator because it is out of range (e.g. an end iterator).

I'd look further into it, but I can't seem to figure out how to run tests from Visual Studio and step through the code.

Note that the tests work fine under the Release configuration.

JBenda commented 2 years ago

Interesting, I can't remember having the same problem with UNIX ... If you have time to spare consider looking deeper :)

LilithSilver commented 2 years ago

I could; I just can't seem to get the test suite running in VS on Windows (or anything else that would let me debug). I can get it to build and run as part of the build through VS, but I can't get it debugging. Do you know how?

JBenda commented 2 years ago

May take a look at #42, this should resolve the problem. Thank you for point us to that. It's a more clean now. Please let me know if it also works for you.

To debug inkcpp_test in VS you start the inkcpp.sln project, then right-click on the inkcpp_test subproject and selecting it as set as start project. Then you can run it with Debugger attached with the green arrow at the top. Hope that helps

LilithSilver commented 2 years ago

May take a look at #42, this should resolve the problem. Thank you for point us to that. It's a more clean now. Please let me know if it also works for you.

To debug inkcpp_test in VS you start the inkcpp.sln project, then right-click on the inkcpp_test subproject and selecting it as set as start project. Then you can run it with Debugger attached with the green arrow at the top. Hope that helps

Works for me! Also the set as startup project is what I was missing; it works now.

Thank you!