cuelang.org/go@v0.13.0/tools/trim/testdata/remove_due_to_simplification.txtar (about)

     1  -- in.cue --
     2  foo: [string]: {
     3  	t: [string]: {
     4  		x: >=0 & <=5
     5  	}
     6  }
     7  
     8  foo: multipath: {
     9  	t: [string]: {
    10  		// Combined with the other constraints, we know the value must be 5 and
    11  		// thus the entry below can be eliminated.
    12  		x: >=5 & <=8 & int
    13  	}
    14  
    15  	t: u: { x: 5 }
    16  }
    17  
    18  group: {
    19  	for k, v in foo {
    20  		comp: "\(k)": v
    21  	}
    22  }
    23  -- out/trim-v3 --
    24  == in.cue
    25  foo: [string]: {
    26  	t: [string]: {
    27  		x: >=0 & <=5
    28  	}
    29  }
    30  
    31  foo: multipath: {
    32  	t: [string]: {
    33  		// Combined with the other constraints, we know the value must be 5 and
    34  		// thus the entry below can be eliminated.
    35  		x: >=5 & <=8 & int
    36  	}
    37  
    38  	t: u: {x: 5}
    39  }
    40  
    41  group: {
    42  	for k, v in foo {
    43  		comp: "\(k)": v
    44  	}
    45  }
    46  -- diff/-out/trim-v3<==>+out/trim --
    47  diff old new
    48  --- old
    49  +++ new
    50  @@ -12,7 +12,7 @@
    51   		x: >=5 & <=8 & int
    52   	}
    53   
    54  -	t: u: {}
    55  +	t: u: {x: 5}
    56   }
    57   
    58   group: {
    59  -- out/trim-v3-noshare --
    60  == in.cue
    61  foo: [string]: {
    62  	t: [string]: {
    63  		x: >=0 & <=5
    64  	}
    65  }
    66  
    67  foo: multipath: {
    68  	t: [string]: {
    69  		// Combined with the other constraints, we know the value must be 5 and
    70  		// thus the entry below can be eliminated.
    71  		x: >=5 & <=8 & int
    72  	}
    73  
    74  	t: u: {x: 5}
    75  }
    76  
    77  group: {
    78  	for k, v in foo {
    79  		comp: "\(k)": v
    80  	}
    81  }
    82  -- diff/-out/trim-v3-noshare<==>+out/trim --
    83  diff old new
    84  --- old
    85  +++ new
    86  @@ -12,7 +12,7 @@
    87   		x: >=5 & <=8 & int
    88   	}
    89   
    90  -	t: u: {}
    91  +	t: u: {x: 5}
    92   }
    93   
    94   group: {
    95  -- out/trim --
    96  == in.cue
    97  foo: [string]: {
    98  	t: [string]: {
    99  		x: >=0 & <=5
   100  	}
   101  }
   102  
   103  foo: multipath: {
   104  	t: [string]: {
   105  		// Combined with the other constraints, we know the value must be 5 and
   106  		// thus the entry below can be eliminated.
   107  		x: >=5 & <=8 & int
   108  	}
   109  
   110  	t: u: {}
   111  }
   112  
   113  group: {
   114  	for k, v in foo {
   115  		comp: "\(k)": v
   116  	}
   117  }