-
Notifications
You must be signed in to change notification settings - Fork 25
Updated Stream tests #321
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
Updated Stream tests #321
Conversation
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.
Pull request overview
Updates the Stream stdlib tests to use the shared Testing framework and reorganizes how they’re loaded/executed in the stdlib test suite.
Changes:
- Replaced the old
stdlib0007_Stream.framassertions-based test file with a newtest/stdlib/Stream.framusingtestSuite/testCase. - Updated
test/stdlib/TestAll.framto import the Stream test module.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| test/stdlib/stdlib0007_Stream.fram | Removed legacy Stream tests written as standalone assert expressions. |
| test/stdlib/TestAll.fram | Adds an import for the Stream test module (affects which tests run in the aggregated session). |
| test/stdlib/Stream.fram | New Stream test module using the Testing framework (testSuite/testCase). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
test/stdlib/Stream.fram
Outdated
| (Stream.foldRight1Err {~onError = fn _ => 42} | ||
| (fn (x : Int) y => x + y) (Stream.fromList [1, 2, 3, 4])) | ||
| 10); | ||
|
|
||
| testCase "empty" (fn _ => | ||
| assertEq | ||
| (Stream.foldRight1Err {~onError = fn _ => 42} |
Copilot
AI
Feb 7, 2026
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.
Inside the foldRight1Err suite, let ~onError () = 42 in is introduced but the subsequent calls still pass an explicit {~onError = fn _ => 42}. This makes the local ~onError binding unused and duplicates the same handler literal. Either remove the local ~onError binding, or use it in the foldRight1Err calls for consistency.
| (Stream.foldRight1Err {~onError = fn _ => 42} | |
| (fn (x : Int) y => x + y) (Stream.fromList [1, 2, 3, 4])) | |
| 10); | |
| testCase "empty" (fn _ => | |
| assertEq | |
| (Stream.foldRight1Err {~onError = fn _ => 42} | |
| (Stream.foldRight1Err {~onError} | |
| (fn (x : Int) y => x + y) (Stream.fromList [1, 2, 3, 4])) | |
| 10); | |
| testCase "empty" (fn _ => | |
| assertEq | |
| (Stream.foldRight1Err {~onError} |
No description provided.