Skip to content

Commit 3e9f406

Browse files
authored
Merge pull request #58 from apelisse/deduced-types
Deduced types
2 parents 2faa01f + 968b038 commit 3e9f406

File tree

8 files changed

+632
-19
lines changed

8 files changed

+632
-19
lines changed

internal/fixture/state.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030
// any time that Live and Managers match the expectations.
3131
type State struct {
3232
Live *typed.TypedValue
33-
Parser *typed.ParseableType
33+
Parser typed.ParseableType
3434
Managers fieldpath.ManagedFields
3535
Updater *merge.Updater
3636
}
@@ -87,7 +87,7 @@ func FixTabsOrDie(in typed.YAMLObject) typed.YAMLObject {
8787

8888
func (s *State) checkInit() error {
8989
if s.Live == nil {
90-
obj, err := s.Parser.New()
90+
obj, err := s.Parser.FromYAML("{}")
9191
if err != nil {
9292
return fmt.Errorf("failed to create new empty object: %v", err)
9393
}
@@ -228,7 +228,7 @@ type TestCase struct {
228228
}
229229

230230
// Test runs the test-case using the given parser.
231-
func (tc TestCase) Test(parser *typed.ParseableType) error {
231+
func (tc TestCase) Test(parser typed.ParseableType) error {
232232
state := State{
233233
Updater: &merge.Updater{Converter: &dummyConverter{}},
234234
Parser: parser,

0 commit comments

Comments
 (0)