(t *testing.T)
| 8 | import "testing" |
| 9 | |
| 10 | func TestExtended(t *testing.T) { |
| 11 | var testCasesExtended = []struct { |
| 12 | name string |
| 13 | a int64 |
| 14 | b int64 |
| 15 | gcd int64 |
| 16 | x int64 |
| 17 | y int64 |
| 18 | }{ |
| 19 | {"gcd of 30 and 50", 30, 50, 10, 2, -1}, |
| 20 | } |
| 21 | for _, tc := range testCasesExtended { |
| 22 | t.Run(tc.name, func(t *testing.T) { |
| 23 | gcd, x, y := Extended(tc.a, tc.b) |
| 24 | if gcd != tc.gcd && x != tc.x && y != tc.y { |
| 25 | t.Fatalf("Expected values:\n\tGCD: Expected %v Returned %v,\n\tx: Expected %v Returned %v\n\ty: Expected %v Returned %v", tc.gcd, gcd, tc.x, x, tc.y, y) |
| 26 | } |
| 27 | }) |
| 28 | } |
| 29 | } |
nothing calls this directly
no test coverage detected