-
Notifications
You must be signed in to change notification settings - Fork 34
Create a more complete CI environment in a Docker image #238
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
Merged
ianfixes
merged 16 commits into
Arduino-CI:master
from
ianfixes:2020-12-08_toward_containers
Dec 28, 2020
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
c6f4d73
Enable custom installation scripts during CI
ianfixes 4b4e6dd
fix typo
ianfixes 041dcb4
Allow testing from a subdirectory during CI testing
ianfixes 1b4e744
Fix directory name and library name comparison
ianfixes 2a180a8
Remove comparison table in README
ianfixes 894a78f
Add pointer to github marketplace
ianfixes ba7e6e8
update README to point to Blink as an example project
ianfixes dfa834f
Be more careful about ruby version and syntax
ianfixes 75a391e
Fix esp32 board manager URL
ianfixes 6ed0e88
fix 'invalid byte sequence in UTF-8' on Windows
ianfixes 31ed252
Note the necessity of python dependencies for Espressif boards
ianfixes 4e0b9eb
remove requirement that types be totally ordered in order to evaluate…
ianfixes a5e648b
Add float comparison operators
ianfixes efbb8ae
assertComparativeEqual -> assertComparativeEquivalent
ianfixes 47e294a
Reconcile equality for strings and equivalence for float infinity
ianfixes 6a16d27
Harden and document Wire mocks
ianfixes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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,31 @@ | ||
#include <ArduinoUnitTests.h> | ||
|
||
|
||
#pragma once | ||
|
||
|
||
|
||
unittest(check_that_assertion_error_messages_are_comprehensible) | ||
{ | ||
assertEqual(1, 2); | ||
assertNotEqual(2, 2); | ||
assertComparativeEquivalent(1, 2); | ||
assertComparativeNotEquivalent(2, 2); | ||
assertLess(2, 1); | ||
assertMore(1, 2); | ||
assertLessOrEqual(2, 1); | ||
assertMoreOrEqual(1, 2); | ||
assertTrue(false); | ||
assertFalse(true); | ||
assertNull(3); | ||
assertNotNull(NULL); | ||
|
||
assertEqualFloat(1.2, 1.0, 0.01); | ||
assertNotEqualFloat(1.0, 1.02, 0.1); | ||
assertInfinity(42); | ||
assertNotInfinity(INFINITY); | ||
assertNAN(42); | ||
assertNotNAN(0.0/0.0); | ||
} | ||
|
||
unittest_main() |
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,57 @@ | ||
#include <ArduinoUnitTests.h> | ||
#include "../do-something.h" | ||
|
||
class NonOrderedType { | ||
public: | ||
int x; // ehh why not | ||
NonOrderedType(int some_x) : x(some_x) {} | ||
|
||
bool operator==(const NonOrderedType &that) const { | ||
return that.x == x; | ||
} | ||
|
||
bool operator!=(const NonOrderedType &that) const { | ||
return that.x != x; | ||
} | ||
}; | ||
inline std::ostream& operator << ( std::ostream& out, const NonOrderedType& n ) { | ||
out << "NonOrderedType(" << n.x << ")"; | ||
return out; | ||
} | ||
|
||
|
||
unittest(assert_equal_without_total_ordering) | ||
{ | ||
NonOrderedType a(3); | ||
NonOrderedType b(3); | ||
NonOrderedType c(4); | ||
|
||
assertEqual(a, b); | ||
assertEqual(a, a); | ||
assertNotEqual(a, c); | ||
|
||
} | ||
|
||
unittest(float_assertions) | ||
{ | ||
assertEqualFloat(1.0, 1.02, 0.1); | ||
assertNotEqualFloat(1.2, 1.0, 0.01); | ||
|
||
assertInfinity(exp(800)); | ||
assertInfinity(1.0/0.0); | ||
assertNotInfinity(42); | ||
|
||
assertNAN(INFINITY - INFINITY); | ||
assertNAN(0.0/0.0); | ||
assertNotNAN(42); | ||
|
||
assertComparativeEquivalent(exp(800), INFINITY); | ||
assertComparativeEquivalent(0.0/0.0, INFINITY - INFINITY); | ||
assertComparativeNotEquivalent(INFINITY, -INFINITY); | ||
|
||
assertLess(0, INFINITY); | ||
assertLess(-INFINITY, 0); | ||
assertLess(-INFINITY, INFINITY); | ||
} | ||
|
||
unittest_main() |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.