Skip to content

Commit

Permalink
Add property-based tests for all regular collections functions
Browse files Browse the repository at this point in the history
closes #502

commit 764b21d3d1449bf50c70429805e906f51c22ba49
Author: latkin <latkin@microsoft.com>
Date:   Mon Aug 10 14:20:16 2015 -0700

    Refactor build authoring so that portable profiles work

commit a6fa06157e4a58779f03c999ea53df49bbac7e7f
Author: latkin <latkin@microsoft.com>
Date:   Mon Aug 10 13:19:46 2015 -0700

    Remove strong-naming for core unit tests

commit 1ac38fdf59a4ca52a28f21e78ad781003b91d273
Author: latkin <latkin@microsoft.com>
Date:   Fri Aug 7 17:27:38 2015 -0700

    Make property test location and namespace consistent with existing tests

commit 7c5d8ec14c6521913177ba0d89080329566db906
Author: latkin <latkin@microsoft.com>
Date:   Fri Aug 7 16:53:57 2015 -0700

    All conditional compilation in project file

commit ba0ef70
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Sun Jul 19 10:41:11 2015 +0200

    Exclude property-based tests from portable47

commit 8c83c8f
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Sat Jul 18 10:40:31 2015 +0200

    Integrate PropertyTests into Unittests

commit 1b49c26
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Sat Jul 18 10:32:37 2015 +0200

    Use latest FsCheck

commit da09cec
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 16:26:55 2015 +0200

    zip3 and unzip3 are dual

commit 1eccbb9
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 16:23:58 2015 +0200

    zip and unzip are dua

commit a5d635f
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 16:23:38 2015 +0200

    zip can be reversed with unzip

commit ec7ba49
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 16:20:32 2015 +0200

    unzip3 is consistent

commit ce62949
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 16:15:46 2015 +0200

    unzip is consistent

commit c1dc059
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 16:12:37 2015 +0200

    splitAt is reversable with append

commit e23a20d
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 15:59:11 2015 +0200

    splitAt is consistent

commit 90944a4
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 15:53:01 2015 +0200

    partition can be used to sort

commit ab69c26
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 15:49:32 2015 +0200

    partition is consistent

commit 60743fc
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 12:47:00 2015 +0200

    two zips can be used for zip3

commit 82d9c6a
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 12:34:54 2015 +0200

    zip3 is consistent for collections with equal length

commit 3661147
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 12:33:05 2015 +0200

    zip is consistent for collections with equal length

commit 76a41d4
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 12:30:41 2015 +0200

    windowed returns succeeding elements

commit a916251
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 12:22:49 2015 +0200

    windowed returns list with correct length

commit 0f46604
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 12:22:40 2015 +0200

    windowed 2 is like pairwise

commit ce4c1e8
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 11:33:46 2015 +0200

    windowed is consistent

commit feb1378
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 11:30:31 2015 +0200

    filter and where work similar

commit 0e465b2
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 11:28:36 2015 +0200

    where is consistent

commit 92c9712
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 10:40:26 2015 +0200

    unfold is consistent

commit 2718571
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 10:22:50 2015 +0200

    tryPick is safe pick

commit ad34b89
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 10:21:33 2015 +0200

    tryPick is consistent

commit 077f4da
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 10:19:53 2015 +0200

    tryLast is safe last

commit a772da0
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 10:18:35 2015 +0200

    tryItem is safe item

commit aa0edff
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 10:14:30 2015 +0200

    tryHead and tail gives the list

commit 64a5fe9
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 10:11:59 2015 +0200

    tryLast is consistent

commit ee5e3eb
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 10:10:57 2015 +0200

    tryItem is consistent

commit 8476b22
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 10:09:47 2015 +0200

    tryHead is consistent

commit 38b6406
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 10:04:54 2015 +0200

    tryFindIndexBack and tryIndexFind work in reverse

commit 675252d
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 10:02:17 2015 +0200

    tryFindBack and tryFind work in reverse

commit 25c9101
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 10:00:03 2015 +0200

    tryFindIndexBack is consistent

commit ef5e21f
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 09:59:19 2015 +0200

    tryFindIndex is consistent

commit d40c85f
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 09:57:12 2015 +0200

    tryFindBack is consistent

