OSDN Git Service
(root)
/
happyabc
/
happyabc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f3022c4
)
Add UnitTest for Base module
author
mzp
<mzpppp@gmail.com>
Sat, 1 Nov 2008 01:46:55 +0000
(10:46 +0900)
committer
mzp
<mzpppp@gmail.com>
Sat, 1 Nov 2008 01:46:55 +0000
(10:46 +0900)
- add test for 'group_by'
test/test_base.ml
patch
|
blob
|
history
diff --git
a/test/test_base.ml
b/test/test_base.ml
index
2e2f3fe
..
07b1478
100644
(file)
--- a/
test/test_base.ml
+++ b/
test/test_base.ml
@@
-32,3
+32,7
@@
test either =
test map_accum_left =
assert_equal (0, []) @@ map_accum_left (fun i x->(i+1,x+i)) 0 [];
assert_equal (4, [1; 2; 3; 4]) @@ map_accum_left (fun i x->(i+1,x+i)) 0 [1;1;1;1]
+
+test group_by =
+ assert_equal [[1];[2;2];[3]] @@ group_by (==) [1;2;2;3]
+