| OLD | NEW |
| 1 package vec | 1 package vec |
| 2 | 2 |
| 3 import ( | 3 import ( |
| 4 "math" | 4 "math" |
| 5 "testing" | 5 "testing" |
| 6 ) | 6 ) |
| 7 | 7 |
| 8 func near(a, b float64) bool { | 8 func near(a, b float64) bool { |
| 9 return math.Abs(a-b) < 0.001 | 9 return math.Abs(a-b) < 0.001 |
| 10 } | 10 } |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 Idx: 0, | 108 Idx: 0, |
| 109 }, | 109 }, |
| 110 { | 110 { |
| 111 Slice: []float64{4}, | 111 Slice: []float64{4}, |
| 112 Idx: -1, | 112 Idx: -1, |
| 113 }, | 113 }, |
| 114 } | 114 } |
| 115 for _, tc := range testCases { | 115 for _, tc := range testCases { |
| 116 _, err := FillAt(tc.Slice, tc.Idx) | 116 _, err := FillAt(tc.Slice, tc.Idx) |
| 117 if err == nil { | 117 if err == nil { |
| 118 » » » t.Fatalf("Expected %q to fail FillAt.", tc) | 118 » » » t.Fatalf("Expected \"%v\" to fail FillAt.", tc) |
| 119 } | 119 } |
| 120 } | 120 } |
| 121 } | 121 } |
| OLD | NEW |