commit 73c59c7
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jul 2 09:55:28 2015 +0200

    tryFind is consistent

commit 52d47d6
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 18:47:04 2015 +0200

    truncate and take work similar

commit 2d6ca4a
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 18:42:33 2015 +0200

    fix takeWhile test

commit 97d8d1c
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 18:41:41 2015 +0200

    truncate is consistent

commit c90f968
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 18:37:58 2015 +0200

    skipWhile and takeWhile gives the list

commit 07e9de1
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 18:34:32 2015 +0200

    skip and take gives the list

commit daea077
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 18:28:45 2015 +0200

    takeWhile is consistent

commit e86f3bb
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 18:26:40 2015 +0200

    take is consistent

commit 98195e2
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 18:21:41 2015 +0200

    head and tail gives the list

commit aef989b
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 18:17:45 2015 +0200

    tail is consistent

commit 31d0a84
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 17:27:27 2015 +0200

    List.sumBy calculates the sum of the mapped list

commit 90747e5
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 17:23:57 2015 +0200

    sumBy is consistent

commit f16d2bf
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 17:11:52 2015 +0200

    List.sum calculates the sum

commit d6eff49
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 17:08:56 2015 +0200

    sum is consistent

commit e35e196
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 17:06:20 2015 +0200

    sortByDescending actually sorts (but is inconsistent in regards of stability)

commit dbd9a4a
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 17:03:17 2015 +0200

    sortWith actually sorts (but is inconsistent in regards of stability)

commit aa04413
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 16:21:17 2015 +0200

    sortBy actually sorts (but is inconsistent in regards of stability)

commit 3c9e689
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 16:10:22 2015 +0200

    Seq.sortWithStable is stable

commit 2149c2d
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 16:09:40 2015 +0200

    List.sortWithStable is stable

commit 18b5788
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 15:53:56 2015 +0200

    skip and skipWhile are consistent

commit 47fd381
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 15:38:54 2015 +0200

    skipWhile is consistent

commit 90f2dcc
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 15:36:09 2015 +0200

    skip is consistent

commit df9ac49
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 15:30:18 2015 +0200

    singleton can be used to replicate

commit aadc028
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 15:27:51 2015 +0200

    singleton is consistent

commit d2de8a4
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 15:26:10 2015 +0200

    scanBack works like foldBack but returns intermediate values

commit a379e73
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 15:21:54 2015 +0200

    scanBack is consistent

commit b43109f
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 15:18:35 2015 +0200

    scan works like fold but returns intermediate values

commit add03c7
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 15:09:17 2015 +0200

    scan is consistent

commit 5adfd14
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 14:05:38 2015 +0200

    rev reverses a list

commit b8574d3
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 13:59:48 2015 +0200

    rev is consistent

commit 0656124
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 12:48:42 2015 +0200

    replicate creates n instances of the given element

commit 578a2a4
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 12:44:21 2015 +0200

    replicate is consistent

commit 7b86792
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 12:37:10 2015 +0200

    reduceBack works like foldBack with given seed

commit 389a34e
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 12:34:47 2015 +0200

    reduce works like fold with given seed

commit 4ffa6e3
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 12:19:33 2015 +0200

    reduceBack is consistent

commit 0301181
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 12:18:17 2015 +0200

    reduce is consistent

commit defeca2
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 12:14:43 2015 +0200

    pick works like find

commit 3af2b4e
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 12:08:30 2015 +0200

    pick works like choose + head

commit 6f8ef82
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 23 12:05:01 2015 +0200

    pick is consistent

commit 752318b
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Mon Jun 22 15:07:11 2015 +0200

    Update to FSCheck 2.0.1

commit 0f7e06b
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Mon Jun 22 09:04:11 2015 +0200

    use right method in test

commit 68198d2
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Sun Jun 21 13:22:18 2015 +0200

    permute works as expected

commit 188238d
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Fri Jun 19 20:38:35 2015 +0200

    permute is consistent

commit a530cc5
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Fri Jun 19 20:35:31 2015 +0200

    pairwise works as expected

commit 44828ab
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Fri Jun 19 20:24:14 2015 +0200

    pairwise is consistent

commit 29313fb
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Fri Jun 19 20:21:14 2015 +0200

    minBy id is same as min

