Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork137
Adding CI unit testing for ArduinoCore-API#122
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
102 commits Select commitHold shift + click to select a range
95a146f Initial minimal commit to compile a host-run test binary
aentinger1fcfa7f Adding test code for 'isHexadecimalDigit'
aentinger2efc193 Adding test code for 'isUpperCase'
aentingere35d969 Adding test code for 'isSpace'
aentinger7639c5c Adding test code for 'max'
aentinger3541f60 Adding test code for 'min'
aentinger5841c06 Adding test code for 'makeWord' and 'word'
aentingerda4b985 Adding test code for 'isPunct'
aentinger1c0027c Adding test code for 'isLowerCase'
aentinger09ce806 Adding test code for 'isDigit'
aentingerc616c58 Adding test code for 'isControl'
aentinger09d4c4c Adding test code for 'isWhitespace'
aentinger4749b49 Adding test code for 'RingbufferN::isFull'
aentinger0c2502b Fix: 'memset' requires including of 'string.h'
aentingered6bea5 Adding test code for 'RingbufferN::available'
aentinger33da3fd Separating tests for RingbufferN::available from RingBufferN::availab…
aentingerf4d76bd Adding test code for 'RingbufferN::clear'
aentinger208f455 Augment test for 'RingBufferN::isFull'
aentingerb8ae7a0 Fixing RingBufferN
aentinger7219305 Augment test for 'RingBufferN::store_char'
aentingerb7edc11 Adding test code for 'Ringbuffer::read_char'
aentinger9a14dd6 Fixing bugs when attempting to read from ringbuffer
aentinger2efb5d4 Adding test code for 'Ringbuffer::peek'
aentinger0520927 Cross-compiling 'String' which requires to provide implementions for …
aentinger81b202f Adding basic tests for 'Print::print'
aentinger2e88c2e Adding PrintMock object to be shared by multiple test modules
aentinger9c3efec Replacing PrintMock within test_print module with the one general ava…
aentinger369aad4 Adding basic tests for 'Print::getWriteError'
aentingerd1dda97 Adding basic tests for 'Print::clearWriteError'
aentinger3f868e7 Adding ests for all 'IPAddress' ctors
aentinger4f67378 Adding test code for 'IPAddress::fromString'
aentinger4574f2a Fixing IPAddress::fromString for '1.1.1.' as well as '...'
aentinger4540cf4 Adding test code for 'IPAddress::operator ==(...)'
aentinger9951941 Adding test code for 'IPAddress::operator !=(...)'
aentingere514ac5 Adding test code for 'IPAddress::operator =(...)'
aentinger19fdf41 Add workflow to run unit tests
per12345baa2db Adding test code for testing all the String::Ctors(...)
aentingerda48f24 Repairing itoa module as we'd have doubly defined functions since ito…
aentingerc760378 Adding test code for String::length
aentinger9bbd479 Fixing name of parameter of String::concat(unsigned char) to be consi…
aentingere77606b Adding test code for String::concat(...)
aentingerae57e3c Adding test code for String::toLowerCase/toUpperCase
aentinger8da1dcf Adding test code for String::trim
aentinger4e295b1 Adding test code for String::replace(...)
aentinger27cfc4e Only perform the strcpy if writeTo and readFrom are different from on…
aentingerb76e0af Adding test code for String::toInt()
aentingerfe61782 Adding test code for String::toFloat
aentingera46aef0 Adding test code for String::toDouble
aentinger153a1f1 Adding test code for String::remove(...)
aentinger8fd3148 Adding test code for String::indexOf(...)
aentinger2c77098 Adding test code for String::lastIndexOf(...)
aentinger560a67c Add test code for String::compareTo(...)
giulcioffi56d0de2 Add test code for String comparison functions
giulcioffi4673dd3 Add test for String character access Functions
giulcioffi5a05bb6 Add test code for String::String(unsigned char value, unsigned char b…
giulcioffi3965a74 Add test code for String::substring(...)
giulcioffib59d22c Add test code for String::String(const __FlashStringHelper)
giulcioffie83ce70 Add test code for String::concat(const __FlashStringHelper *)
giulcioffic3e155c Add test code for String operator +
giulcioffie4febf7 Add test code to complete coverage of String::replace(const String& f…
giulcioffi411e44a Fix implementation of String::replace(const String& find, const Strin…
giulcioffi1891605 Add new test code for 'find' len higher than 'replace' len
giulcioffi7592064 Use arduino/cpp-test-action in Unit Test CI workflow
per12343df9f93 Merge pull request #125 from per1234/ci-unit-test-workflow-update
aentingerdd4467c Adding test code for print(long/unsigned long/long long/unsigned long…
aentingerd616d12 Adding test code for print(double, int = 2)
aentinger4bcdd13 When a negative parameter is fed for the number of digits then defaul…
aentinger23ef4ce Adding test code for print(Printable)
aentinger5bd28b7 Adding test code for Common::map
aentingere1c65ce Providing test code for IPAddress::printTo(...)
aentinger5d4e194 Adding test code for IPAddress::operator()
aentinger724015b Adding test code for all those Print::println(...) variants
aentingerb87d192 Adding test code for Print::print/println(const String &)
aentingercbd8350 Adding test code for Print::print/println(const char [])
aentingerc4a6cc7 Adding test code for Print::print/println(unsigned char, int)
aentinger4bd4018 Adding test code for Print::availableForWrite
aentinger4bdadc9 Adding missing but relevant REQUIRE statement
aentingerf2dcfc4 Adding test code for Print::print/println(const __FlashStringHelper *)
aentingerb6a55a8 Adding StreamMock class to test functions of Stream base class as wel…
aentinger09541b3 Disable 'int atexit(void (*func)()) __attribute__((weak));' for host …
aentinger4f5332d Compiling 'Stream.cpp' for which it's necessary to provide a fake mil…
aentinger716c324 Renaming module 'millis' to 'MillisFake' to better reflect the actual…
aentingerff7e4a6 Adding test code for Stream::readString
aentingerabee6d1 Fixing a couple of issues within StreamMock so that it's now fully fu…
aentingerfbe1cd0 Augmenting the MillisFake module with an automatic mode where real sy…
aentinger7182f67 Adding test code for Stream::readStringUntil(...)
aentinger08a44c9 Adding test code for Stream::find(...)
aentingera7e0931 Adding test code for Stream::findUntil(...)
aentinger52ddc44 Addding test code for Stream::parseInt(...)
aentinger5c7276a Adding test code for Stream::parseFloat(...)
aentingerda7100c Reworking parseInt test code
aentinger2c1feec Adding test code for Stream::readBytes(...)
aentinger3af6c3c Adding test code for Stream::readBytesUntil()
aentinger1cf220b Add test case for String::compareTo() with empty buffer
giulcioffi73550eb Add test cases for String::toInt() and String::toDouble() with invali…
giulcioffid2c8b2e Add test code for & String::operator[]
giulcioffi6d9db81 Test String(const __FlashStringHelper) constructor() with invalid buffer
giulcioffidb294c0 Add test code for String(String &&) and String(StringSumHelper &&)
giulcioffi1dd2db6 Add test code for String::operator =
giulcioffi760e397 Add test code that implies move(String &rhs) from larger to smaller b…
giulcioffi0b454b7 Add readme badges for Unit Tests workflow and Codecov
per1234c4a350a Merge pull request #126 from per1234/badge
aentingerFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
45 changes: 45 additions & 0 deletions.github/workflows/unit-tests.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| name: Unit Tests | ||
| on: | ||
| pull_request: | ||
| # Only run workflow if a file in these paths are modified | ||
| paths: | ||
| - ".github/workflows/unit-tests.yml" | ||
| - "test/**" | ||
| - "api/**" | ||
| push: | ||
| paths: | ||
| - ".github/workflows/unit-tests.yml" | ||
| - "test/**" | ||
| - "api/**" | ||
| jobs: | ||
| test: | ||
| name: Run unit tests | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| COVERAGE_DATA_PATH: extras/coverage-data/coverage.info | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v2 | ||
| # See: https://github.com/arduino/cpp-test-action/blob/main/README.md | ||
| - uses: arduino/cpp-test-action@main | ||
| with: | ||
| source-path: test | ||
| build-path: test/build | ||
| runtime-path: test/build/bin/test-ArduinoCore-API | ||
| coverage-exclude-paths: | | ||
| - '*/test/*' | ||
| - '/usr/*' | ||
| coverage-data-path: ${{ env.COVERAGE_DATA_PATH }} | ||
| # See: https://github.com/codecov/codecov-action/blob/master/README.md | ||
| - name: Upload coverage report to Codecov | ||
| uses: codecov/codecov-action@v1 | ||
| with: | ||
| file: ${{ env.COVERAGE_DATA_PATH }} | ||
| fail_ci_if_error: true |
3 changes: 3 additions & 0 deletionsREADME.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletionsapi/Common.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
14 changes: 11 additions & 3 deletionsapi/IPAddress.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletionapi/Print.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletionapi/Print.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
30 changes: 13 additions & 17 deletionsapi/RingBuffer.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
21 changes: 13 additions & 8 deletionsapi/String.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletionapi/String.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletionstest/.gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| build |
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.