Skip to content

Commit 8493d77

Browse files
committed
Minor cleanup in unit test
1 parent a0b7b51 commit 8493d77

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

nodes/test@v1_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ func Test_InputValueById_Casting(t *testing.T) {
5858

5959
SAME_AS_OUTPUT := core.OutputId("")
6060

61+
var constReader io.Reader = strings.NewReader("hello")
62+
6163
tests := []struct {
6264
output any // the value for the output port
6365

@@ -93,7 +95,8 @@ func Test_InputValueById_Casting(t *testing.T) {
9395

9496
// test stream ports
9597
{core.DataStreamFactory{
96-
Reader: strings.NewReader("hello"),
98+
Reader: constReader,
99+
Length: core.GetReaderLength(constReader),
97100
}, ni.Core_test_v1_Output_output_stream_foo123, SAME_AS_OUTPUT, ni.Core_test_v1_Input_input_stream_foo123, core.DataStreamFactory{}, expectError{}},
98101
{"hello", ni.Core_test_v1_Output_output_string_foo123, SAME_AS_OUTPUT, ni.Core_test_v1_Input_input_stream_foo123, strings.NewReader(""), expectError{}},
99102
{"hello", ni.Core_test_v1_Output_output_string_foo123, SAME_AS_OUTPUT, ni.Core_test_v1_Input_input_stream_foo123, core.DataStreamFactory{}, expectError{}},

0 commit comments

Comments
 (0)