commit 35860ba
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Fri Jun 19 20:18:55 2015 +0200

    minBy is opposite of maxBy

commit 5b91e1a
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Fri Jun 19 20:16:49 2015 +0200

    minBy is consistent

commit 3975155
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Fri Jun 19 20:15:07 2015 +0200

    maxBy is consistent

commit 819d3d0
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Fri Jun 19 20:12:53 2015 +0200

    head element after sort is min element

commit 4c97a1c
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Fri Jun 19 20:08:58 2015 +0200

    min is opposite of max

commit 68fe509
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Fri Jun 19 20:02:19 2015 +0200

    min is consistent

commit 58cbd87
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Fri Jun 19 20:00:42 2015 +0200

    max is consistent

commit 88aa02e
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Fri Jun 19 19:55:21 2015 +0200

    mapi2 looks at every element exactly once and in order - consistenly over all collections when size is equal

commit 579d6de
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Fri Jun 19 19:51:16 2015 +0200

    mapi behaves like map with correct order

commit d0188f8
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Fri Jun 19 19:47:17 2015 +0200

    mapi is consistent

commit 036ee9d
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Fri Jun 19 18:01:17 2015 +0200

    mapFoldBack works like map + foldBack

commit e212a3b
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Fri Jun 19 17:55:43 2015 +0200

    mapFoldBack is consistent

commit c86c175
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Fri Jun 19 17:50:25 2015 +0200

    mapFold works like map + fold

commit b7780de
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Fri Jun 19 17:42:12 2015 +0200

    mapFold is consistent

commit 2673074
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jun 18 18:07:47 2015 +0200

    map3 looks at every element exactly once and in order - consistenly over all collections when size is equal

commit f5b0022
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jun 18 17:51:12 2015 +0200

    map2 looks at every element exactly once and in order - consistenly over all collections when size is equal

commit d276384
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jun 18 17:45:20 2015 +0200

    map is consistent

commit ed72789
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jun 18 17:41:59 2015 +0200

    length is consistent

commit 7735e2c
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jun 18 17:36:15 2015 +0200

    head is the same as item 0

commit 6587027
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jun 18 17:33:34 2015 +0200

    head is the same as last of a reversed list

commit 6beb247
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jun 18 17:30:03 2015 +0200

    last is consistent

commit a2aeab2
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jun 18 17:26:34 2015 +0200

    iteri2 looks at every element exactly once and in order - consistenly over all collections when size is equal

commit 40dc013
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jun 18 17:24:24 2015 +0200

    iteri looks at every element exactly once and in order - consistenly over all collections

commit bfdc74e
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jun 18 17:20:50 2015 +0200

    iter2 looks at every element exactly once and in order - consistenly over all collections when size is equal

commit af9ef84
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jun 18 17:14:20 2015 +0200

    iter looks at every element exactly once and in order - consistenly over all collections

commit 14abd70
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jun 18 17:06:23 2015 +0200

    list isEmpty if and only if length is 0

commit 6020bea
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jun 18 17:03:01 2015 +0200

    head fails when list isEmpty

commit 33c8ac3
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Thu Jun 18 17:01:00 2015 +0200

    isEmpty is consistent

commit d3cf7b5
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 22:20:53 2015 +0200

    init is consistent

commit ed8382f
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 22:17:24 2015 +0200

    head is consistent

commit 83a4a4f
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 22:09:29 2015 +0200

    groupBy is consistent

commit a8870da
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 22:04:19 2015 +0200

    forall2 is consistent for collections with equal length

commit c1f56f2
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 22:02:16 2015 +0200

    exists and forall are dual

commit ab9f2a7
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 21:57:34 2015 +0200

    forall is consistent

commit c0e8525
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 15:28:31 2015 +0200

    foldBack2 is consistent

commit 51968ea
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 15:24:57 2015 +0200

    fold2 is consistent

commit f1d06d4
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 15:17:40 2015 +0200

    item is consistent - if we disregard errors for now

commit 28015e0
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 15:01:55 2015 +0200

    indexed is adding correct indexes

commit 7f1900f
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 14:57:11 2015 +0200

    indexed is consistent

commit ee0fc02
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 14:54:34 2015 +0200

    foldBack is consistent

