-
Notifications
You must be signed in to change notification settings - Fork 53
Use of FakeIt as a dependency with supporting fixes #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add __cplusplus version check an and use std::uncaught_exceptions() if __cplusplus version is greater than or equal to 201703L . This is to support compilation with gnu++17 compiler.
I am currently trying to include this into some project but it fails. Seems like this is what I am working on did you verify the platformio build path as well or just cmake? I am using platformio where is no
|
Arh I missed that! Make brings it in for building with 'make' and running the tests with 'make test'. I hadn't added the fake it repo to the platformio.ini! I will be able to look at that tomorrow in the meantime maybe try it ... lib_deps=https://github .... fakeit url ... |
thank you for the quick reply. |
No worries. I'll take another look tomorrow. I am curious to see what happens when the workflow runs now.... |
@nerdyscout Have another go at this - the trick here was that FakeIt produces several fakeit.hpp files in subdirectories so dependency resolution was doomed. That is now sorted. @FabioBatSilva this should now be there - as in, FakeIt being pulled in as a dependency handled within the make pipeline. This is currently set to 4.2.0 in the external/fakeit/CMakeLists.txt file and can be edited from there. There were 3 fixes for change to ArduinoFake to make it work but none of them are/were breaking |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @RobertByrnes 👍
Awesome work here,
Will tag this as a new major version
I don't feel it's complete until the FakeiIt version is no longer hard baked into the make file but this is a step 😀 |
@FabioBatSilva ok here goes again. This PR has edited the CMakeList.txt files to pull in FakeIt as a dependency - using latest currently 4.2.0.
In addition to this there are three supporting fixes:
A change from map to unordered_map in ArduinoFake which achieves the same result and avoids an ambiguous reference conflicting with the Arduino map function.
A change to the method setup and verification to use const char* instead of const char[]. This matches the actual method signature in the Arduino Print library for printing C-style strings (which are essentially const char*). Print class.
Use of a single pointer in test setup and assertions in the client class.
This would close #44