Skip to content

Commit

Permalink
update implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-carlton committed Oct 27, 2024
1 parent 14fa32c commit 2c0f278
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/logging/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func setupOptions() *slog.HandlerOptions {
a = setSourceName(a)
return a
},
}
}
}

// NewLogger returns a JSON logger.
Expand Down
8 changes: 4 additions & 4 deletions pkg/testutils/test-framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ type (
ResultsComparer() bool
// FieldComparer calls the field comparer, default checking function calls this to call test data's CompareFunc or CompareReflectDeepEqual if not set.
FieldComparer(name string, actual, expected interface{}) bool
// ResultReporter calls the specified reporter, default checking function calls this to call test data's ResultsReportFunc or ReportSpew if not set.
// ResultsReporter calls the specified reporter, default checking function calls this to call test data's ResultsReportFunc or ReportSpew if not set.
ResultsReporter()
// FieldReporter calls the specified reporter, default checking function calls this to call test data's ReportFieldsFunc or ReportSpew if not set.
FieldReporter(name string, actual, expected interface{})
Expand Down Expand Up @@ -183,7 +183,7 @@ func DefaultPrepFunc(u TestUtil) {
t.Logf("Test: %d, %s\n", test.Number, test.Description)
}

func (u *testUtil) ResultReporter() {
func (u *testUtil) ResultsReporter() {
test := u.TestData()
if test.ResultsReportFunc == nil {
ReportCallSpew(u)
Expand All @@ -196,7 +196,7 @@ func (u *testUtil) ResultReporter() {

func (u *testUtil) FieldReporter(name string, actual, expected interface{}) {
test := u.TestData()
if test.FieldCompareFunc == nil {
if test.FieldReportFunc == nil {
ReportSpew(u, name, actual, expected)

return
Expand All @@ -216,7 +216,7 @@ func (u *testUtil) ResultsComparer() bool {
}

if !passed || u.FailTests() {
u.ResultReporter()
u.ResultsReporter()
}

return passed
Expand Down

0 comments on commit 2c0f278

Please sign in to comment.