-
Notifications
You must be signed in to change notification settings - Fork 22
Add compare_file_screenshot(); Add AppDriver$expect_screenshot(compare=)
#231
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
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
55335f6
Add `compare_file_screenshot()`
schloerke 7350fc5
`devtools::document()` (GitHub Actions)
schloerke 4cc7f9b
`usethis::use_cpp11()`
schloerke 902ebea
Image diffs init
schloerke de35b47
self cleanup
schloerke b748750
Merge remote-tracking branch 'origin/compare_file_screenshot' into cp…
schloerke ff62080
Update code in R fn to be much smaller. Also using `rowSums`
schloerke a42776b
Commit before gutting code to always return the max value
schloerke c1f3af7
Always return max value when comparing screenshots. Makes threshold c…
schloerke d8e3552
Update `compare` method for `app$expect_screenshot()` to use `compare…
schloerke b88eebb
Merge branch 'main' into cpp11_all_the_things
schloerke 2a0bbfa
fix local checks
schloerke 4b5b250
Update docs and examples; Add support for `quiet = FALSE`
schloerke 268a594
Try fixing build error on ubuntu
schloerke 62a379a
Add missing packages for cpp code
schloerke 5d834c6
Update code.cpp
schloerke 262d4c9
Merge branch 'main' into cpp11_all_the_things
schloerke c6bd411
Merge branch 'main' into cpp11_all_the_things
schloerke b2da265
Update R-CMD-check.yaml
schloerke 2bd6270
`devtools::document()` (GitHub Actions)
schloerke c8f4fb4
Do not access un-initialized values in cpp matrix. Reduce which matri…
schloerke e169595
Update docs
schloerke a4ed5f8
Rearrange NEWS and add sub headings
schloerke 96b91b0
Update snapshots
schloerke 26b5c1a
Update NEWS.md
schloerke 2b08cc9
Update docs; Set default `compare` method to `missing_arg()`
schloerke 75584be
Fix bad link
schloerke 955ea4e
Merge branch 'main' into cpp11_all_the_things
schloerke aa1a6cc
Merge branch 'main' into cpp11_all_the_things
schloerke 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| { | ||
| "configurations": [ | ||
| { | ||
| "name": "Mac", | ||
| "includePath": [ | ||
| "${workspaceFolder}/**", | ||
| "/Library/Frameworks/R.framework/Resources/include", | ||
| "/Library/Frameworks/R.framework/Versions/Current/Resources/library/cpp11/include" | ||
| ], | ||
| "defines": [], | ||
| "macFrameworkPath": [ | ||
| "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks" | ||
| ], | ||
| "compilerPath": "/usr/bin/clang", | ||
| "cStandard": "c99", | ||
| "cppStandard": "c++11", | ||
| "intelliSenseMode": "macos-clang-x64" | ||
| } | ||
| ], | ||
| "version": 4 | ||
| } |
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,5 @@ | ||
| { | ||
| "files.associations": { | ||
| "vector": "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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For future reference, here's another possibility for the API.
We could remove the
thresholdandkernel_sizeparams from this function, and the default value forcomparewould be:And then if people want to use the fuzzy comparison, they would do something like:
The benefit is that it's a more general API, and provides a cleaner interface for plugging in other comparison functions. However, it seems unlikely anyone would ever use this capability, and it requires people to know about the
fuzzy_comparerfunction.