[erlang-questions] On Joe's micro-lightweight-unit-testing
Angel
clist@REDACTED
Wed Mar 25 12:52:08 CET 2009
Hi list
Im very new to erlang, just still astonished about erlang and all, you guys, say here
Still im trying every day going deeper and deeper on erlang and functional programing.
Got recently very please reading Joe's introcction to TTD and Unit test on erlang
shttp://armstrongonsoftware.blogspot.com/2009/01/micro-lightweight-unit-testing.html
some where in the article Joe says..
step 4) Add unit tests for fastfib
test/0 looks like this:
test() ->
0 = fib(0),
1 = fib(1),
1 = fib(2),
6765 = fib(20),
0 = fastfib(0),
1 = fastfib(1),
1 = fastfib(2),
2 = fastfib(3),
K = fib(25),
K = fastfib(25),
ok.
Here I check that fastfib returns the same value as fib with the lines
K = fib(25),
K = fastfib(25).
But K=fib(25) binds K to the value fib(25) so, K= fastbib(25) must be wrong
as K was previously bound to fib(25) ¿isnt it?
so, What im missing here ?
Thanks
--
No imprima este correo si no es necesario. El medio ambiente está en nuestras manos.
__________________________________________
Clist UAH a.k.a Angel
__________________________________________
...being the second biggest search engine in the world is good enough for us. Peter @ Pirate Bay.
More information about the erlang-questions
mailing list