Skip to content

Conversation

@wojpok
Copy link
Collaborator

@wojpok wojpok commented Feb 7, 2026

No description provided.

Copy link

Copilot AI left a 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.fram assertions-based test file with a new test/stdlib/Stream.fram using testSuite/testCase.
  • Updated test/stdlib/TestAll.fram to 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.

Comment on lines 88 to 94
(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}
Copy link

Copilot AI Feb 7, 2026

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.

Suggested change
(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}

Copilot uses AI. Check for mistakes.
@ppolesiuk ppolesiuk merged commit 2c293c3 into fram-lang:master Feb 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants