OLD | NEW |
1 // run | 1 // run |
2 | 2 |
3 // Copyright 2009 The Go Authors. All rights reserved. | 3 // Copyright 2009 The Go Authors. All rights reserved. |
4 // Use of this source code is governed by a BSD-style | 4 // Use of this source code is governed by a BSD-style |
5 // license that can be found in the LICENSE file. | 5 // license that can be found in the LICENSE file. |
6 | 6 |
7 // Test maps, almost exhaustively. | 7 // Test maps, almost exhaustively. |
8 // NaN complexity test is in mapnan.go. | 8 // Complexity (linearity) test is in maplinear.go. |
9 | 9 |
10 package main | 10 package main |
11 | 11 |
12 import ( | 12 import ( |
13 "fmt" | 13 "fmt" |
14 "math" | 14 "math" |
15 "strconv" | 15 "strconv" |
16 ) | 16 ) |
17 | 17 |
18 const count = 100 | 18 const count = 100 |
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
675 panic("not NaN") | 675 panic("not NaN") |
676 } | 676 } |
677 if v != 1 { | 677 if v != 1 { |
678 panic("wrong value") | 678 panic("wrong value") |
679 } | 679 } |
680 } | 680 } |
681 if iters != n { | 681 if iters != n { |
682 panic("wrong number of nan range iters") | 682 panic("wrong number of nan range iters") |
683 } | 683 } |
684 } | 684 } |
OLD | NEW |