Comments (3)
No, you have to mock the functions you are calling..
The intention of this lib is to provide a way to mock the arduino and run tests outside of an arduino microcontroller..
maybe some work needs to be done on the docs to make that more clear.
but this is not a actual implementation, you wont be able o run the native program..
only via pio test
from arduinofake.
maybe some work needs to be done on the docs to make that more clear.
yea… so… how do I do it?
I want to test a function that uses Serial.print()
. I have #include <ArduinoFake.h>
at the beginning of the test file. What's next?
from arduinofake.
Mock the calls..
Will be something similar to this one.. but using Serial
from arduinofake.
Related Issues (20)
- Some issues when using String type
- Delay is causing crash HOT 2
- What licence? HOT 1
- missing `map` header file HOT 1
- how to handle arduino core libraries from other platforms? HOT 1
- Unit testing Wire.h with UNO build HOT 2
- Any intention to support an EEPROM 'fake' HOT 6
- How to build this project? HOT 3
- Upgrade the `fakeit` lib? HOT 1
- Warnings after upgrading from 0.3.1 to 0.4.0
- How do I compile this project with CMake?
- How to inherit from Stream (`what(): Unknown instance`)
- When including Lib, test throws "Program errored with 3221225785 code"
- About Serial.print() and Serial1.print() in ESP32 projects HOT 1
- Running mocks on device HOT 2
- aunit compatibility
- constructor required for `unordered_map`? HOT 7
- Failing to 'fakeit::UnexpectedMethodCallException'
- Unable to mock 'when(!Serial)`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduinofake.