| 1 |
// Copyright 2021 The Go Authors. All rights reserved. |
| 2 |
// Use of this source code is governed by a BSD-style |
| 3 |
// license that can be found in the LICENSE file. |
| 4 |
|
| 5 |
package main |
| 6 |
|
| 7 |
func main() { |
| 8 |
// For now, a lone type parameter is not permitted as RHS in a type declaration (issue #45639). |
| 9 |
// if got, want := a.OrderedAbsDifference(1.0, -2.0), 3.0; got != want { |
| 10 |
// panic(fmt.Sprintf("got = %v, want = %v", got, want)) |
| 11 |
// } |
| 12 |
// if got, want := a.OrderedAbsDifference(-1.0, 2.0), 3.0; got != want { |
| 13 |
// panic(fmt.Sprintf("got = %v, want = %v", got, want)) |
| 14 |
// } |
| 15 |
// if got, want := a.OrderedAbsDifference(-20, 15), 35; got != want { |
| 16 |
// panic(fmt.Sprintf("got = %v, want = %v", got, want)) |
| 17 |
// } |
| 18 |
// |
| 19 |
// if got, want := a.ComplexAbsDifference(5.0+2.0i, 2.0-2.0i), 5+0i; got != want { |
| 20 |
// panic(fmt.Sprintf("got = %v, want = %v", got, want)) |
| 21 |
// } |
| 22 |
// if got, want := a.ComplexAbsDifference(2.0-2.0i, 5.0+2.0i), 5+0i; got != want { |
| 23 |
// panic(fmt.Sprintf("got = %v, want = %v", got, want)) |
| 24 |
// } |
| 25 |
} |