-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
73 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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 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 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,24 @@ | ||
namespace FSharpPlus.Tests | ||
|
||
open FSharpPlus | ||
open FSharpPlus.Data | ||
open NUnit.Framework | ||
|
||
#if TEST_TRACE | ||
open FSharpPlus.Internals | ||
#endif | ||
|
||
module Collections = | ||
|
||
[<Test>] | ||
let chunkBy () = | ||
#if TEST_TRACE | ||
Traces.reset() | ||
#endif | ||
let source = [1; 2; 3; 5; 7; 9] | ||
let expected = [(1, [1]); (0, [2]); (1, [3; 5; 7; 9])] | ||
let actual = chunkBy (flip (%) 2) source | ||
CollectionAssert.AreEqual(expected, actual) | ||
#if TEST_TRACE | ||
CollectionAssert.AreEqual (["ChunkBy, list<'T>"], Traces.get()) | ||
#endif |
This file contains 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 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