commit aa2cf1f
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 14:52:19 2015 +0200

    fold is consistent

commit 9cc2749
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 14:45:45 2015 +0200

    sort and sortDescending work in reverse

commit 8124099
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 14:43:48 2015 +0200

    sortDescending is consistent

commit a9bc063
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 14:41:20 2015 +0200

    findIndexBack and findIndex work in reverse

commit ae080f7
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 14:29:28 2015 +0200

    findIndexBack is consistent

commit bed8875
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 14:28:27 2015 +0200

    findIndex is consistent

commit ff49e7a
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 14:15:27 2015 +0200

    findBack and find work in reverse

commit 75727b7
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 14:11:23 2015 +0200

    findBack is consistent

commit 73dd273
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 14:09:20 2015 +0200

    find and exists work similar

commit 655d7e4
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 14:05:39 2015 +0200

    find is consistent

commit d464261
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 14:01:22 2015 +0200

    filter and except work similar

commit 82291c5
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 13:52:36 2015 +0200

    filter is consistent

commit 3d002fa
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 13:23:29 2015 +0200

    exists2 is consistent for collections with equal length

commit 453bcd5
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 13:01:06 2015 +0200

    exists is consistent

commit 350a7c1
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 12:13:04 2015 +0200

    splitInto produces chunks exactly `count` chunks with equal size (+/- 1)

commit 6ae9f88
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 11:53:26 2015 +0200

    except is consistent

commit 3ff3adc
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 11:53:19 2015 +0200

    chunkBySize produces chunks exactly of size `chunkSize`, except the last one, which can be smaller, but not empty

commit 381ac7a
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 10:54:10 2015 +0200

    exactlyOne is consistent

commit 368d48e
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 10:39:59 2015 +0200

    splitInto is reversable with collect

commit 1e62b19
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 10:38:14 2015 +0200

    splitInto is consistent

commit f436007
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 10:35:42 2015 +0200

    distinctBy is consistent

commit a0a6778
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 10:34:08 2015 +0200

    distinct is consistent

commit 7733d87
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 10:24:12 2015 +0200

    distinctBy is stable

commit b30abef
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 10:17:24 2015 +0200

    distinct creates same elements like a set

commit 698cd81
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 10:07:01 2015 +0200

    chunkBySize is reversable with collect

commit e6ef276
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Wed Jun 17 10:02:33 2015 +0200

    fix sortby test

commit fe05438
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 16 22:28:34 2015 +0200

    chunkBySize revealed bug - references #501

commit 6d27acf
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 16 21:22:43 2015 +0200

    averageBy is consistent

commit e9e91e5
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 16 21:00:57 2015 +0200

    average is consistent

commit 528d209
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 16 20:31:22 2015 +0200

    sort is consistent

commit 7d76a0e
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 16 20:24:08 2015 +0200

    Only keep interesting tests

commit a7b2072
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 16 20:12:49 2015 +0200

    Refactor property tests

commit 6c0ee01
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Tue Jun 16 19:58:44 2015 +0200

    Extract isStable property

commit 369e07f
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Sat Apr 18 19:21:36 2015 +0200

    Move sort vs. sortBy id test into the List baseline test module

commit 662618c
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Sat Apr 18 19:16:50 2015 +0200

    Array sort is not stable. This is expected

commit f7dd128
Author: Tomasz Heimowski <tomasz.heimowski@outlook.com>
Date:   Sat Apr 18 16:30:00 2015 +0200

    uncomment list properties

commit fe65ee4
Author: Tomasz Heimowski <tomasz.heimowski@outlook.com>
Date:   Sat Apr 18 16:27:10 2015 +0200

    separate test for collection moduls

commit d7290d6
Author: Tomasz Heimowski <tomasz.heimowski@outlook.com>
Date:   Sat Apr 18 16:18:36 2015 +0200

    extract seperate modules in property tests project

commit 4959d05
Author: Tomasz Heimowski <tomasz.heimowski@outlook.com>
Date:   Sat Apr 18 16:14:01 2015 +0200

    add ListProperties.fs to project

commit c2839f5
Author: Tomasz Heimowski <tomasz.heimowski@outlook.com>
Date:   Sat Apr 18 16:05:24 2015 +0200

    properties for stability

