-
Notifications
You must be signed in to change notification settings - Fork 51
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
2.3.0 release #73
Comments
Compiling using v2.3.0-alpha tag, on ESP8266, I get:
I changed Flash.h to be:
Recompiling, I then get:
I'm curious, did you try compiling this for the ESP8266? Maybe you forgot, but you don't actually need to have an ESP8266 microcontroller to compile. Just add the ESP8266 support using the Board Manager in the Arduino IDE, as described here: |
The cause of the dreaded You can see how I solved this problem in AUnit/Test.h, by pulling out the constructor so that it's no longer inlined, then making sure that it's in a function context, by placing the |
Ok, no, I did not think of that. It also broke everything. I reduced F() to AVR only (the esp's have lots of ram in any case), and fiddled away. It now compiles on the targets. ... Now can you try to run the firmware on an esp and see if it passes? Just follow the menu when it boots... |
Sorry -- please pull the latest from #iss73 branch. |
Looks like iss73 branch works on ESP8266. The numbers I get are (flash/static) in bytes:
Am I correct in assuming that you don't actually have an ESP8266? If you intend to support this microcontroller in ArduinoUnit, it might be worth getting a couple of them because the testing cycle will be a lot faster if you ran the tests yourself. They are cheap as heck (e.g. $13.99 for 2 on Amazon) for one that uses the CP2102 usb-serial chip. |
Correct. It isn't a matter of price, but of choosing what to support. Thanks for running it. |
I bumped to 2.3.1-alpha due to number of changes... |
Ok the latest of this branch has the following quite useful new features:
|
I noticed this little remark in the release notes for v2.3.2-alpha:
I couldn't find a feature request issue for this, so I'll comment here: Did you consider following the syntax used by Google Test, so that people who are familiar that framework don't have to remember a new syntax?
|
There are good reasons. The au version builds a lambda function which is only invoked if output is necessary. The only way I can think to make the google version work is to format all the data every time and send that data to a null stream if not needed. Assuming most tests silently pass, the google (and junit version, btw) is roughly infinitely more expensive. |
This re-work just removed a bunch of code - Compare is now small and does not have to be automatically generated. Same features; less filling! |
Ok, just added mocking with proper licensing that allows for arduino unit testing on dev (vs target) system; look at "en vitro" in |
Great work on the cleanup. Just having a simpler Compare.h is worth it, the old version was basically unreadable and unmaintainable. With regards to the streaming expression inside the the I haven't followed all of your recent changes, there's been so many. But I did notice a bug that carries over to the new version, so I'll open up a ticket for that. I wanted to wait until things settled down before bring it up. Again, nice work on the new version. |
How can google test not evaluate << expensive() with that notation? (I agree is does not print out the value, but expensive needs to be calculated and discarded each time, no?)
[and formatting almost always is far more expensive than testing]
|
Ok. I'm beginning to see the light here. It would be tricky to get it into the footnote [ ] notation as currently advertised. But I see how GoogleTest might pull that off without evaluating expensive every time. |
I assume that we're both looking at this fragment in gtest_pred_impl.h:
If I understand Google Test correctly, their implementation has two disadvantages compared to ArduinoUnit:
I actually prefer ArduinoUnit's implementation. I've found the success messages very helpful for debugging complex, custom assertion methods. And the early return seems far cleaner to me, and again supports custom assertion methods better (well, at least in AUnit where I've taken advantage of it :-)). |
Ok v3.0 is now released! |
There have been some long-standing feature requests; mostly support for ESP 8266 and ESP 32 boards, and a nagging problem with duplicate strings in FLASH. This version DROPS some old compiler support features, and adds ESP 8266, ESP 32, and flash string duplication, along with some refactoring to shrink the footprint of the testing env.
It is in alpha - please try it and report issues. v2.3.0-alpha
The text was updated successfully, but these errors were encountered: