(t *testing.T)
| 776 | } |
| 777 | |
| 778 | func TestParseIDConfig_PartialConfig(t *testing.T) { |
| 779 | raw := map[string]any{ |
| 780 | "strategy": "sequential", |
| 781 | } |
| 782 | |
| 783 | cfg := parseIDConfig(raw) |
| 784 | if cfg == nil { |
| 785 | t.Fatal("expected non-nil IDConfig") |
| 786 | return |
| 787 | } |
| 788 | if cfg.Strategy != "sequential" { |
| 789 | t.Errorf("Strategy = %q, want %q", cfg.Strategy, "sequential") |
| 790 | } |
| 791 | if cfg.Prefix != "" { |
| 792 | t.Errorf("Prefix = %q, want empty", cfg.Prefix) |
| 793 | } |
| 794 | if cfg.Length != 0 { |
| 795 | t.Errorf("Length = %d, want 0", cfg.Length) |
| 796 | } |
| 797 | if cfg.Padding != 0 { |
| 798 | t.Errorf("Padding = %d, want 0", cfg.Padding) |
| 799 | } |
| 800 | } |
| 801 | |
| 802 | func TestParseIDConfig_Nil(t *testing.T) { |
| 803 | cfg := parseIDConfig(nil) |
nothing calls this directly
no test coverage detected