master
1const expect = @import("std").testing.expect;
2
3fn fibonacci(index: u32) u32 {
4 //if (index < 2) return index;
5 return fibonacci(index - 1) + fibonacci(index - 2);
6}
7
8test "fibonacci" {
9 try comptime expect(fibonacci(7) == 13);
10}
11
12// test_error=overflow of integer type