Skip to content

Commit d99ceb1

Browse files
forkilatkin
authored andcommitted
Add property-based tests for all regular collections functions
closes dotnet/fsharp#502 commit 764b21d3d1449bf50c70429805e906f51c22ba49 Author: latkin <[email protected]> Date: Mon Aug 10 14:20:16 2015 -0700 Refactor build authoring so that portable profiles work commit a6fa06157e4a58779f03c999ea53df49bbac7e7f Author: latkin <[email protected]> Date: Mon Aug 10 13:19:46 2015 -0700 Remove strong-naming for core unit tests commit 1ac38fdf59a4ca52a28f21e78ad781003b91d273 Author: latkin <[email protected]> Date: Fri Aug 7 17:27:38 2015 -0700 Make property test location and namespace consistent with existing tests commit 7c5d8ec14c6521913177ba0d89080329566db906 Author: latkin <[email protected]> Date: Fri Aug 7 16:53:57 2015 -0700 All conditional compilation in project file commit ba0ef70200976036182ed1f395c1a3ca356b6667 Author: Steffen Forkmann <[email protected]> Date: Sun Jul 19 10:41:11 2015 +0200 Exclude property-based tests from portable47 commit 8c83c8fd57683077f1227dcbebc307adbd7269bc Author: Steffen Forkmann <[email protected]> Date: Sat Jul 18 10:40:31 2015 +0200 Integrate PropertyTests into Unittests commit 1b49c265daa33e3b3c8d423ace44667f087f8e2a Author: Steffen Forkmann <[email protected]> Date: Sat Jul 18 10:32:37 2015 +0200 Use latest FsCheck commit da09ceca40429f0d58cdeaea29708ff96f250a41 Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 16:26:55 2015 +0200 zip3 and unzip3 are dual commit 1eccbb9f0c4989a604282c824160edd6454fe8e5 Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 16:23:58 2015 +0200 zip and unzip are dua commit a5d635f00d92bdb245f69aee164245f1a8d96c61 Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 16:23:38 2015 +0200 zip can be reversed with unzip commit ec7ba49eec9fafefa2ef832d7eae0eb7739859b4 Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 16:20:32 2015 +0200 unzip3 is consistent commit ce62949cf0746c8cc2cf6cabe49531d0d4660b65 Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 16:15:46 2015 +0200 unzip is consistent commit c1dc0594a80038ba3d3688ce90361a7ddac1c583 Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 16:12:37 2015 +0200 splitAt is reversable with append commit e23a20deb114db734fa0b5250f8d3bddb3af3d1c Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 15:59:11 2015 +0200 splitAt is consistent commit 90944a4177a6a4b1468d639eb91795c8dfaf07a8 Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 15:53:01 2015 +0200 partition can be used to sort commit ab69c2605a7c1fcbceaac517bb80fb4c6dc4a1ac Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 15:49:32 2015 +0200 partition is consistent commit 60743fc55ac5750e6930e68ac6d32059082f4cee Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 12:47:00 2015 +0200 two zips can be used for zip3 commit 82d9c6aed953ef3ec5a42b860af2c766a0fccd98 Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 12:34:54 2015 +0200 zip3 is consistent for collections with equal length commit 36611476fdfb5898d296a4bc10c8534b18241043 Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 12:33:05 2015 +0200 zip is consistent for collections with equal length commit 76a41d4b298a3b7791c55c78f3723700a07ab4d6 Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 12:30:41 2015 +0200 windowed returns succeeding elements commit a916251fb2de802e99cb0b4a05b66ed8bf53277a Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 12:22:49 2015 +0200 windowed returns list with correct length commit 0f46604fb1d8593612ca2d849e6e3989e1d06514 Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 12:22:40 2015 +0200 windowed 2 is like pairwise commit ce4c1e8530165abc3ad273018b04f849724a0ce2 Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 11:33:46 2015 +0200 windowed is consistent commit feb13784382ca56330d5a475adea226764496dc7 Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 11:30:31 2015 +0200 filter and where work similar commit 0e465b20c0bfa727598f6b9178a3701ea8914fe9 Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 11:28:36 2015 +0200 where is consistent commit 92c97120f63d8a62f122e905ecfd5babed7ca387 Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 10:40:26 2015 +0200 unfold is consistent commit 271857121ed68d10aecfdaa514cd6e465067a188 Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 10:22:50 2015 +0200 tryPick is safe pick commit ad34b8910bbc464506dfaf303eb82cc71dd0d3c0 Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 10:21:33 2015 +0200 tryPick is consistent commit 077f4da27704aec0bfcbd9c0fc8636fa130659ba Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 10:19:53 2015 +0200 tryLast is safe last commit a772da0c879e1e2cc8a7ff376c385d7092aa8e5c Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 10:18:35 2015 +0200 tryItem is safe item commit aa0edffbe77c1584296c0315e7bebe4c5e35c527 Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 10:14:30 2015 +0200 tryHead and tail gives the list commit 64a5fe96b7421448da476f3668966d812a6459bd Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 10:11:59 2015 +0200 tryLast is consistent commit ee5e3eb5a3657c335dc3ccaee0d891565398cc46 Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 10:10:57 2015 +0200 tryItem is consistent commit 8476b22890700dd7ce679b4c8b709fcddbf1f4f9 Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 10:09:47 2015 +0200 tryHead is consistent commit 38b64066f2a05c17a29f3d53bfb1fa1a7cb81cb7 Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 10:04:54 2015 +0200 tryFindIndexBack and tryIndexFind work in reverse commit 675252daf9b8016efb27baaeee29a617969c2df5 Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 10:02:17 2015 +0200 tryFindBack and tryFind work in reverse commit 25c91010902cbc3db61c45e075b611ece2a6d92a Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 10:00:03 2015 +0200 tryFindIndexBack is consistent commit ef5e21fe956d5b560968415c91ff93b23a73606e Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 09:59:19 2015 +0200 tryFindIndex is consistent commit d40c85f1d0e6cf9724717901c9b61115fdb118b9 Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 09:57:12 2015 +0200 tryFindBack is consistent commit 73c59c7d7296d015d66ea18d16c9d530634f2df9 Author: Steffen Forkmann <[email protected]> Date: Thu Jul 2 09:55:28 2015 +0200 tryFind is consistent commit 52d47d6dce8934cf38af7c240dd279cc53522e73 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 18:47:04 2015 +0200 truncate and take work similar commit 2d6ca4ad47229f15b9741d0e456ffa10e58bf496 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 18:42:33 2015 +0200 fix takeWhile test commit 97d8d1c9047aa3d39dff398fd2a5aabb3ea7a27a Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 18:41:41 2015 +0200 truncate is consistent commit c90f9682c6a67e88a88e7e5b8f2f11982b7e6b69 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 18:37:58 2015 +0200 skipWhile and takeWhile gives the list commit 07e9de1ea6c5e046fac2cf26b306aa9de1fd038c Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 18:34:32 2015 +0200 skip and take gives the list commit daea07746414e07313c7d8083ac217a534fd483e Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 18:28:45 2015 +0200 takeWhile is consistent commit e86f3bb1798f579cdbefa704cf499c324c36686a Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 18:26:40 2015 +0200 take is consistent commit 98195e268c116260dc751fda6c606f550eb59522 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 18:21:41 2015 +0200 head and tail gives the list commit aef989bba2846692779c38607126444d8e0ff090 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 18:17:45 2015 +0200 tail is consistent commit 31d0a84a67624260083e5437d999df3842850f4d Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 17:27:27 2015 +0200 List.sumBy calculates the sum of the mapped list commit 90747e5dbef9f5428cc721d65744dc38be72086f Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 17:23:57 2015 +0200 sumBy is consistent commit f16d2bf95d831c2a98250803d735636858b43d2c Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 17:11:52 2015 +0200 List.sum calculates the sum commit d6eff49af74165cf5ef8ceefbbfaf4731dbb4f48 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 17:08:56 2015 +0200 sum is consistent commit e35e19681326ba9d48a36cc7ee20ee9fdfb9925f Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 17:06:20 2015 +0200 sortByDescending actually sorts (but is inconsistent in regards of stability) commit dbd9a4a045de477d8136ab565564327f2774aa0e Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 17:03:17 2015 +0200 sortWith actually sorts (but is inconsistent in regards of stability) commit aa0441347d99579fe995f2df10716aeb5f7e2711 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 16:21:17 2015 +0200 sortBy actually sorts (but is inconsistent in regards of stability) commit 3c9e6895d1ebfea0a5c180a6388cdea8bb4f79b7 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 16:10:22 2015 +0200 Seq.sortWithStable is stable commit 2149c2d8844913cea528eec9df01a649d5068a89 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 16:09:40 2015 +0200 List.sortWithStable is stable commit 18b5788051bafb62b2e3b0f4347a566a6559b5b2 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 15:53:56 2015 +0200 skip and skipWhile are consistent commit 47fd3811cb39fa4f71c3a385e55a6daa9dbee3de Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 15:38:54 2015 +0200 skipWhile is consistent commit 90f2dcc6151e5694591d6c1415ad7e1487806d66 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 15:36:09 2015 +0200 skip is consistent commit df9ac49c7b2d2d6f20fa28ed57c279f9b26c6240 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 15:30:18 2015 +0200 singleton can be used to replicate commit aadc0280180128cae445466e533ba04b56bedef9 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 15:27:51 2015 +0200 singleton is consistent commit d2de8a44d49eeaea8dffb17649f08c420a2bf5fd Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 15:26:10 2015 +0200 scanBack works like foldBack but returns intermediate values commit a379e73aa581ff6fca1b72ee681fed2b84453ea7 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 15:21:54 2015 +0200 scanBack is consistent commit b43109f046edf2d76fd396e90b3ac996e2f81f0e Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 15:18:35 2015 +0200 scan works like fold but returns intermediate values commit add03c7b2813b26e84a569438bc6b3c368ff9af1 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 15:09:17 2015 +0200 scan is consistent commit 5adfd1491ecb53be0b707d478f25a6bbc6b857a5 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 14:05:38 2015 +0200 rev reverses a list commit b8574d379791edfd1087ba55a55abb758636cee6 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 13:59:48 2015 +0200 rev is consistent commit 065612455a5eb99317a9fca0c5ca882a2a6cfd09 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 12:48:42 2015 +0200 replicate creates n instances of the given element commit 578a2a45f843d49898ff16ce66b3109e21f701e1 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 12:44:21 2015 +0200 replicate is consistent commit 7b8679228330e1a9dd76f5643038cbd693cdf7f1 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 12:37:10 2015 +0200 reduceBack works like foldBack with given seed commit 389a34e43e000b5ae923795f547054e288a3b66d Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 12:34:47 2015 +0200 reduce works like fold with given seed commit 4ffa6e3f68d144dce273e4de7354e5fd2ce74538 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 12:19:33 2015 +0200 reduceBack is consistent commit 0301181712d8aed95f61bb712af1114e63b96ed6 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 12:18:17 2015 +0200 reduce is consistent commit defeca2f9dbebfb1c892731836678458680d6972 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 12:14:43 2015 +0200 pick works like find commit 3af2b4eaf96fc253422b35d273ca90815d02e7d6 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 12:08:30 2015 +0200 pick works like choose + head commit 6f8ef828e106595c829d8ec9389a86b404734280 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 23 12:05:01 2015 +0200 pick is consistent commit 752318baf672b718f55b93a711b46418886590ad Author: Steffen Forkmann <[email protected]> Date: Mon Jun 22 15:07:11 2015 +0200 Update to FSCheck 2.0.1 commit 0f7e06bbd5abb17e4c969c7aa637bbf3a73e9995 Author: Steffen Forkmann <[email protected]> Date: Mon Jun 22 09:04:11 2015 +0200 use right method in test commit 68198d2a697936011fed105d2d36cc497843403f Author: Steffen Forkmann <[email protected]> Date: Sun Jun 21 13:22:18 2015 +0200 permute works as expected commit 188238df394b283d9b33c0e6d0fde947596afe96 Author: Steffen Forkmann <[email protected]> Date: Fri Jun 19 20:38:35 2015 +0200 permute is consistent commit a530cc59ede3084b4d2876bb8743030afa6e227c Author: Steffen Forkmann <[email protected]> Date: Fri Jun 19 20:35:31 2015 +0200 pairwise works as expected commit 44828ab8352f1b89161b2ff6d3356984724823c3 Author: Steffen Forkmann <[email protected]> Date: Fri Jun 19 20:24:14 2015 +0200 pairwise is consistent commit 29313fbf99609eb971306684095624e2ec1d4d64 Author: Steffen Forkmann <[email protected]> Date: Fri Jun 19 20:21:14 2015 +0200 minBy id is same as min commit 35860ba72f04941ebc480fdccf9832e83875746b Author: Steffen Forkmann <[email protected]> Date: Fri Jun 19 20:18:55 2015 +0200 minBy is opposite of maxBy commit 5b91e1ae8915e07c4bfe0b7efa1fa867fea00380 Author: Steffen Forkmann <[email protected]> Date: Fri Jun 19 20:16:49 2015 +0200 minBy is consistent commit 3975155cd6d20d6e3fd5a2307c926a6605c9263e Author: Steffen Forkmann <[email protected]> Date: Fri Jun 19 20:15:07 2015 +0200 maxBy is consistent commit 819d3d0113ba2567825ec2b3a75ddcf8b0a74744 Author: Steffen Forkmann <[email protected]> Date: Fri Jun 19 20:12:53 2015 +0200 head element after sort is min element commit 4c97a1cb25d1ee666e7f40177a7a3ec3d2efdad1 Author: Steffen Forkmann <[email protected]> Date: Fri Jun 19 20:08:58 2015 +0200 min is opposite of max commit 68fe509abb9d5cee4d52f00f2e85d45b755b873f Author: Steffen Forkmann <[email protected]> Date: Fri Jun 19 20:02:19 2015 +0200 min is consistent commit 58cbd87eac69cb2e36a6dcd2c3cb910c6cd06a36 Author: Steffen Forkmann <[email protected]> Date: Fri Jun 19 20:00:42 2015 +0200 max is consistent commit 88aa02eeaddb1936e8d83e85bd95f2e6733d6c86 Author: Steffen Forkmann <[email protected]> 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 579d6de9f44e4c91278b3b95ab8c1ebfe61d8548 Author: Steffen Forkmann <[email protected]> Date: Fri Jun 19 19:51:16 2015 +0200 mapi behaves like map with correct order commit d0188f86011745cf8d352772cd48ecee8423f966 Author: Steffen Forkmann <[email protected]> Date: Fri Jun 19 19:47:17 2015 +0200 mapi is consistent commit 036ee9d0d2ad30b1c333d00ab274477b71f93da0 Author: Steffen Forkmann <[email protected]> Date: Fri Jun 19 18:01:17 2015 +0200 mapFoldBack works like map + foldBack commit e212a3bdb66f4e0ac35dc19396e706dd24454573 Author: Steffen Forkmann <[email protected]> Date: Fri Jun 19 17:55:43 2015 +0200 mapFoldBack is consistent commit c86c1759f1180aebbeedd2bf7e9a64c65c9360c3 Author: Steffen Forkmann <[email protected]> Date: Fri Jun 19 17:50:25 2015 +0200 mapFold works like map + fold commit b7780decd3920d3b2f2c3e6ffbd050f91a44694f Author: Steffen Forkmann <[email protected]> Date: Fri Jun 19 17:42:12 2015 +0200 mapFold is consistent commit 2673074f89745690473669ed20134495ba4f568e Author: Steffen Forkmann <[email protected]> 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 f5b0022f7005415eef480fc0243c3c693059430b Author: Steffen Forkmann <[email protected]> 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 d2763843f12d9cb9fe0e1febfe0bc21bdc1d0c39 Author: Steffen Forkmann <[email protected]> Date: Thu Jun 18 17:45:20 2015 +0200 map is consistent commit ed7278998e3bcb440b5a694d49213bbc4ebbaf9b Author: Steffen Forkmann <[email protected]> Date: Thu Jun 18 17:41:59 2015 +0200 length is consistent commit 7735e2cb0b3ebf44ceb8ad1bd205addf20124ec8 Author: Steffen Forkmann <[email protected]> Date: Thu Jun 18 17:36:15 2015 +0200 head is the same as item 0 commit 658702719f4a68fd3a08634586d31ba73c88daf0 Author: Steffen Forkmann <[email protected]> Date: Thu Jun 18 17:33:34 2015 +0200 head is the same as last of a reversed list commit 6beb2472aee0356b9ac6027272aeea7c5cc8ca65 Author: Steffen Forkmann <[email protected]> Date: Thu Jun 18 17:30:03 2015 +0200 last is consistent commit a2aeab2ca24a19143c080b15acb426e2e6143b71 Author: Steffen Forkmann <[email protected]> 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 40dc013a056ec43e199e1cc085a6f0f9394a4e94 Author: Steffen Forkmann <[email protected]> Date: Thu Jun 18 17:24:24 2015 +0200 iteri looks at every element exactly once and in order - consistenly over all collections commit bfdc74e2efa5c43ae199181b043406e5a3e85969 Author: Steffen Forkmann <[email protected]> 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 af9ef8412349fc7979c4c64bc638b0293b2bdd2e Author: Steffen Forkmann <[email protected]> Date: Thu Jun 18 17:14:20 2015 +0200 iter looks at every element exactly once and in order - consistenly over all collections commit 14abd709b9ba33d412ec8d17cac82d01c774484b Author: Steffen Forkmann <[email protected]> Date: Thu Jun 18 17:06:23 2015 +0200 list isEmpty if and only if length is 0 commit 6020bea19971c562bf9b2c4f59ada5ccf8869de1 Author: Steffen Forkmann <[email protected]> Date: Thu Jun 18 17:03:01 2015 +0200 head fails when list isEmpty commit 33c8ac3f91035f3c0e659e7f7b26dae3523af593 Author: Steffen Forkmann <[email protected]> Date: Thu Jun 18 17:01:00 2015 +0200 isEmpty is consistent commit d3cf7b50248cb86b5fa29c0c50079e054dcbafda Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 22:20:53 2015 +0200 init is consistent commit ed8382f4cf5a5247ae2b81b38b7888ef04ad4bf7 Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 22:17:24 2015 +0200 head is consistent commit 83a4a4fbe1f10dfef463b349cd29b9b53934edd5 Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 22:09:29 2015 +0200 groupBy is consistent commit a8870da6ac3b9cdb0ab928712814ff836c7fc47c Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 22:04:19 2015 +0200 forall2 is consistent for collections with equal length commit c1f56f2cf72d5bd080f5885cfee6905758aeec3a Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 22:02:16 2015 +0200 exists and forall are dual commit ab9f2a7aa60e2dbbd37351ef2ed898844da26cb7 Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 21:57:34 2015 +0200 forall is consistent commit c0e85254e0d243d974a78de7bcf3c9409a218cc6 Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 15:28:31 2015 +0200 foldBack2 is consistent commit 51968ea5027dce53ed7467bef4aeba355081031f Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 15:24:57 2015 +0200 fold2 is consistent commit f1d06d4c747339eeff0c2bb83911cb6c25fc167e Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 15:17:40 2015 +0200 item is consistent - if we disregard errors for now commit 28015e09a3a827bff6903db7b0886958e920a64e Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 15:01:55 2015 +0200 indexed is adding correct indexes commit 7f1900fb6b429b3efbde8f64f8b6404f34469ba8 Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 14:57:11 2015 +0200 indexed is consistent commit ee0fc022f07cc33d57364afeba0056e3fb4caaae Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 14:54:34 2015 +0200 foldBack is consistent commit aa2cf1f420e3974c1d51170afcb32e27ea52969e Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 14:52:19 2015 +0200 fold is consistent commit 9cc2749248216e63abfc6c7bc44f8b680962953a Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 14:45:45 2015 +0200 sort and sortDescending work in reverse commit 8124099c4f19fc7689dfe310c0470e88a2621218 Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 14:43:48 2015 +0200 sortDescending is consistent commit a9bc06383815b71be1d4ae983bd0d968de3b127f Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 14:41:20 2015 +0200 findIndexBack and findIndex work in reverse commit ae080f7a84471ea61053d044f249652a6e792132 Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 14:29:28 2015 +0200 findIndexBack is consistent commit bed887579ef5c5ce8f394d9ff5d7a978402892cf Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 14:28:27 2015 +0200 findIndex is consistent commit ff49e7a1fc374734f69eb3819595725c881fb27f Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 14:15:27 2015 +0200 findBack and find work in reverse commit 75727b7a8c5d1febac5c20dc4bebd142a0c4534a Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 14:11:23 2015 +0200 findBack is consistent commit 73dd2738cd1c4310c77d2fbd951a49560d710d7f Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 14:09:20 2015 +0200 find and exists work similar commit 655d7e4e5b4dae8a7c8136022a847c48be64ad66 Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 14:05:39 2015 +0200 find is consistent commit d46426187f1100c21e000e53bf7b94ad620f8db2 Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 14:01:22 2015 +0200 filter and except work similar commit 82291c5dfe8bbc7a51a3403e49e5104c3c19258c Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 13:52:36 2015 +0200 filter is consistent commit 3d002fad4344220b491ec0fa2b0922d9f5cda7fa Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 13:23:29 2015 +0200 exists2 is consistent for collections with equal length commit 453bcd5b4e5778362e603253a3b97f1d128c1ed6 Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 13:01:06 2015 +0200 exists is consistent commit 350a7c19394b36e9a3df588a5a93e26137018644 Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 12:13:04 2015 +0200 splitInto produces chunks exactly `count` chunks with equal size (+/- 1) commit 6ae9f88ef3ba4afc9e747fadff161913f8edcabc Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 11:53:26 2015 +0200 except is consistent commit 3ff3adc38bf295ed24cf8f7bdc1eb425fcc82f89 Author: Steffen Forkmann <[email protected]> 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 381ac7aa6974b8c41260e8824f6d765aecb15fd9 Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 10:54:10 2015 +0200 exactlyOne is consistent commit 368d48e4355f7c070017d4c1fa64675bcb9d0ffb Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 10:39:59 2015 +0200 splitInto is reversable with collect commit 1e62b197f56de9f308f25e78782f253974b66c8a Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 10:38:14 2015 +0200 splitInto is consistent commit f43600794acb193fa1bf0185dbd1e18e58562e36 Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 10:35:42 2015 +0200 distinctBy is consistent commit a0a6778c58e1d2c427c7934730de8c05b8f3a3ae Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 10:34:08 2015 +0200 distinct is consistent commit 7733d87793d152a8616ba92eae927d83f19f605b Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 10:24:12 2015 +0200 distinctBy is stable commit b30abef782ca0293476ce1b75433d22262d60332 Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 10:17:24 2015 +0200 distinct creates same elements like a set commit 698cd81d874e2904208a97912cd3094f43488113 Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 10:07:01 2015 +0200 chunkBySize is reversable with collect commit e6ef27687e9eb57139ee2adfe6fc38058ad02103 Author: Steffen Forkmann <[email protected]> Date: Wed Jun 17 10:02:33 2015 +0200 fix sortby test commit fe05438aab08830504edd700fa56d2cd9cdded86 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 16 22:28:34 2015 +0200 chunkBySize revealed bug - references #501 commit 6d27acf06eea8a7f2fd5c12962dcda2ec2463ea4 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 16 21:22:43 2015 +0200 averageBy is consistent commit e9e91e5ea5f736a02335ee76737b6984019fb118 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 16 21:00:57 2015 +0200 average is consistent commit 528d209faf2fbe1273766d5660919f31e7b5e2cb Author: Steffen Forkmann <[email protected]> Date: Tue Jun 16 20:31:22 2015 +0200 sort is consistent commit 7d76a0e82280e5458a2ac8f74e7fa3b71a44850c Author: Steffen Forkmann <[email protected]> Date: Tue Jun 16 20:24:08 2015 +0200 Only keep interesting tests commit a7b2072821e06e1b24f4af9c8974b2b83c321081 Author: Steffen Forkmann <[email protected]> Date: Tue Jun 16 20:12:49 2015 +0200 Refactor property tests commit 6c0ee0167924068170a757fc269260044e61508b Author: Steffen Forkmann <[email protected]> Date: Tue Jun 16 19:58:44 2015 +0200 Extract isStable property commit 369e07f4080988ebc6a99bc2bb9787836b08c623 Author: Steffen Forkmann <[email protected]> Date: Sat Apr 18 19:21:36 2015 +0200 Move sort vs. sortBy id test into the List baseline test module commit 662618cc97c4045305d7fd109f9d2842a0ff405b Author: Steffen Forkmann <[email protected]> Date: Sat Apr 18 19:16:50 2015 +0200 Array sort is not stable. This is expected commit f7dd12814cdc9fbcec450a97c0ad9855a903606e Author: Tomasz Heimowski <[email protected]> Date: Sat Apr 18 16:30:00 2015 +0200 uncomment list properties commit fe65ee4b5b2d62135a80c15555254ba01c36a7eb Author: Tomasz Heimowski <[email protected]> Date: Sat Apr 18 16:27:10 2015 +0200 separate test for collection moduls commit d7290d651f743ecd346f02e4a54379433a2bb6c7 Author: Tomasz Heimowski <[email protected]> Date: Sat Apr 18 16:18:36 2015 +0200 extract seperate modules in property tests project commit 4959d0545bb95f2bed2a300ad721c0d89a21a3ee Author: Tomasz Heimowski <[email protected]> Date: Sat Apr 18 16:14:01 2015 +0200 add ListProperties.fs to project commit c2839f558c01f485107ea6e5ed7860ae3122ca34 Author: Tomasz Heimowski <[email protected]> Date: Sat Apr 18 16:05:24 2015 +0200 properties for stability commit 856534b62f7999622b222fdb3db913b126012c46 Author: Tomasz Heimowski <[email protected]> Date: Sat Apr 18 15:52:33 2015 +0200 some properties for list module; consistency collections properties commit 9b321763bf18a426359aec5b6292e9923c331bba Author: Steffen Forkmann <[email protected]> Date: Sun Apr 12 11:36:28 2015 +0200 Add FsCheck project
1 parent e980c65 commit d99ceb1

File tree

11 files changed

+2216
-23
lines changed

11 files changed

+2216
-23
lines changed

packages.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="NUnit" version="2.6.4" targetFramework="net40" />
44
<package id="NUnit.Runners" version="2.6.4" />
5+
<package id="FsCheck" version="2.0.3" />
56
</packages>

src/FSharpSource.targets

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- 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. -->
33
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
4+
<PropertyGroup>
5+
<IsPortableProfile Condition="'$(TargetFramework)' == 'portable47' or '$(TargetFramework)' == 'portable7' or '$(TargetFramework)' == 'portable78' or '$(TargetFramework)' == 'portable259'">true</IsPortableProfile>
6+
<FSCoreVersion Condition="'$(TargetFramework)' != 'net20' and $(IsPortableProfile) != 'true'">4.4.0.9055</FSCoreVersion>
7+
<FSCoreVersion Condition="'$(TargetFramework)' == 'net20'">2.4.0.9055</FSCoreVersion>
8+
<FSCoreVersion Condition="'$(TargetFramework)' == 'portable7'">3.7.4.9055</FSCoreVersion>
9+
<FSCoreVersion Condition="'$(TargetFramework)' == 'portable47'">3.47.4.9055</FSCoreVersion>
10+
<FSCoreVersion Condition="'$(TargetFramework)' == 'portable78'">3.78.4.9055</FSCoreVersion>
11+
<FSCoreVersion Condition="'$(TargetFramework)' == 'portable259'">3.259.4.9055</FSCoreVersion>
12+
</PropertyGroup>
413
<Choose>
514
<When Condition="'$(Configuration)' == 'Debug' or '$(Configuration)' == 'Release' or '$(Configuration)' == 'VSDebug' or '$(Configuration)' == 'VSRelease' ">
615
<Choose>
716
<When Condition="'$(ProjectLanguage)' == 'FSharp'">
817
<Choose>
918
<When Condition="'$(AssemblyName)' == 'FSharp.Core'">
10-
<PropertyGroup Condition="'$(TargetFramework)' == 'portable47' or '$(TargetFramework)' == 'portable7' or '$(TargetFramework)' == 'portable78' or '$(TargetFramework)' == 'portable259'">
11-
<IsPortableProfile>true</IsPortableProfile>
12-
</PropertyGroup>
13-
<PropertyGroup>
14-
<OtherFlags Condition="'$(TargetFramework)' != 'net20' and $(IsPortableProfile) != 'true'">$(OtherFlags) --version:4.4.0.9055</OtherFlags>
15-
<OtherFlags Condition="'$(TargetFramework)' == 'net20'">$(OtherFlags) --version:2.4.0.9055</OtherFlags>
16-
<OtherFlags Condition="'$(TargetFramework)' == 'portable7'">$(OtherFlags) --version:3.7.4.9055</OtherFlags>
17-
<OtherFlags Condition="'$(TargetFramework)' == 'portable47'">$(OtherFlags) --version:3.47.4.9055</OtherFlags>
18-
<OtherFlags Condition="'$(TargetFramework)' == 'portable78'">$(OtherFlags) --version:3.78.4.9055</OtherFlags>
19-
<OtherFlags Condition="'$(TargetFramework)' == 'portable259'">$(OtherFlags) --version:3.259.4.9055</OtherFlags>
19+
<PropertyGroup>
20+
<OtherFlags>$(OtherFlags) --version:$(FSCoreVersion)</OtherFlags>
2021
<OtherFlags>$(OtherFlags) --delaysign+ --keyfile:"$(FSharpSourcesRoot)\fsharp\msft.pubkey"</OtherFlags>
2122
<DefineConstants>STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY;$(DefineConstants)</DefineConstants>
2223
<StrongNames>true</StrongNames>
@@ -29,6 +30,12 @@
2930
<StrongNames>true</StrongNames>
3031
</PropertyGroup>
3132
</When>
33+
<!-- do not strong-name the runtime unit tests, as they have non-strong-named dependencies -->
34+
<When Condition="'$(AssemblyName)' == 'FSharp.Core.Unittests'">
35+
<PropertyGroup>
36+
<OtherFlags>$(OtherFlags) --version:4.4.0.9055</OtherFlags>
37+
</PropertyGroup>
38+
</When>
3239
<Otherwise>
3340
<PropertyGroup Condition="'$(SIGN_WITH_MSFT_KEY)' == 'true'">
3441
<OtherFlags>$(OtherFlags) --version:4.4.0.9055 --delaysign+ --keyfile:"$(FSharpSourcesRoot)\fsharp\msft.pubkey"</OtherFlags>
@@ -101,7 +108,10 @@
101108
<NUnitVersion>2.6.4</NUnitVersion>
102109
<NUnitFullVersion>2.6.4.14350</NUnitFullVersion>
103110
<NUnitLibDir>$(FSharpSourcesRoot)\..\packages\NUnit.$(NUnitVersion)\lib\</NUnitLibDir>
104-
<NunitToolsLibDir>$(FSharpSourcesRoot)\..\packages\NUnit.Runners.$(NUnitVersion)\tools\lib\</NunitToolsLibDir>
111+
<NUnitToolsLibDir>$(FSharpSourcesRoot)\..\packages\NUnit.Runners.$(NUnitVersion)\tools\lib\</NUnitToolsLibDir>
112+
<FsCheckVersion>2.0.3</FsCheckVersion>
113+
<FsCheckFullVersion>2.0.3.0</FsCheckFullVersion>
114+
<FsCheckLibDir>$(FSharpSourcesRoot)\..\packages\FsCheck.$(FsCheckVersion)\lib\</FsCheckLibDir>
105115
</PropertyGroup>
106116

