Skip to content

Commit

Permalink
updates to test option name
Browse files Browse the repository at this point in the history
  • Loading branch information
suyashkumar committed Jun 10, 2024
1 parent 5c8fe0d commit bdce9ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions parse_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ func TestParse_InfersMissingTransferSyntax(t *testing.T) {
for _, tc := range cases {
t.Run(tc.name, func(t *testing.T) {
// Write out Dataset with OverrideMissingTransferSyntax option _and_
// the testSkipWritingTransferSyntax to ensure no Transfer Syntax
// the skipWritingTransferSyntaxForTests to ensure no Transfer Syntax
// element is written to the test dicom. The test later verifies
// that no Transfer Syntax element was written to the metadata.
writtenDICOM := &bytes.Buffer{}
if err := Write(writtenDICOM, dsWithMissingTS, OverrideMissingTransferSyntax(tc.overrideTransferSyntax), testSkipWritingTransferSyntax()); err != nil {
if err := Write(writtenDICOM, dsWithMissingTS, OverrideMissingTransferSyntax(tc.overrideTransferSyntax), skipWritingTransferSyntaxForTests()); err != nil {
t.Errorf("Write(OverrideMissingTransferSyntax(%v)) returned unexpected error: %v", tc.overrideTransferSyntax, err)
}

Expand Down
4 changes: 2 additions & 2 deletions write.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,12 @@ func OverrideMissingTransferSyntax(transferSyntaxUID string) WriteOption {
}
}

// testSkipWritingTransferSyntax is a test WriteOption that cause Write to skip
// skipWritingTransferSyntaxForTests is a test WriteOption that cause Write to skip
// writing the transfer syntax uid element in the DICOM metadata. When used in
// combination with OverrideMissingTransferSyntax, this can be used to set the
// TransferSyntax for the written dataset without writing the actual transfer
// syntax element to the metadata.
func testSkipWritingTransferSyntax() WriteOption {
func skipWritingTransferSyntaxForTests() WriteOption {
return func(set *writeOptSet) {
set.skipWritingTransferSyntaxForTests = true
}
Expand Down

0 comments on commit bdce9ea

Please sign in to comment.