commit 856534b
Author: Tomasz Heimowski <tomasz.heimowski@outlook.com>
Date:   Sat Apr 18 15:52:33 2015 +0200

    some properties for list module; consistency collections properties

commit 9b32176
Author: Steffen Forkmann <steffen.forkmann@msu-solutions.de>
Date:   Sun Apr 12 11:36:28 2015 +0200

    Add FsCheck project
  • Loading branch information
forki authored and latkin committed Aug 10, 2015
1 parent e980c65 commit d99ceb1
Show file tree
Hide file tree
Showing 11 changed files with 2,216 additions and 23 deletions.
3 changes: 2 additions & 1 deletion packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="2.6.4" targetFramework="net40" />
<package id="NUnit.Runners" version="2.6.4" />
<package id="FsCheck" version="2.0.3" />
</packages>
34 changes: 22 additions & 12 deletions src/FSharpSource.targets
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<IsPortableProfile Condition="'$(TargetFramework)' == 'portable47' or '$(TargetFramework)' == 'portable7' or '$(TargetFramework)' == 'portable78' or '$(TargetFramework)' == 'portable259'">true</IsPortableProfile>
<FSCoreVersion Condition="'$(TargetFramework)' != 'net20' and $(IsPortableProfile) != 'true'">4.4.0.9055</FSCoreVersion>
<FSCoreVersion Condition="'$(TargetFramework)' == 'net20'">2.4.0.9055</FSCoreVersion>
<FSCoreVersion Condition="'$(TargetFramework)' == 'portable7'">3.7.4.9055</FSCoreVersion>
<FSCoreVersion Condition="'$(TargetFramework)' == 'portable47'">3.47.4.9055</FSCoreVersion>
<FSCoreVersion Condition="'$(TargetFramework)' == 'portable78'">3.78.4.9055</FSCoreVersion>
<FSCoreVersion Condition="'$(TargetFramework)' == 'portable259'">3.259.4.9055</FSCoreVersion>
</PropertyGroup>
<Choose>
<When Condition="'$(Configuration)' == 'Debug' or '$(Configuration)' == 'Release' or '$(Configuration)' == 'VSDebug' or '$(Configuration)' == 'VSRelease' ">
<Choose>
<When Condition="'$(ProjectLanguage)' == 'FSharp'">
<Choose>
<When Condition="'$(AssemblyName)' == 'FSharp.Core'">
<PropertyGroup Condition="'$(TargetFramework)' == 'portable47' or '$(TargetFramework)' == 'portable7' or '$(TargetFramework)' == 'portable78' or '$(TargetFramework)' == 'portable259'">
<IsPortableProfile>true</IsPortableProfile>
</PropertyGroup>
<PropertyGroup>
<OtherFlags Condition="'$(TargetFramework)' != 'net20' and $(IsPortableProfile) != 'true'">$(OtherFlags) --version:4.4.0.9055</OtherFlags>
<OtherFlags Condition="'$(TargetFramework)' == 'net20'">$(OtherFlags) --version:2.4.0.9055</OtherFlags>
<OtherFlags Condition="'$(TargetFramework)' == 'portable7'">$(OtherFlags) --version:3.7.4.9055</OtherFlags>
<OtherFlags Condition="'$(TargetFramework)' == 'portable47'">$(OtherFlags) --version:3.47.4.9055</OtherFlags>
<OtherFlags Condition="'$(TargetFramework)' == 'portable78'">$(OtherFlags) --version:3.78.4.9055</OtherFlags>
<OtherFlags Condition="'$(TargetFramework)' == 'portable259'">$(OtherFlags) --version:3.259.4.9055</OtherFlags>
<PropertyGroup>
<OtherFlags>$(OtherFlags) --version:$(FSCoreVersion)</OtherFlags>
<OtherFlags>$(OtherFlags) --delaysign+ --keyfile:"$(FSharpSourcesRoot)\fsharp\msft.pubkey"</OtherFlags>
<DefineConstants>STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY;$(DefineConstants)</DefineConstants>
<StrongNames>true</StrongNames>
Expand All @@ -29,6 +30,12 @@
<StrongNames>true</StrongNames>
</PropertyGroup>
</When>
<!-- do not strong-name the runtime unit tests, as they have non-strong-named dependencies -->
<When Condition="'$(AssemblyName)' == 'FSharp.Core.Unittests'">
<PropertyGroup>
<OtherFlags>$(OtherFlags) --version:4.4.0.9055</OtherFlags>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup Condition="'$(SIGN_WITH_MSFT_KEY)' == 'true'">
<OtherFlags>$(OtherFlags) --version:4.4.0.9055 --delaysign+ --keyfile:"$(FSharpSourcesRoot)\fsharp\msft.pubkey"</OtherFlags>
Expand Down Expand Up @@ -101,7 +108,10 @@
<NUnitVersion>2.6.4</NUnitVersion>
<NUnitFullVersion>2.6.4.14350</NUnitFullVersion>
<NUnitLibDir>$(FSharpSourcesRoot)\..\packages\NUnit.$(NUnitVersion)\lib\</NUnitLibDir>
<NunitToolsLibDir>$(FSharpSourcesRoot)\..\packages\NUnit.Runners.$(NUnitVersion)\tools\lib\</NunitToolsLibDir>
<NUnitToolsLibDir>$(FSharpSourcesRoot)\..\packages\NUnit.Runners.$(NUnitVersion)\tools\lib\</NUnitToolsLibDir>
<FsCheckVersion>2.0.3</FsCheckVersion>
<FsCheckFullVersion>2.0.3.0</FsCheckFullVersion>
<FsCheckLibDir>$(FSharpSourcesRoot)\..\packages\FsCheck.$(FsCheckVersion)\lib\</FsCheckLibDir>
</PropertyGroup>

