cuelang.org/go@v0.10.1/cue/testdata/fulleval/031_comparison_against_bottom.txtar (about)

     1  # DO NOT EDIT; generated by go run testdata/gen.go
     2  #
     3  #name: comparison against bottom
     4  #evalFull
     5  -- in.cue --
     6  a: _|_ == _|_
     7  b: err == 1 & 2 // not a literal error, so not allowed
     8  c: err == _|_   // allowed
     9  d: err != _|_   // allowed
    10  e: err != 1 & 3
    11  // z: err == err // TODO: should infer to be true?
    12  f: ({a:        1} & {a: 2}) == _|_
    13  g: ({a:        1} & {b: 2}) == _|_
    14  h: _|_ == ({a: 1} & {a: 2})
    15  i: _|_ == ({a: 1} & {b: 2})
    16  
    17  err: 1 & 2
    18  -- out/def --
    19  a:   true
    20  b:   _|_ // conflicting values 1 and 2
    21  err: _|_ // conflicting values 1 and 2
    22  c:   true
    23  d:   false
    24  e:   _|_ // conflicting values 1 and 2
    25  // z: err == err // TODO: should infer to be true?
    26  f: true
    27  g: false
    28  h: true
    29  i: false
    30  -- out/legacy-debug --
    31  <0>{a: true, b: _|_((1 & 2):conflicting values 1 and 2), err: _|_((1 & 2):conflicting values 1 and 2), c: true, d: false, e: _|_((1 & 2):conflicting values 1 and 2), f: true, g: false, h: true, i: false}
    32  -- out/compile --
    33  --- in.cue
    34  {
    35    a: (_|_(explicit error (_|_ literal) in source) == _|_(explicit error (_|_ literal) in source))
    36    b: ((〈0;err〉 == 1) & 2)
    37    c: (〈0;err〉 == _|_(explicit error (_|_ literal) in source))
    38    d: (〈0;err〉 != _|_(explicit error (_|_ literal) in source))
    39    e: ((〈0;err〉 != 1) & 3)
    40    f: (({
    41      a: 1
    42    } & {
    43      a: 2
    44    }) == _|_(explicit error (_|_ literal) in source))
    45    g: (({
    46      a: 1
    47    } & {
    48      b: 2
    49    }) == _|_(explicit error (_|_ literal) in source))
    50    h: (_|_(explicit error (_|_ literal) in source) == ({
    51      a: 1
    52    } & {
    53      a: 2
    54    }))
    55    i: (_|_(explicit error (_|_ literal) in source) == ({
    56      a: 1
    57    } & {
    58      b: 2
    59    }))
    60    err: (1 & 2)
    61  }
    62  -- out/eval/stats --
    63  Leaks:  0
    64  Freed:  21
    65  Reused: 16
    66  Allocs: 5
    67  Retain: 4
    68  
    69  Unifications: 21
    70  Conjuncts:    28
    71  Disjuncts:    21
    72  -- out/eval --
    73  Errors:
    74  err: conflicting values 2 and 1:
    75      ./in.cue:12:6
    76      ./in.cue:12:10
    77  
    78  Result:
    79  (_|_){
    80    // [eval]
    81    a: (bool){ true }
    82    b: (_|_){
    83      // [eval] err: conflicting values 2 and 1:
    84      //     ./in.cue:12:6
    85      //     ./in.cue:12:10
    86    }
    87    c: (bool){ true }
    88    d: (bool){ false }
    89    e: (_|_){
    90      // [eval] err: conflicting values 2 and 1:
    91      //     ./in.cue:12:6
    92      //     ./in.cue:12:10
    93    }
    94    f: (bool){ true }
    95    g: (bool){ false }
    96    h: (bool){ true }
    97    i: (bool){ false }
    98    err: (_|_){
    99      // [eval] err: conflicting values 2 and 1:
   100      //     ./in.cue:12:6
   101      //     ./in.cue:12:10
   102    }
   103  }