Tests for weight 0, a never-numeric calc operand, the repeat product along a path, and ErrNoData
Tests / vet + fmt + tests (pull_request) Failing after 15s

This commit is contained in:
2026-09-02 18:22:23 +02:00
parent c5c06375d8
commit d72d326de5
5 changed files with 54 additions and 8 deletions
+3 -2
View File
@@ -1,6 +1,7 @@
package fejkdata
import (
"errors"
"reflect"
"slices"
"strings"
@@ -55,8 +56,8 @@ func TestUserDataMayReferenceShipped(t *testing.T) {
func TestWithoutShippedDataNeedsASource(t *testing.T) {
_, err := New(WithoutShippedData())
if err == nil || !strings.Contains(err.Error(), "WithDataPath") {
t.Fatalf("New(WithoutShippedData()) = %v, want an error naming WithDataPath", err)
if err == nil || !strings.Contains(err.Error(), "WithDataPath") || !errors.Is(err, ErrNoData) {
t.Fatalf("New(WithoutShippedData()) = %v, want ErrNoData naming WithDataPath", err)
}
}