Skip to content

Commit

Permalink
fwk: fix references to pkg testdata
Browse files Browse the repository at this point in the history
( cd fwk; find . -name '*.go' -exec grep -Hq 'fwk/testdata' '{}' \; -print | xargs sed -i '' -e 's!fwk/testdata!fwk/internal/fwktest!' -e 's!testdata\.!fwktest.!' -e 's!some tools defined in testdata!some tools defined in fwktest!' )
  • Loading branch information
dolmen authored and sbinet committed May 10, 2022
1 parent c04eef8 commit d4ec96b
Show file tree
Hide file tree
Showing 12 changed files with 75 additions and 75 deletions.
8 changes: 4 additions & 4 deletions fwk/dflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func TestDFlowSvcGraph(t *testing.T) {
})

app.Create(job.C{
Type: "go-hep.org/x/hep/fwk/testdata.task1",
Type: "go-hep.org/x/hep/fwk/internal/fwktest.task1",
Name: "t0",
Props: job.P{
"Ints1": "t0-ints1",
Expand All @@ -29,7 +29,7 @@ func TestDFlowSvcGraph(t *testing.T) {
})

app.Create(job.C{
Type: "go-hep.org/x/hep/fwk/testdata.task1",
Type: "go-hep.org/x/hep/fwk/internal/fwktest.task1",
Name: "t1",
Props: job.P{
"Ints1": "t1-ints1",
Expand All @@ -38,7 +38,7 @@ func TestDFlowSvcGraph(t *testing.T) {
})

app.Create(job.C{
Type: "go-hep.org/x/hep/fwk/testdata.task2",
Type: "go-hep.org/x/hep/fwk/internal/fwktest.task2",
Name: "t2",
Props: job.P{
"Input": "t1-ints1",
Expand All @@ -47,7 +47,7 @@ func TestDFlowSvcGraph(t *testing.T) {
})

app.Create(job.C{
Type: "go-hep.org/x/hep/fwk/testdata.svc1",
Type: "go-hep.org/x/hep/fwk/internal/fwktest.svc1",
Name: "svc1",
})

Expand Down
6 changes: 3 additions & 3 deletions fwk/examples/fwk-ex-tuto-1/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
// side-effect import 'testdata'.
// merely importing it will register the components defined in this package
// with the fwk components' factory.
_ "go-hep.org/x/hep/fwk/testdata"
_ "go-hep.org/x/hep/fwk/internal/fwktest"
)

var (
Expand Down Expand Up @@ -55,7 +55,7 @@ options:
// create a task that reads integers from some location
// and publish the square of these integers under some other location
app.Create(job.C{
Type: "go-hep.org/x/hep/fwk/testdata.task2",
Type: "go-hep.org/x/hep/fwk/internal/fwktest.task2",
Name: "t2",
Props: job.P{
"Input": "t1-ints1",
Expand All @@ -67,7 +67,7 @@ options:
// note we create it after the one that consumes these integers
// to exercize the automatic data-flow scheduling.
app.Create(job.C{
Type: "go-hep.org/x/hep/fwk/testdata.task1",
Type: "go-hep.org/x/hep/fwk/internal/fwktest.task1",
Name: "t1",
Props: job.P{
"Ints1": "t1-ints1",
Expand Down
8 changes: 4 additions & 4 deletions fwk/examples/fwk-ex-tuto-2/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (
// job is the scripting interface to 'fwk'
"go-hep.org/x/hep/fwk/job"

// we need to access some tools defined in testdata (the ascii InputStream)
// we need to access some tools defined in fwktest (the ascii InputStream)
// so we need to directly import that package
"go-hep.org/x/hep/fwk/testdata"
"go-hep.org/x/hep/fwk/internal/fwktest"
)

var (
Expand Down Expand Up @@ -69,7 +69,7 @@ options:
// create a task that reads integers from some location
// and publish the square of these integers under some other location
app.Create(job.C{
Type: "go-hep.org/x/hep/fwk/testdata.task2",
Type: "go-hep.org/x/hep/fwk/internal/fwktest.task2",
Name: "t2",
Props: job.P{
"Input": "t1-ints1",
Expand All @@ -90,7 +90,7 @@ options:
Type: reflect.TypeOf(int64(0)), // type of that data
},
},
"Streamer": &testdata.InputStream{
"Streamer": &fwktest.InputStream{
R: f,
},
},
Expand Down
10 changes: 5 additions & 5 deletions fwk/examples/fwk-ex-tuto-3/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (
// job is the scripting interface to 'fwk'
"go-hep.org/x/hep/fwk/job"

// we need to access some tools defined in testdata (the ascii InputStream)
// we need to access some tools defined in fwktest (the ascii InputStream)
// so we need to directly import that package
"go-hep.org/x/hep/fwk/testdata"
"go-hep.org/x/hep/fwk/internal/fwktest"
)

var (
Expand Down Expand Up @@ -81,7 +81,7 @@ options:
// create a task that reads integers from some location
// and publish the square of these integers under some other location
app.Create(job.C{
Type: "go-hep.org/x/hep/fwk/testdata.task2",
Type: "go-hep.org/x/hep/fwk/internal/fwktest.task2",
Name: "t2",
Props: job.P{
"Input": "t1-ints1",
Expand All @@ -102,7 +102,7 @@ options:
Type: reflect.TypeOf(int64(0)), // type of that data
},
},
"Streamer": &testdata.InputStream{
"Streamer": &fwktest.InputStream{
R: r,
},
},
Expand All @@ -119,7 +119,7 @@ options:
Type: reflect.TypeOf(int64(0)), // type of that data
},
},
"Streamer": &testdata.OutputStream{
"Streamer": &fwktest.OutputStream{
W: w,
},
},
Expand Down
8 changes: 4 additions & 4 deletions fwk/examples/fwk-ex-tuto-6-write-data/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (
// job is the scripting interface to 'fwk'
"go-hep.org/x/hep/fwk/job"

// we need to access some tools defined in testdata (the ascii InputStream)
// we need to access some tools defined in fwktest (the ascii InputStream)
// so we need to directly import that package
"go-hep.org/x/hep/fwk/testdata"
"go-hep.org/x/hep/fwk/internal/fwktest"

// for persistency
"go-hep.org/x/hep/fwk/rio"
Expand Down Expand Up @@ -70,7 +70,7 @@ options:
// create a task that reads integers from some location
// and publish the square of these integers under some other location
app.Create(job.C{
Type: "go-hep.org/x/hep/fwk/testdata.task2",
Type: "go-hep.org/x/hep/fwk/internal/fwktest.task2",
Name: "t2",
Props: job.P{
"Input": "t1-ints1",
Expand Down Expand Up @@ -98,7 +98,7 @@ options:
Type: reflect.TypeOf(int64(0)), // type of that data
},
},
"Streamer": &testdata.InputStream{
"Streamer": &fwktest.InputStream{
R: f,
},
},
Expand Down
6 changes: 3 additions & 3 deletions fwk/examples/fwk-ex-tuto-7-read-data/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
// for persistency
"go-hep.org/x/hep/fwk/rio"

// we need to access some tools defined in testdata
// we need to access some tools defined in fwktest
// so we need to directly import that package
_ "go-hep.org/x/hep/fwk/testdata"
_ "go-hep.org/x/hep/fwk/internal/fwktest"
)

var (
Expand Down Expand Up @@ -70,7 +70,7 @@ options:
// create a task that reads integers from some location
// and publish the square of these integers under some other location
app.Create(job.C{
Type: "go-hep.org/x/hep/fwk/testdata.task2",
Type: "go-hep.org/x/hep/fwk/internal/fwktest.task2",
Name: "t2",
Props: job.P{
"Input": "t1-ints1-massaged",
Expand Down
Loading

0 comments on commit d4ec96b

Please sign in to comment.