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

mlange-42 / modo / 12978042620

26 Jan 2025 08:23PM CUT coverage: 65.241% (+3.1%) from 62.103%
12978042620

Pull #123

github

web-flow
Merge 32c19e408 into 39fbafe7b
Pull Request #123: Unit tests for formatter

19 of 26 new or added lines in 5 files covered. (73.08%)

1 existing line in 1 file now uncovered.

1098 of 1683 relevant lines covered (65.24%)

30.99 hits per line

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

50.0
/document/util.go
1
package document
2

3
import (
4
        "fmt"
5
        "log"
6
)
7

8
// appends to a slice, but guaranties to return a new one and not alter the original.
9
func appendNew[T any](sl []T, elems ...T) []T {
692✔
10
        sl2 := make([]T, len(sl), len(sl)+len(elems))
692✔
11
        copy(sl2, sl)
692✔
12
        sl2 = append(sl2, elems...)
692✔
13
        return sl2
692✔
14
}
692✔
15

16
func warnOrError(strict bool, pattern string, args ...any) error {
×
17
        if strict {
×
18
                return fmt.Errorf(pattern, args...)
×
19
        }
×
20
        log.Printf("WARNING: "+pattern+"\n", args...)
×
21
        return nil
×
22
}
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

© 2025 Coveralls, Inc