@@ -191,6 +191,43 @@ func TestIsSupportedWithRangeUint64_Overflow(t *testing.T) {
191191 h .Assert (t , isSupported == true , "Uint64RangeFilter should match with 0 - MAX target and source 4" )
192192}
193193
194+ // float64
195+
196+ func TestIsSupportedWithFloat64_Supported (t * testing.T ) {
197+ isSupported := isSupportedWithFloat64 (aws .Float64 (0.33 ), aws .Float64 (0.33 ))
198+ h .Assert (t , isSupported == true , "Float64 comparison should match exactly with 2 decimal places" )
199+ }
200+
201+ func TestIsSupportedWithFloat64_SupportedTruncatedDecPlacesExact (t * testing.T ) {
202+ isSupported := isSupportedWithFloat64 (aws .Float64 (0.3322 ), aws .Float64 (0.3322 ))
203+ h .Assert (t , isSupported == true , "Float64 comparison should match exactly with 4 decimal places" )
204+ }
205+
206+ func TestIsSupportedWithFloat64_SupportedTruncatedDecPlaces (t * testing.T ) {
207+ isSupported := isSupportedWithFloat64 (aws .Float64 (0.3399 ), aws .Float64 (0.3311 ))
208+ h .Assert (t , isSupported == true , "Float64 comparison should match when truncating to 2 decimal places" )
209+ }
210+
211+ func TestIsSupportedWithFloat64_Unsupported (t * testing.T ) {
212+ isSupported := isSupportedWithFloat64 (aws .Float64 (0.4 ), aws .Float64 (0.3399 ))
213+ h .Assert (t , isSupported == false , "Float64 comparison should NOT match" )
214+ }
215+
216+ func TestIsSupportedWithFloat64_SourceNil (t * testing.T ) {
217+ isSupported := isSupportedWithFloat64 (nil , aws .Float64 (0.3399 ))
218+ h .Assert (t , isSupported == false , "Float64 comparison should NOT match with nil source" )
219+ }
220+
221+ func TestIsSupportedWithFloat64_TargetNil (t * testing.T ) {
222+ isSupported := isSupportedWithFloat64 (aws .Float64 (0.3399 ), nil )
223+ h .Assert (t , isSupported == true , "Float64 comparison should match with nil target" )
224+ }
225+
226+ func TestIsSupportedWithFloat64_BothNil (t * testing.T ) {
227+ isSupported := isSupportedWithFloat64 (nil , nil )
228+ h .Assert (t , isSupported == true , "Float64 comparison should match with nil target and source" )
229+ }
230+
194231// bools
195232
196233func TestSupportSyntaxToBool_Supported (t * testing.T ) {
0 commit comments