<!-- v2.0-specific flags -->
Expand Down Expand Up @@ -729,7 +739,7 @@
Outputs="@(CustomCopyLocal->'$(OutDir)%(TargetFilename)')"
Condition="'$(targetCLIDir)'!='Silverlight/4.0/'"
>
<Exec Command="$(FSharpSourcesRoot)\fsharp\FSharp.Build\subst.exe &quot;%(CustomCopyLocal.FullPath)&quot; {VisualStudioVersion} $(VisualStudioVersion) {FinalDir} &quot;$([System.IO.Path]::GetFullPath('$(OutputPath)'))\&quot; {LkgVersion} $(LkgVersion) {BuildSuffix} &quot;$(FsBuildSuffix)&quot; {FSharpTargetsDir} &quot;%24(MSBuildThisFileDirectory)&quot; &gt; $(OutDir)%(CustomCopyLocal.TargetFilename) "/>
<Exec Command="$(FSharpSourcesRoot)\fsharp\FSharp.Build\subst.exe &quot;%(CustomCopyLocal.FullPath)&quot; {VisualStudioVersion} $(VisualStudioVersion) {FinalDir} &quot;$([System.IO.Path]::GetFullPath('$(OutputPath)'))\&quot; {LkgVersion} $(LkgVersion) {BuildSuffix} &quot;$(FsBuildSuffix)&quot; {FSharpTargetsDir} &quot;%24(MSBuildThisFileDirectory)&quot; {FSCoreVersion} &quot;$(FSCoreVersion)&quot; &gt; $(OutDir)%(CustomCopyLocal.TargetFilename) "/>
<!-- Make sure it will get cleaned -->
<CreateItem Include="$(OutDir)%(CustomCopyLocal.TargetFilename)">
<Output TaskParameter="Include" ItemName="FileWrites"/>
Expand Down
12 changes: 12 additions & 0 deletions src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.dll.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="2.0.0.0-4.4.0.0" newVersion="{FSCoreVersion}"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
28 changes: 22 additions & 6 deletions src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
Expand Down Expand Up @@ -44,10 +44,18 @@
</PropertyGroup>
<ItemGroup>
<!-- need full name and SpecificVersion = true in order to convince msbuild to allow this reference when targeting portable47 -->
<Reference Include="nunit.framework, Version=$(NUnitFullVersion), Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" Condition="'$(TargetFramework)' != 'sl5' AND '$(TargetFramework)' != 'sl3-wp'" >
<SpecificVersion>true</SpecificVersion>
<Private>True</Private>
<HintPath>$(NUnitLibDir)\nunit.framework.dll</HintPath>
<Reference Include="nunit.framework, Version=$(NUnitFullVersion), Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" Condition="'$(TargetFramework)' != 'sl5' AND '$(TargetFramework)' != 'sl3-wp'">
<SpecificVersion>true</SpecificVersion>
<Private>True</Private>
<HintPath>$(NUnitLibDir)\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="FsCheck, Version=$(FsCheckFullVersion)" Condition="'$(TargetFramework)' != 'portable47' AND '$(TargetFramework)' != 'net20'">
<SpecificVersion>true</SpecificVersion>
<Private>True</Private>
<HintPath Condition="'$(TargetFramework)' == 'net40'">$(FsCheckLibDir)\net45\FsCheck.dll</HintPath>
<HintPath Condition="'$(TargetFramework)' == 'portable7'">$(FsCheckLibDir)\portable-net45+netcore45\FsCheck.dll</HintPath>
<HintPath Condition="'$(TargetFramework)' == 'portable78'">$(FsCheckLibDir)\portable-net45+netcore45+wp8\FsCheck.dll</HintPath>
<HintPath Condition="'$(TargetFramework)' == 'portable259'">$(FsCheckLibDir)\portable-net45+netcore45+wpa81+wp8\FsCheck.dll</HintPath>
</Reference>
<Reference Include="NUnitFramework" Condition="'$(TargetFramework)' == 'sl5' OR '$(TargetFramework)' == 'sl3-wp'" />
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Core\FSharp.Core.fsproj">
Expand All @@ -65,24 +73,29 @@
</ItemGroup>
<ItemGroup>
<Compile Include="LibraryTestFx.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\Utils.fs" Condition="'$(TargetFramework)' != 'portable47' AND '$(TargetFramework)' != 'net20'" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ArrayModule.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ArrayModule2.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\Array2Module.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\Array3Module.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\Array4Module.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ArrayProperties.fs" Condition="'$(TargetFramework)' != 'portable47' AND '$(TargetFramework)' != 'net20'" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ComparisonIdentityModule.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\HashIdentityModule.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ListModule.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ListModule2.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ObsoleteListFunctions.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ListType.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ListProperties.fs" Condition="'$(TargetFramework)' != 'portable47' AND '$(TargetFramework)' != 'net20'" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\MapModule.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\MapType.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\SetModule.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\SetType.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\SeqModule.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\SeqModule2.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ObsoleteSeqFunctions.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\SeqProperties.fs" Condition="'$(TargetFramework)' != 'portable47' AND '$(TargetFramework)' != 'net20'" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\CollectionModulesConsistency.fs" Condition="'$(TargetFramework)' != 'portable47' AND '$(TargetFramework)' != 'net20'" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\StringModule.fs" />
<Compile Include="FSharp.Core\PrimTypes.fs" />
<Compile Include="FSharp.Core\DiscrimantedUnionType.fs" />
Expand All @@ -104,6 +117,9 @@
<Compile Include="TypeForwarding.fs" />
<Compile Include="NUnitFrameworkShims.fs" Condition="'$(TargetFramework)' == 'sl3-wp'" />
<Compile Include="SurfaceArea.$(TargetFramework).fs" />
</ItemGroup>
<CustomCopyLocal Include="FSharp.Core.Unittests.dll.config">
<TargetFilename>FSharp.Core.Unittests.dll.config</TargetFilename>
</CustomCopyLocal>
</ItemGroup>
<Import Project="$(FSharpSourcesRoot)\FSharpSource.targets" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

module FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections.ArrayProperties

open System
open System.Collections.Generic
open NUnit.Framework
open FsCheck

let isStable sorted = sorted |> Seq.pairwise |> Seq.forall (fun ((ia, a),(ib, b)) -> if a = b then ia < ib else true)

let distinctByStable<'a when 'a : comparison> (xs : 'a []) =
let indexed = xs |> Seq.indexed |> Seq.toArray
let sorted = indexed |> Array.distinctBy snd
isStable sorted

[<Test>]
let ``Seq.distinctBy is stable`` () =
Check.QuickThrowOnFailure distinctByStable<int>
Check.QuickThrowOnFailure distinctByStable<string>
Loading

0 comments on commit d99ceb1

Please sign in to comment.