forked fromdotnet/fsharp
- Notifications
You must be signed in to change notification settings - Fork0
Commitef4388f
Implement Option.filter
commit ad10115bde4458e5e5b93323ceee96d9bc3831c6Author: latkin <latkin@microsoft.com>Date: Thu Oct 16 18:50:40 2014 -0700 Updating surface area tests, refactoring unit tests to account for older nunit version used internally at msftcommit 3ad70068a9186c837f136268b92199e6b3bc8fb5Merge: 9f6c1a9 b913a52Author: latkin <latkin@microsoft.com>Date: Thu Oct 16 18:25:14 2014 -0700 Merge branch 'option-filter' ofhttps://git01.codeplex.com/forks/ploeh/optionfilter into PRcommit b913a5281d8d125aadb27da8349e6ea52a877484Author: Mark Seemann <mark@ploeh.dk>Date: Wed Apr 16 08:45:26 2014 +0200 Added documentation about Option.filter.commit e937ddf1f1f13865dc1c58007dd92307f2f84855Author: Mark Seemann <mark@ploeh.dk>Date: Wed Apr 16 08:22:51 2014 +0200 Implemented Option.filter correctly, prompted by more tests.commit 55a942a58ad7f5709dc65d1c427e1c768879718eAuthor: Mark Seemann <mark@ploeh.dk>Date: Wed Apr 16 07:55:44 2014 +0200 Demonstrated that None as input into Option.filter produces None as output.commit efb1f5217689f1a1bfb798ef8918adc60efb4626Author: Mark Seemann <mark@ploeh.dk>Date: Wed Apr 16 07:38:19 2014 +0200 Invoked the predicate in order to return None when the predicate returns false. However, using the Devil's Advocate TDD technique, the implementation goes out of its way to do the wrong thing (passing Unchecked.defaultof<'T> instead of the input value), which demonstrates that more test cases are required.commit b08446a3248a69a6c00e0ce099d905ec82d42f62Author: Mark Seemann <mark@ploeh.dk>Date: Wed Apr 16 07:13:37 2014 +0200 Introduced the Option.filter function, although, using TDD, its implementation is currently degenerate, because too few tests have yet been thrown at it. More tests will follow in the next commits.commit da174094ec64d4f7e538df73125b2e706276ea37Author: Mark Seemann <mark@ploeh.dk>Date: Mon Apr 14 08:59:35 2014 +0200 Added a unit test file targeting the Option module. I looked through the entire code base, but couldn't find any unit tests covering the Option module (it's probably covered by either the Cambridge Suite or the Redmond Suite). I even tried to change the implementation of Option.isSome to always return false, to see if that would trigger any test errors, but it didn't. Currently, the Option unit test file doesn't do anything. This commit just adds the file.Refactoring unit tests to account for older nunit version used internally at msft1 parent929d85b commitef4388f
File tree
6 files changed
+112
-0
lines changed- src/fsharp
- FSharp.Core.Unittests
- FSharp.Core/Microsoft.FSharp.Core
- FSharp.Core
6 files changed
+112
-0
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| |||
Lines changed: 100 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2633 | 2633 | | |
2634 | 2634 | | |
2635 | 2635 | | |
| 2636 | + | |
2636 | 2637 | | |
2637 | 2638 | | |
2638 | 2639 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2617 | 2617 | | |
2618 | 2618 | | |
2619 | 2619 | | |
| 2620 | + | |
2620 | 2621 | | |
2621 | 2622 | | |
2622 | 2623 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
97 | 103 | | |
98 | 104 | | |
99 | 105 | | |
| |||
0 commit comments
Comments
(0)