-
Notifications
You must be signed in to change notification settings - Fork 33
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
Refactor Serial mock away from a singleton #23
Comments
I just don't know that Serial class could be multiple instances. (I am a user of Uno and Pro Micro.) |
Sure that exists on arduino so our mock should support it. Further for me, I have a bunch of Serial tools that Im testing. I have All of these I need to be able to spy 2 serial at the same time. On Wed, Feb 11, 2015 at 1:04 AM, IKEUCHI Yasuki [email protected]
|
I may understand that Serial should not be a singleton. If you don't mind, could you give me a sample using multiple Serial instances? Or could you create patches for Serial Mock? |
Hrm. Been playing around for a day or so. I dont necessarily need it not to be a singleton. For Serial1, Serial2 etc can just duplicate the class. I do need it to be a proper Stream class though so it can be passed to things that take Serial... Still trying things. |
Yeah, I read your implementation for TapStream. I understood that it should not be Singleton. |
* add test setup * Transform static variable into class property * Add a define to disable #warnings * add unit tests for encoders * tests: Add documentation Co-authored-by: stla <[email protected]>
I have need with several of my libraries to spy on 2 serial at at time, and Arduino has software serial and 2 hardware serial on many boards now.
Is there a reason Serial mock is a singleton?
The text was updated successfully, but these errors were encountered: