Skip to content

Commit

Permalink
[prism] registrations for Regression tests. (#27589)
Browse files Browse the repository at this point in the history
Co-authored-by: lostluck <13907733+lostluck@users.noreply.github.com>
  • Loading branch information
lostluck and lostluck authored Jul 21, 2023
1 parent 6aec5d1 commit cf20649
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sdks/go/test/regression/lperror.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,15 @@ import (
"sort"

"github.com/apache/beam/sdks/v2/go/pkg/beam"
"github.com/apache/beam/sdks/v2/go/pkg/beam/register"
)

func init() {
register.Function2x2(toFoo)
register.Iter1[*fruit]()
register.Function3x1(toID)
}

// REPRO found by https://github.com/zelliott

type fruit struct {
Expand Down
12 changes: 12 additions & 0 deletions sdks/go/test/regression/pardo.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,22 @@ package regression

import (
"github.com/apache/beam/sdks/v2/go/pkg/beam"
"github.com/apache/beam/sdks/v2/go/pkg/beam/register"
"github.com/apache/beam/sdks/v2/go/pkg/beam/testing/passert"
"github.com/apache/beam/sdks/v2/go/pkg/beam/testing/ptest"
)

func init() {
register.Function1x1(directFn)
register.Function2x0(emitFn)
register.Function3x0(emit2Fn)
register.Function2x1(mixedFn)
register.Function2x2(directCountFn)
register.Function3x1(emitCountFn)
register.Emitter1[int]()
register.Iter1[int]()
}

func directFn(elm int) int {
return elm + 1
}
Expand Down

0 comments on commit cf20649

Please sign in to comment.