feat: Demo-Examples (Python/Rust/Go/C) mit Protokoll-Templates und Restore-Skript
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
fb4e96919a
commit
64c2b7f0fd
21 changed files with 614 additions and 0 deletions
20
examples/go-fibonacci/main_test.go
Normal file
20
examples/go-fibonacci/main_test.go
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
package main
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestFib(t *testing.T) {
|
||||
cases := []struct {
|
||||
n, want int
|
||||
}{
|
||||
{0, 0},
|
||||
{1, 1},
|
||||
{2, 1},
|
||||
{5, 5},
|
||||
{10, 55},
|
||||
}
|
||||
for _, c := range cases {
|
||||
if got := fib(c.n); got != c.want {
|
||||
t.Errorf("fib(%d) = %d, want %d", c.n, got, c.want)
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue