-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Int32 and Float32 type testing #258
Conversation
… create separate tests for Terraform `v1.9.0` and above
# Conflicts: # go.mod # go.sum
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the tests here look good, left a couple notes about comments and version choices.
One more place to consider adding smoke tests for Float32Attribute
and Int32Attribute
is in the basic schema tests:
internal/framework5provider/schema_resource.go
internal/framework5provider/schema_resource_test.go
internal/framework6provider/schema_resource.go
internal/framework6provider/schema_resource_test.go
Great job! 🚀
}) | ||
} | ||
|
||
func TestFloat32Function_overflow_underflow(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
// This test documents edge case behavior with math.MaxFloat32 | ||
// This number is unique in that it has an exact representation in both float32 and float64, | ||
// it is also an integer, which may affect how this value gets encoded/decoded with go-cty. | ||
// https://github.com/hashicorp/terraform-plugin-framework/issues/1017 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great explanation! ❤️
Add test cases for
int32
andfloat32
function types andfloat32
precision testing.