...

Source file src/github.com/aws/smithy-go/properties_test.go

Documentation: github.com/aws/smithy-go

     1  package smithy
     2  
     3  import "testing"
     4  
     5  func TestProperties(t *testing.T) {
     6  	original := map[interface{}]interface{}{
     7  		"abc": 123,
     8  		"efg": "hij",
     9  	}
    10  
    11  	var m Properties
    12  	for k, v := range original {
    13  		m.Set(k, v)
    14  	}
    15  	for k, v := range original {
    16  		if m.Get(k) != v {
    17  			t.Errorf("expect key / value properties to be equivalent: %v / %v", k, v)
    18  		}
    19  	}
    20  
    21  	var n Properties
    22  	n.SetAll(&m)
    23  	for k, v := range original {
    24  		if n.Get(k) != v {
    25  			t.Errorf("expect key / value properties to be equivalent: %v / %v", k, v)
    26  		}
    27  	}
    28  
    29  }

View as plain text