-
-
Notifications
You must be signed in to change notification settings - Fork 100
Automated Resyntax fixes #714
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
3cc93d1
Fix 1 occurrence of `cond-let-to-cond-define`
resyntax-ci[bot] b3be073
Fix 2 occurrences of `provide/contract-to-contract-out`
resyntax-ci[bot] 2de1c08
Fix 10 occurrences of `let-to-define`
resyntax-ci[bot] 042f6c4
Fix 2 occurrences of `if-else-false-to-and`
resyntax-ci[bot] ec35c55
Fix 1 occurrence of `cond-else-cond-to-cond`
resyntax-ci[bot] e970f8b
Fix 2 occurrences of `when-expression-in-for-loop-to-when-keyword`
resyntax-ci[bot] 7eef6c1
Fix 1 occurrence of `send-chain-to-send+`
resyntax-ci[bot] 24b6900
Fix 1 occurrence of `make-temporary-directory-migration`
resyntax-ci[bot] 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1047,15 +1047,15 @@ This produces an ACK message | |
| (define snip | ||
| (queue-callback/res | ||
| (lambda () | ||
| (let* ([start (send ints-text paragraph-start-position 2)] | ||
| ;; since the fraction is supposed to be one char wide, we just | ||
| ;; select one char, so that, if the regular number prints out, | ||
| ;; this test will fail. | ||
| [end (+ start 1)]) | ||
| (send ints-text split-snip start) | ||
| (send ints-text split-snip end) | ||
| (define snip (send ints-text find-snip start 'after)) | ||
| (and snip (send snip copy)))))) | ||
| (define start (send ints-text paragraph-start-position 2)) | ||
| ;; since the fraction is supposed to be one char wide, we just | ||
| ;; select one char, so that, if the regular number prints out, | ||
| ;; this test will fail. | ||
| (define end (+ start 1)) | ||
| (send ints-text split-snip start) | ||
| (send ints-text split-snip end) | ||
| (define snip (send ints-text find-snip start 'after)) | ||
| (and snip (send snip copy))))) | ||
| (clear-definitions drr-frame) | ||
| (type-in-definitions drr-frame "(+ ") | ||
| (queue-callback/res | ||
|
|
@@ -1318,16 +1318,16 @@ This produces an ACK message | |
| (wait-for-drr-frame-computation) | ||
|
|
||
| (for-each test:keystroke (string->list "x")) | ||
| (let ([start (+ 1 (queue-callback/res (λ () (send ints-text last-position))))]) | ||
| (test:keystroke #\return) | ||
| (wait-for-drr-frame-computation) | ||
| (let* ([end (- (get-int-pos) 1)] | ||
| [output (fetch-output drr-frame start end)] | ||
| [expected #rx"x:.*cannot reference an identifier before its definition"]) | ||
| (unless (regexp-match expected output) | ||
| (failure) | ||
| (eprintf "callcc-test: expected something matching ~s, got ~s\n" expected output))))) | ||
| (define start (+ 1 (queue-callback/res (λ () (send ints-text last-position))))) | ||
| (test:keystroke #\return) | ||
| (wait-for-drr-frame-computation) | ||
|
|
||
| (define end (- (get-int-pos) 1)) | ||
| (define output (fetch-output drr-frame start end)) | ||
| (define expected #rx"x:.*cannot reference an identifier before its definition") | ||
| (unless (regexp-match expected output) | ||
| (failure) | ||
| (eprintf "callcc-test: expected something matching ~s, got ~s\n" expected output))) | ||
|
|
||
| (define (random-seed-test) | ||
| (define expression | ||
|
|
@@ -1338,57 +1338,55 @@ This produces an ACK message | |
| (wait-for-drr-frame-computation) | ||
|
|
||
| (insert-in-interactions drr-frame expression) | ||
| (let ([start1 (+ 1 (queue-callback/res (λ () (send ints-text last-position))))]) | ||
| (test:keystroke #\return) | ||
| (wait-for-drr-frame-computation) | ||
| (let ([output1 (fetch-output drr-frame start1 (- (get-int-pos) 1))]) | ||
| (insert-in-interactions drr-frame expression) | ||
| (let ([start2 (+ 1 (queue-callback/res (λ () (send ints-text last-position))))]) | ||
| (test:keystroke #\return) | ||
| (wait-for-drr-frame-computation) | ||
| (let ([output2 (fetch-output drr-frame start2 (- (get-int-pos) 1))]) | ||
| (unless (equal? output1 output2) | ||
| (failure) | ||
| (eprintf "random-seed-test: expected\n ~s\nand\n ~s\nto be the same" | ||
| output1 | ||
| output2))))))) | ||
| (define start1 (+ 1 (queue-callback/res (λ () (send ints-text last-position))))) | ||
| (test:keystroke #\return) | ||
| (wait-for-drr-frame-computation) | ||
| (define output1 (fetch-output drr-frame start1 (- (get-int-pos) 1))) | ||
| (insert-in-interactions drr-frame expression) | ||
| (define start2 (+ 1 (queue-callback/res (λ () (send ints-text last-position))))) | ||
| (test:keystroke #\return) | ||
| (wait-for-drr-frame-computation) | ||
| (define output2 (fetch-output drr-frame start2 (- (get-int-pos) 1))) | ||
| (unless (equal? output1 output2) | ||
| (failure) | ||
| (eprintf "random-seed-test: expected\n ~s\nand\n ~s\nto be the same" output1 output2))) | ||
|
|
||
| (define (top-interaction-test) | ||
| (clear-definitions drr-frame) | ||
| (do-execute drr-frame) | ||
| (wait-for-drr-frame-computation) | ||
| (let ([ints-just-after-welcome (queue-callback/res (λ () (+ 1 (send ints-text last-position))))]) | ||
|
|
||
| (type-in-definitions | ||
| drr-frame | ||
| "(define-syntax #%top-interaction (syntax-rules () [(_ . e) 'e]))\n(+ 1 2)\n") | ||
| (test:menu-select "File" "Save Definitions") | ||
|
|
||
| (clear-definitions drr-frame) | ||
| (do-execute drr-frame) | ||
| (queue-callback/res (λ () (+ 1 (send ints-text last-position)))) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wow, this can just go away! |
||
|
|
||
| (type-in-definitions | ||
| drr-frame | ||
| "(define-syntax #%top-interaction (syntax-rules () [(_ . e) 'e]))\n(+ 1 2)\n") | ||
| (test:menu-select "File" "Save Definitions") | ||
|
|
||
| (clear-definitions drr-frame) | ||
| (do-execute drr-frame) | ||
| (wait-for-drr-frame-computation) | ||
|
|
||
| (for-each test:keystroke (string->list (format "(load ~s)" tmp-load-short-filename))) | ||
| (let ([start (+ 1 (queue-callback/res (λ () (send ints-text last-position))))]) | ||
| (test:keystroke #\return) | ||
| (wait-for-drr-frame-computation) | ||
|
|
||
| (for-each test:keystroke (string->list (format "(load ~s)" tmp-load-short-filename))) | ||
| (let ([start (+ 1 (queue-callback/res (λ () (send ints-text last-position))))]) | ||
| (test:keystroke #\return) | ||
| (wait-for-drr-frame-computation) | ||
| (let* ([end (- (get-int-pos) 1)] | ||
| [output (fetch-output drr-frame start end)] | ||
| [expected "(+ 1 2)"]) | ||
| (unless (equal? output expected) | ||
| (error 'top-interaction-test "expected.1 ~s, got ~s" expected output)) | ||
| (next-test))) | ||
|
|
||
| (for-each test:keystroke (string->list "(+ 4 5)")) | ||
| (let ([start (+ 1 (queue-callback/res (λ () (send ints-text last-position))))]) | ||
| (test:keystroke #\return) | ||
| (wait-for-drr-frame-computation) | ||
| (let* ([end (- (get-int-pos) 1)] | ||
| [output (fetch-output drr-frame start end)] | ||
| [expected "(+ 4 5)"]) | ||
| (unless (equal? output expected) | ||
| (error 'top-interaction-test "expected.2 ~s, got ~s" expected output)) | ||
| (next-test))))) | ||
| (let* ([end (- (get-int-pos) 1)] | ||
| [output (fetch-output drr-frame start end)] | ||
| [expected "(+ 1 2)"]) | ||
| (unless (equal? output expected) | ||
| (error 'top-interaction-test "expected.1 ~s, got ~s" expected output)) | ||
| (next-test))) | ||
|
|
||
| (for-each test:keystroke (string->list "(+ 4 5)")) | ||
| (define start (+ 1 (queue-callback/res (λ () (send ints-text last-position))))) | ||
| (test:keystroke #\return) | ||
| (wait-for-drr-frame-computation) | ||
| (define end (- (get-int-pos) 1)) | ||
| (define output (fetch-output drr-frame start end)) | ||
| (define expected "(+ 4 5)") | ||
| (unless (equal? output expected) | ||
| (error 'top-interaction-test "expected.2 ~s, got ~s" expected output)) | ||
| (next-test)) | ||
|
|
||
| (when (file-exists? tmp-load-filename) | ||
| (delete-file tmp-load-filename)) | ||
|
|
||
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.
How come this
letdidn't go away?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.
We have been asking this a lot. I think one thing that would help is for the PR description to indicate if there's any limitation reached. If so, we wouldn't need to ask anymore if it's Resyntax's fault or not when some issues are not fixed.
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.
That sounds like a great idea.