Skip to content

Commit

Permalink
Test conv itself
Browse files Browse the repository at this point in the history
  • Loading branch information
hyorigo committed Jul 21, 2023
1 parent 63a7d6f commit bec22f1
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,37 @@ func TestCastStringAnyMapToStringDict(t *testing.T) {
t.Errorf("Expected error, got nil")
}
}

func TestSetInputConversionEnabled(t *testing.T) {
m := NewDefault()
if m.enableInConv != true {
t.Errorf("Expected input conversion to be enabled by default, but it wasn't")
}

m.SetInputConversionEnabled(false)
if m.enableInConv != false {
t.Errorf("Expected input conversion to be disabled, but it wasn't")
}

m.SetInputConversionEnabled(true)
if m.enableInConv != true {
t.Errorf("Expected input conversion to be enabled, but it wasn't")
}
}

func TestSetOutputConversionEnabled(t *testing.T) {
m := NewDefault()
if m.enableOutConv != true {
t.Errorf("Expected output conversion to be enabled by default, but it wasn't")
}

m.SetOutputConversionEnabled(false)
if m.enableOutConv != false {
t.Errorf("Expected output conversion to be disabled, but it wasn't")
}

m.SetOutputConversionEnabled(true)
if m.enableOutConv != true {
t.Errorf("Expected output conversion to be enabled, but it wasn't")
}
}

0 comments on commit bec22f1

Please sign in to comment.