• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

laiambryant / goTestUtils / 17065000595

19 Aug 2025 09:10AM UTC coverage: 66.823% (-1.6%) from 68.408%
17065000595

push

github

laiambryant
Refactored some stuff

426 of 488 new or added lines in 15 files covered. (87.3%)

570 of 853 relevant lines covered (66.82%)

650.72 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

87.1
/pbtesting/properties/predicates/array_predicates.go
1
package predicates
2

3
import "reflect"
4

5
type ArrayElementPredicates struct{ Props []Predicate }
6
type ArraySorted struct{ Enabled bool }
7

8
func (p ArrayElementPredicates) Verify(v any) bool {
3✔
9
        rv := reflect.ValueOf(v)
3✔
10
        if rv.Kind() != reflect.Array {
4✔
11
                return false
1✔
12
        }
1✔
13
        if len(p.Props) == 0 {
2✔
NEW
14
                return true
×
NEW
15
        }
×
16
        for i := 0; i < rv.Len(); i++ {
6✔
17
                val := rv.Index(i).Interface()
4✔
18
                for _, prop := range p.Props {
8✔
19
                        if !prop.Verify(val) {
5✔
20
                                return false
1✔
21
                        }
1✔
22
                }
23
        }
24
        return true
1✔
25
}
26
func (p ArraySorted) Verify(v any) bool {
4✔
27
        if !p.Enabled {
5✔
28
                return true
1✔
29
        }
1✔
30
        rv := reflect.ValueOf(v)
3✔
31
        if rv.Kind() != reflect.Array {
4✔
32
                return false
1✔
33
        }
1✔
34
        if rv.Len() < 2 {
2✔
NEW
35
                return true
×
NEW
36
        }
×
37
        for i := 1; i < rv.Len(); i++ {
5✔
38
                if less(rv.Index(i).Interface(), rv.Index(i-1).Interface()) {
4✔
39
                        return false
1✔
40
                }
1✔
41
        }
42
        return true
1✔
43
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc