@@ -540,37 +540,3 @@ func TestValueToJSON_EdgeCases(t *testing.T) {
540540 })
541541 }
542542}
543-
544- func TestValueToJSON_RoundTrip (t * testing.T ) {
545- t .Parallel ()
546-
547- // Test that we can round-trip simple values through JSON
548- testCases := []struct {
549- name string
550- typ tftypes.Type
551- value tftypes.Value
552- }{
553- {"string" , tftypes .String , tftypes .NewValue (tftypes .String , "test" )},
554- {"number" , tftypes .Number , tftypes .NewValue (tftypes .Number , 42 )},
555- {"bool" , tftypes .Bool , tftypes .NewValue (tftypes .Bool , true )},
556- {"null string" , tftypes .String , tftypes .NewValue (tftypes .String , nil )},
557- }
558-
559- for _ , tc := range testCases {
560- t .Run (tc .name , func (t * testing.T ) {
561- t .Parallel ()
562-
563- // Convert to JSON
564- jsonBytes , err := tftypeValueToJSON (tc .typ , tc .value )
565- require .NoError (t , err )
566-
567- // Convert back from JSON
568- reconstructed , err := tftypes .ValueFromJSON (jsonBytes , tc .typ )
569- require .NoError (t , err )
570-
571- // Should be equal
572- assert .True (t , tc .value .Equal (reconstructed ),
573- "Original: %s, Reconstructed: %s" , tc .value .String (), reconstructed .String ())
574- })
575- }
576- }
0 commit comments