107117
<!-- v2.0-specific flags -->
@@ -729,7 +739,7 @@
729739
Outputs="@(CustomCopyLocal->'$(OutDir)%(TargetFilename)')"
730740
Condition="'$(targetCLIDir)'!='Silverlight/4.0/'"
731741
>
732-
<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) "/>
742+
<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) "/>
733743
<!-- Make sure it will get cleaned -->
734744
<CreateItem Include="$(OutDir)%(CustomCopyLocal.TargetFilename)">
735745
<Output TaskParameter="Include" ItemName="FileWrites"/>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- 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. -->
3+
<configuration>
4+
<runtime>
5+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
6+
<dependentAssembly>
7+
<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
8+
<bindingRedirect oldVersion="2.0.0.0-4.4.0.0" newVersion="{FSCoreVersion}"/>
9+
</dependentAssembly>
10+
</assemblyBinding>
11+
</runtime>
12+
</configuration>

src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<!-- 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. -->
33
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
44
<PropertyGroup>
@@ -44,10 +44,18 @@
4444
</PropertyGroup>
4545
<ItemGroup>
4646
<!-- need full name and SpecificVersion = true in order to convince msbuild to allow this reference when targeting portable47 -->
47-
<Reference Include="nunit.framework, Version=$(NUnitFullVersion), Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" Condition="'$(TargetFramework)' != 'sl5' AND '$(TargetFramework)' != 'sl3-wp'" >
48-
<SpecificVersion>true</SpecificVersion>
49-
<Private>True</Private>
50-
<HintPath>$(NUnitLibDir)\nunit.framework.dll</HintPath>
47+
<Reference Include="nunit.framework, Version=$(NUnitFullVersion), Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" Condition="'$(TargetFramework)' != 'sl5' AND '$(TargetFramework)' != 'sl3-wp'">
48+
<SpecificVersion>true</SpecificVersion>
49+
<Private>True</Private>
50+
<HintPath>$(NUnitLibDir)\nunit.framework.dll</HintPath>
51+
</Reference>
52+
<Reference Include="FsCheck, Version=$(FsCheckFullVersion)" Condition="'$(TargetFramework)' != 'portable47' AND '$(TargetFramework)' != 'net20'">
53+
<SpecificVersion>true</SpecificVersion>
54+
<Private>True</Private>
55+
<HintPath Condition="'$(TargetFramework)' == 'net40'">$(FsCheckLibDir)\net45\FsCheck.dll</HintPath>
56+
<HintPath Condition="'$(TargetFramework)' == 'portable7'">$(FsCheckLibDir)\portable-net45+netcore45\FsCheck.dll</HintPath>
57+
<HintPath Condition="'$(TargetFramework)' == 'portable78'">$(FsCheckLibDir)\portable-net45+netcore45+wp8\FsCheck.dll</HintPath>
58+
<HintPath Condition="'$(TargetFramework)' == 'portable259'">$(FsCheckLibDir)\portable-net45+netcore45+wpa81+wp8\FsCheck.dll</HintPath>
5159
</Reference>
5260
<Reference Include="NUnitFramework" Condition="'$(TargetFramework)' == 'sl5' OR '$(TargetFramework)' == 'sl3-wp'" />
5361
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Core\FSharp.Core.fsproj">
@@ -65,24 +73,29 @@
6573
</ItemGroup>
6674
<ItemGroup>
6775
<Compile Include="LibraryTestFx.fs" />
76+
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\Utils.fs" Condition="'$(TargetFramework)' != 'portable47' AND '$(TargetFramework)' != 'net20'" />
6877
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ArrayModule.fs" />
6978
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ArrayModule2.fs" />
7079
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\Array2Module.fs" />
7180
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\Array3Module.fs" />
7281
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\Array4Module.fs" />
82+
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ArrayProperties.fs" Condition="'$(TargetFramework)' != 'portable47' AND '$(TargetFramework)' != 'net20'" />
7383
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ComparisonIdentityModule.fs" />
7484
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\HashIdentityModule.fs" />
7585
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ListModule.fs" />
7686
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ListModule2.fs" />
7787
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ObsoleteListFunctions.fs" />
7888
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ListType.fs" />
89+
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ListProperties.fs" Condition="'$(TargetFramework)' != 'portable47' AND '$(TargetFramework)' != 'net20'" />
7990
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\MapModule.fs" />
8091
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\MapType.fs" />
8192
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\SetModule.fs" />
8293
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\SetType.fs" />
8394
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\SeqModule.fs" />
8495
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\SeqModule2.fs" />
8596
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ObsoleteSeqFunctions.fs" />
97+
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\SeqProperties.fs" Condition="'$(TargetFramework)' != 'portable47' AND '$(TargetFramework)' != 'net20'" />
98+
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\CollectionModulesConsistency.fs" Condition="'$(TargetFramework)' != 'portable47' AND '$(TargetFramework)' != 'net20'" />
8699
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\StringModule.fs" />
87100
<Compile Include="FSharp.Core\PrimTypes.fs" />
88101
<Compile Include="FSharp.Core\DiscrimantedUnionType.fs" />
@@ -104,6 +117,9 @@
104117
<Compile Include="TypeForwarding.fs" />
105118
<Compile Include="NUnitFrameworkShims.fs" Condition="'$(TargetFramework)' == 'sl3-wp'" />
106119
<Compile Include="SurfaceArea.$(TargetFramework).fs" />
107-
</ItemGroup>
120+
<CustomCopyLocal Include="FSharp.Core.Unittests.dll.config">
121+
<TargetFilename>FSharp.Core.Unittests.dll.config</TargetFilename>
122+
</CustomCopyLocal>
123+
</ItemGroup>
108124
<Import Project="$(FSharpSourcesRoot)\FSharpSource.targets" />
109125
</Project>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// 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.
2+
3+
module FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections.ArrayProperties
4+
5+
open System
6+
open System.Collections.Generic
7+
open NUnit.Framework
8+
open FsCheck
9+
10+
let isStable sorted = sorted |> Seq.pairwise |> Seq.forall (fun ((ia, a),(ib, b)) -> if a = b then ia < ib else true)
11+
12+
let distinctByStable<'a when 'a : comparison> (xs : 'a []) =
13+
let indexed = xs |> Seq.indexed |> Seq.toArray
14+
let sorted = indexed |> Array.distinctBy snd
15+
isStable sorted
16+
17+
[<Test>]
18+
let ``Seq.distinctBy is stable`` () =
19+
Check.QuickThrowOnFailure distinctByStable<int>
20+
Check.QuickThrowOnFailure distinctByStable<string>

0 commit comments

Comments
 (0)