@ -30,134 +30,134 @@ func TestMergeSnapshots(t *testing.T) {
name : "first-nil" ,
name : "first-nil" ,
s1 : nil ,
s1 : nil ,
s2 : NewSnapshot ( map [ Key ] RawItem {
s2 : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : true } ,
"Setting3" : RawItemOf ( true ) ,
} ) ,
} ) ,
want : NewSnapshot ( map [ Key ] RawItem {
want : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : true } ,
"Setting3" : RawItemOf ( true ) ,
} ) ,
} ) ,
} ,
} ,
{
{
name : "first-empty" ,
name : "first-empty" ,
s1 : NewSnapshot ( map [ Key ] RawItem { } ) ,
s1 : NewSnapshot ( map [ Key ] RawItem { } ) ,
s2 : NewSnapshot ( map [ Key ] RawItem {
s2 : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : false } ,
"Setting3" : RawItemOf ( false ) ,
} ) ,
} ) ,
want : NewSnapshot ( map [ Key ] RawItem {
want : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : false } ,
"Setting3" : RawItemOf ( false ) ,
} ) ,
} ) ,
} ,
} ,
{
{
name : "second-nil" ,
name : "second-nil" ,
s1 : NewSnapshot ( map [ Key ] RawItem {
s1 : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : true } ,
"Setting3" : RawItemOf ( true ) ,
} ) ,
} ) ,
s2 : nil ,
s2 : nil ,
want : NewSnapshot ( map [ Key ] RawItem {
want : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : true } ,
"Setting3" : RawItemOf ( true ) ,
} ) ,
} ) ,
} ,
} ,
{
{
name : "second-empty" ,
name : "second-empty" ,
s1 : NewSnapshot ( map [ Key ] RawItem {
s1 : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : false } ,
"Setting3" : RawItemOf ( false ) ,
} ) ,
} ) ,
s2 : NewSnapshot ( map [ Key ] RawItem { } ) ,
s2 : NewSnapshot ( map [ Key ] RawItem { } ) ,
want : NewSnapshot ( map [ Key ] RawItem {
want : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : false } ,
"Setting3" : RawItemOf ( false ) ,
} ) ,
} ) ,
} ,
} ,
{
{
name : "no-conflicts" ,
name : "no-conflicts" ,
s1 : NewSnapshot ( map [ Key ] RawItem {
s1 : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : false } ,
"Setting3" : RawItemOf ( false ) ,
} ) ,
} ) ,
s2 : NewSnapshot ( map [ Key ] RawItem {
s2 : NewSnapshot ( map [ Key ] RawItem {
"Setting4" : { value : 2 * time . Hour } ,
"Setting4" : RawItemOf ( 2 * time . Hour ) ,
"Setting5" : { value : VisibleByPolicy } ,
"Setting5" : RawItemOf ( VisibleByPolicy ) ,
"Setting6" : { value : ShowChoiceByPolicy } ,
"Setting6" : RawItemOf ( ShowChoiceByPolicy ) ,
} ) ,
} ) ,
want : NewSnapshot ( map [ Key ] RawItem {
want : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : false } ,
"Setting3" : RawItemOf ( false ) ,
"Setting4" : { value : 2 * time . Hour } ,
"Setting4" : RawItemOf ( 2 * time . Hour ) ,
"Setting5" : { value : VisibleByPolicy } ,
"Setting5" : RawItemOf ( VisibleByPolicy ) ,
"Setting6" : { value : ShowChoiceByPolicy } ,
"Setting6" : RawItemOf ( ShowChoiceByPolicy ) ,
} ) ,
} ) ,
} ,
} ,
{
{
name : "with-conflicts" ,
name : "with-conflicts" ,
s1 : NewSnapshot ( map [ Key ] RawItem {
s1 : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : true } ,
"Setting3" : RawItemOf ( true ) ,
} ) ,
} ) ,
s2 : NewSnapshot ( map [ Key ] RawItem {
s2 : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 456 } ,
"Setting1" : RawItemOf ( 456 ) ,
"Setting3" : { value : false } ,
"Setting3" : RawItemOf ( false ) ,
"Setting4" : { value : 2 * time . Hour } ,
"Setting4" : RawItemOf ( 2 * time . Hour ) ,
} ) ,
} ) ,
want : NewSnapshot ( map [ Key ] RawItem {
want : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 456 } ,
"Setting1" : RawItemOf ( 456 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : false } ,
"Setting3" : RawItemOf ( false ) ,
"Setting4" : { value : 2 * time . Hour } ,
"Setting4" : RawItemOf ( 2 * time . Hour ) ,
} ) ,
} ) ,
} ,
} ,
{
{
name : "with-scope-first-wins" ,
name : "with-scope-first-wins" ,
s1 : NewSnapshot ( map [ Key ] RawItem {
s1 : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : true } ,
"Setting3" : RawItemOf ( true ) ,
} , DeviceScope ) ,
} , DeviceScope ) ,
s2 : NewSnapshot ( map [ Key ] RawItem {
s2 : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 456 } ,
"Setting1" : RawItemOf ( 456 ) ,
"Setting3" : { value : false } ,
"Setting3" : RawItemOf ( false ) ,
"Setting4" : { value : 2 * time . Hour } ,
"Setting4" : RawItemOf ( 2 * time . Hour ) ,
} , CurrentUserScope ) ,
} , CurrentUserScope ) ,
want : NewSnapshot ( map [ Key ] RawItem {
want : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : true } ,
"Setting3" : RawItemOf ( true ) ,
"Setting4" : { value : 2 * time . Hour } ,
"Setting4" : RawItemOf ( 2 * time . Hour ) ,
} , CurrentUserScope ) ,
} , CurrentUserScope ) ,
} ,
} ,
{
{
name : "with-scope-second-wins" ,
name : "with-scope-second-wins" ,
s1 : NewSnapshot ( map [ Key ] RawItem {
s1 : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : true } ,
"Setting3" : RawItemOf ( true ) ,
} , CurrentUserScope ) ,
} , CurrentUserScope ) ,
s2 : NewSnapshot ( map [ Key ] RawItem {
s2 : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 456 } ,
"Setting1" : RawItemOf ( 456 ) ,
"Setting3" : { value : false } ,
"Setting3" : RawItemOf ( false ) ,
"Setting4" : { value : 2 * time . Hour } ,
"Setting4" : RawItemOf ( 2 * time . Hour ) ,
} , DeviceScope ) ,
} , DeviceScope ) ,
want : NewSnapshot ( map [ Key ] RawItem {
want : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 456 } ,
"Setting1" : RawItemOf ( 456 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : false } ,
"Setting3" : RawItemOf ( false ) ,
"Setting4" : { value : 2 * time . Hour } ,
"Setting4" : RawItemOf ( 2 * time . Hour ) ,
} , CurrentUserScope ) ,
} , CurrentUserScope ) ,
} ,
} ,
{
{
@ -170,28 +170,27 @@ func TestMergeSnapshots(t *testing.T) {
name : "with-scope-first-empty" ,
name : "with-scope-first-empty" ,
s1 : NewSnapshot ( map [ Key ] RawItem { } , CurrentUserScope ) ,
s1 : NewSnapshot ( map [ Key ] RawItem { } , CurrentUserScope ) ,
s2 : NewSnapshot ( map [ Key ] RawItem {
s2 : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : true } } ,
"Setting3" : RawItemOf ( true ) } , DeviceScope , NewNamedOrigin ( "TestPolicy" , DeviceScope ) ) ,
DeviceScope , NewNamedOrigin ( "TestPolicy" , DeviceScope ) ) ,
want : NewSnapshot ( map [ Key ] RawItem {
want : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : true } ,
"Setting3" : RawItemOf ( true ) ,
} , CurrentUserScope , NewNamedOrigin ( "TestPolicy" , DeviceScope ) ) ,
} , CurrentUserScope , NewNamedOrigin ( "TestPolicy" , DeviceScope ) ) ,
} ,
} ,
{
{
name : "with-scope-second-empty" ,
name : "with-scope-second-empty" ,
s1 : NewSnapshot ( map [ Key ] RawItem {
s1 : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : true } ,
"Setting3" : RawItemOf ( true ) ,
} , CurrentUserScope ) ,
} , CurrentUserScope ) ,
s2 : NewSnapshot ( map [ Key ] RawItem { } ) ,
s2 : NewSnapshot ( map [ Key ] RawItem { } ) ,
want : NewSnapshot ( map [ Key ] RawItem {
want : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : true } ,
"Setting3" : RawItemOf ( true ) ,
} , CurrentUserScope ) ,
} , CurrentUserScope ) ,
} ,
} ,
}
}
@ -244,9 +243,9 @@ func TestSnapshotEqual(t *testing.T) {
name : "first-nil" ,
name : "first-nil" ,
s1 : nil ,
s1 : nil ,
s2 : NewSnapshot ( map [ Key ] RawItem {
s2 : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : false } ,
"Setting3" : RawItemOf ( false ) ,
} ) ,
} ) ,
wantEqual : false ,
wantEqual : false ,
wantEqualItems : false ,
wantEqualItems : false ,
@ -255,9 +254,9 @@ func TestSnapshotEqual(t *testing.T) {
name : "first-empty" ,
name : "first-empty" ,
s1 : NewSnapshot ( map [ Key ] RawItem { } ) ,
s1 : NewSnapshot ( map [ Key ] RawItem { } ) ,
s2 : NewSnapshot ( map [ Key ] RawItem {
s2 : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : false } ,
"Setting3" : RawItemOf ( false ) ,
} ) ,
} ) ,
wantEqual : false ,
wantEqual : false ,
wantEqualItems : false ,
wantEqualItems : false ,
@ -265,9 +264,9 @@ func TestSnapshotEqual(t *testing.T) {
{
{
name : "second-nil" ,
name : "second-nil" ,
s1 : NewSnapshot ( map [ Key ] RawItem {
s1 : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : true } ,
"Setting3" : RawItemOf ( true ) ,
} ) ,
} ) ,
s2 : nil ,
s2 : nil ,
wantEqual : false ,
wantEqual : false ,
@ -276,9 +275,9 @@ func TestSnapshotEqual(t *testing.T) {
{
{
name : "second-empty" ,
name : "second-empty" ,
s1 : NewSnapshot ( map [ Key ] RawItem {
s1 : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : false } ,
"Setting3" : RawItemOf ( false ) ,
} ) ,
} ) ,
s2 : NewSnapshot ( map [ Key ] RawItem { } ) ,
s2 : NewSnapshot ( map [ Key ] RawItem { } ) ,
wantEqual : false ,
wantEqual : false ,
@ -287,14 +286,14 @@ func TestSnapshotEqual(t *testing.T) {
{
{
name : "same-items-same-order-no-scope" ,
name : "same-items-same-order-no-scope" ,
s1 : NewSnapshot ( map [ Key ] RawItem {
s1 : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : false } ,
"Setting3" : RawItemOf ( false ) ,
} ) ,
} ) ,
s2 : NewSnapshot ( map [ Key ] RawItem {
s2 : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : false } ,
"Setting3" : RawItemOf ( false ) ,
} ) ,
} ) ,
wantEqual : true ,
wantEqual : true ,
wantEqualItems : true ,
wantEqualItems : true ,
@ -302,14 +301,14 @@ func TestSnapshotEqual(t *testing.T) {
{
{
name : "same-items-same-order-same-scope" ,
name : "same-items-same-order-same-scope" ,
s1 : NewSnapshot ( map [ Key ] RawItem {
s1 : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : false } ,
"Setting3" : RawItemOf ( false ) ,
} , DeviceScope ) ,
} , DeviceScope ) ,
s2 : NewSnapshot ( map [ Key ] RawItem {
s2 : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : false } ,
"Setting3" : RawItemOf ( false ) ,
} , DeviceScope ) ,
} , DeviceScope ) ,
wantEqual : true ,
wantEqual : true ,
wantEqualItems : true ,
wantEqualItems : true ,
@ -317,14 +316,14 @@ func TestSnapshotEqual(t *testing.T) {
{
{
name : "same-items-different-order-same-scope" ,
name : "same-items-different-order-same-scope" ,
s1 : NewSnapshot ( map [ Key ] RawItem {
s1 : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : false } ,
"Setting3" : RawItemOf ( false ) ,
} , DeviceScope ) ,
} , DeviceScope ) ,
s2 : NewSnapshot ( map [ Key ] RawItem {
s2 : NewSnapshot ( map [ Key ] RawItem {
"Setting3" : { value : false } ,
"Setting3" : RawItemOf ( false ) ,
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
} , DeviceScope ) ,
} , DeviceScope ) ,
wantEqual : true ,
wantEqual : true ,
wantEqualItems : true ,
wantEqualItems : true ,
@ -332,14 +331,14 @@ func TestSnapshotEqual(t *testing.T) {
{
{
name : "same-items-same-order-different-scope" ,
name : "same-items-same-order-different-scope" ,
s1 : NewSnapshot ( map [ Key ] RawItem {
s1 : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : false } ,
"Setting3" : RawItemOf ( false ) ,
} , DeviceScope ) ,
} , DeviceScope ) ,
s2 : NewSnapshot ( map [ Key ] RawItem {
s2 : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : false } ,
"Setting3" : RawItemOf ( false ) ,
} , CurrentUserScope ) ,
} , CurrentUserScope ) ,
wantEqual : false ,
wantEqual : false ,
wantEqualItems : true ,
wantEqualItems : true ,
@ -347,14 +346,14 @@ func TestSnapshotEqual(t *testing.T) {
{
{
name : "different-items-same-scope" ,
name : "different-items-same-scope" ,
s1 : NewSnapshot ( map [ Key ] RawItem {
s1 : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 123 } ,
"Setting1" : RawItemOf ( 123 ) ,
"Setting2" : { value : "String" } ,
"Setting2" : RawItemOf ( "String" ) ,
"Setting3" : { value : false } ,
"Setting3" : RawItemOf ( false ) ,
} , DeviceScope ) ,
} , DeviceScope ) ,
s2 : NewSnapshot ( map [ Key ] RawItem {
s2 : NewSnapshot ( map [ Key ] RawItem {
"Setting4" : { value : 2 * time . Hour } ,
"Setting4" : RawItemOf ( 2 * time . Hour ) ,
"Setting5" : { value : VisibleByPolicy } ,
"Setting5" : RawItemOf ( VisibleByPolicy ) ,
"Setting6" : { value : ShowChoiceByPolicy } ,
"Setting6" : RawItemOf ( ShowChoiceByPolicy ) ,
} , DeviceScope ) ,
} , DeviceScope ) ,
wantEqual : false ,
wantEqual : false ,
wantEqualItems : false ,
wantEqualItems : false ,
@ -401,9 +400,9 @@ func TestSnapshotString(t *testing.T) {
{
{
name : "non-empty" ,
name : "non-empty" ,
snapshot : NewSnapshot ( map [ Key ] RawItem {
snapshot : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 2 * time . Hour } ,
"Setting1" : RawItemOf ( 2 * time . Hour ) ,
"Setting2" : { value : VisibleByPolicy } ,
"Setting2" : RawItemOf ( VisibleByPolicy ) ,
"Setting3" : { value : ShowChoiceByPolicy } ,
"Setting3" : RawItemOf ( ShowChoiceByPolicy ) ,
} , NewNamedOrigin ( "Test Policy" , DeviceScope ) ) ,
} , NewNamedOrigin ( "Test Policy" , DeviceScope ) ) ,
wantString : ` { Test Policy ( Device ) }
wantString : ` { Test Policy ( Device ) }
Setting1 = 2 h0m0s
Setting1 = 2 h0m0s
@ -413,14 +412,14 @@ Setting3 = user-decides`,
{
{
name : "non-empty-with-item-origin" ,
name : "non-empty-with-item-origin" ,
snapshot : NewSnapshot ( map [ Key ] RawItem {
snapshot : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { value : 42 , origin : NewNamedOrigin ( "Test Policy" , DeviceScope ) } ,
"Setting1" : RawItemWith ( 42 , nil , NewNamedOrigin ( "Test Policy" , DeviceScope ) ) ,
} ) ,
} ) ,
wantString : ` Setting1 = 42 - { Test Policy (Device)} ` ,
wantString : ` Setting1 = 42 - { Test Policy (Device)} ` ,
} ,
} ,
{
{
name : "non-empty-with-item-error" ,
name : "non-empty-with-item-error" ,
snapshot : NewSnapshot ( map [ Key ] RawItem {
snapshot : NewSnapshot ( map [ Key ] RawItem {
"Setting1" : { err : NewErrorText ( "bang!" ) } ,
"Setting1" : RawItemWith ( nil , NewErrorText ( "bang!" ) , nil ) ,
} ) ,
} ) ,
wantString : ` Setting1 = Error { "bang!"} ` ,
wantString : ` Setting1 = Error { "bang!"} ` ,
} ,
} ,