...

Text file src/cuelang.org/go/cue/testdata/eval/v0.7errorprop.txtar

Documentation: cuelang.org/go/cue/testdata/eval

     1// NOTE: do not add more tests to this file, as it may obfuscate the test case.
     2
     3-- in.cue --
     4a: #A
     5a: c: 1
     6#A: {}
     7-- out/eval/stats --
     8Leaks:  0
     9Freed:  4
    10Reused: 1
    11Allocs: 3
    12Retain: 1
    13
    14Unifications: 4
    15Conjuncts:    6
    16Disjuncts:    5
    17-- out/evalalpha --
    18Errors:
    19a.c: field not allowed:
    20    ./in.cue:1:4
    21    ./in.cue:2:4
    22
    23Result:
    24(_|_){
    25  // [eval]
    26  a: (_|_){
    27    // [eval]
    28    c: (_|_){
    29      // [eval] a.c: field not allowed:
    30      //     ./in.cue:1:4
    31      //     ./in.cue:2:4
    32    }
    33  }
    34  #A: (#struct){
    35  }
    36}
    37-- diff/-out/evalalpha<==>+out/eval --
    38diff old new
    39--- old
    40+++ new
    41@@ -2,7 +2,6 @@
    42 a.c: field not allowed:
    43     ./in.cue:1:4
    44     ./in.cue:2:4
    45-    ./in.cue:3:5
    46 
    47 Result:
    48 (_|_){
    49@@ -13,7 +12,6 @@
    50       // [eval] a.c: field not allowed:
    51       //     ./in.cue:1:4
    52       //     ./in.cue:2:4
    53-      //     ./in.cue:3:5
    54     }
    55   }
    56   #A: (#struct){
    57-- diff/todo/p2 --
    58Missing error positions.
    59-- out/eval --
    60Errors:
    61a.c: field not allowed:
    62    ./in.cue:1:4
    63    ./in.cue:2:4
    64    ./in.cue:3:5
    65
    66Result:
    67(_|_){
    68  // [eval]
    69  a: (_|_){
    70    // [eval]
    71    c: (_|_){
    72      // [eval] a.c: field not allowed:
    73      //     ./in.cue:1:4
    74      //     ./in.cue:2:4
    75      //     ./in.cue:3:5
    76    }
    77  }
    78  #A: (#struct){
    79  }
    80}
    81-- out/compile --
    82--- in.cue
    83{
    84  a: 怈0;#A怉
    85  a: {
    86    c: 1
    87  }
    88  #A: {}
    89}

View as plain text