forked from rosa/hakurei
Compare commits
47
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7d406c566
|
||
|
|
98c6d7611b
|
||
|
|
76817776ad
|
||
|
|
52f32dc248
|
||
|
|
0eb9e72bee
|
||
|
|
bb8a80b540
|
||
|
|
dad5fcda4e
|
||
|
|
a4c993a077
|
||
|
|
20bbd206ca
|
||
|
|
c622f09f15
|
||
|
|
eb64b46000
|
||
|
|
a3af07be5a
|
||
|
|
a9a95456bb
|
||
|
|
095505044b
|
||
|
|
0bb576d59a
|
||
|
|
d0329ce8d9
|
||
|
|
97f02f9d9b
|
||
|
|
56a791a767
|
||
|
|
148cdcea34
|
||
|
|
bdbe65de07
|
||
|
|
f35a616bef
|
||
|
|
c2a172f839
|
||
|
|
e4133771bc
|
||
|
|
6cb3920c14
|
||
|
|
881e4a4c89
|
||
|
|
12c2f9226f
|
||
|
|
40f0c5e93e
|
||
|
|
2efad32f31
|
||
|
|
117f938cb8
|
||
|
|
8f473b78ad
|
||
|
|
9d13e845a8
|
||
|
|
5642cc6386
|
||
|
|
155c632f7b
|
||
|
|
e0f014dc1b
|
||
|
|
89a2c3aa85
|
||
|
|
20b11453a8
|
||
|
|
2686ddff70
|
||
|
|
01ec86cf5a
|
||
|
|
907f79efed
|
||
|
|
c7f6f97458
|
||
|
|
9676b33cc5
|
||
|
|
f795f19e6b
|
||
|
|
a1930c7d76
|
||
|
|
a7266baeeb
|
||
|
|
8e459bf68f
|
||
|
|
b5890c1c45
|
||
|
|
0dc254161f
|
+6
-14
@@ -25,20 +25,12 @@ func skipGNUTests(tests ...int) string {
|
||||
slices.Sort(tests)
|
||||
|
||||
var buf strings.Builder
|
||||
|
||||
if tests[0] != 1 {
|
||||
buf.WriteString("1-")
|
||||
}
|
||||
|
||||
for i, n := range tests {
|
||||
if n != 1 && (i == 0 || tests[i-1] != n-1) {
|
||||
buf.WriteString(strconv.Itoa(n - 1))
|
||||
buf.WriteString(" ")
|
||||
}
|
||||
if i == len(tests)-1 || tests[i+1] != n+1 {
|
||||
buf.WriteString(strconv.Itoa(n + 1))
|
||||
buf.WriteString("-")
|
||||
}
|
||||
buf.WriteString("1-")
|
||||
for _, n := range tests {
|
||||
buf.WriteString(strconv.Itoa(n - 1))
|
||||
buf.WriteString(" ")
|
||||
buf.WriteString(strconv.Itoa(n + 1))
|
||||
buf.WriteString("-")
|
||||
}
|
||||
return buf.String()
|
||||
}
|
||||
|
||||
@@ -16,8 +16,6 @@ func TestSkipGNUTests(t *testing.T) {
|
||||
}{
|
||||
{[]int{764}, "1-763 765-"},
|
||||
{[]int{764, 0xcafe, 37, 9}, "1-8 10-36 38-763 765-51965 51967-"},
|
||||
{[]int{1, 2, 0xbed}, "3-3052 3054-"},
|
||||
{[]int{3, 4}, "1-2 5-"},
|
||||
}
|
||||
for _, tc := range testCases {
|
||||
t.Run(strings.Join(slices.Collect(func(yield func(string) bool) {
|
||||
|
||||
Reference in New Issue
Block a user