[fine] Many test improvements, error improvements
- Check for more error conditions - Move to more definitive error assertions - Simpler error messages in some cases - Test more conditions more thoroughly, revisit old tests
This commit is contained in:
parent
d0b74db715
commit
5f0a0b3268
20 changed files with 186 additions and 118 deletions
|
|
@ -4,10 +4,16 @@ fun worst_fib(n: f64) -> f64 {
|
|||
} else if n == 1 {
|
||||
1
|
||||
} else {
|
||||
worst_fib(n-2) + worst_fib(n-1)
|
||||
worst_fib(n-2) + delegate_worst_fib(n-1)
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE: This nonsense exists to make sure mutual recursion works, in
|
||||
// addition to direct recursion.
|
||||
fun delegate_worst_fib(n: f64) -> f64 {
|
||||
worst_fib(n)
|
||||
}
|
||||
|
||||
fun test() -> f64 {
|
||||
worst_fib(10)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue